:root {
  --saffron: #E8781A;
  --gold: #C4932A;
  --gold-light: #F2C96E;
  --lotus: #C9536E;
  --tulasi: #2D6A4F;
  --night: #0A1A0F;
  --night2: #0F1F14;
  --night3: #162A1C;
  --parchment: #F5EDD6;
  --cream: #FBF6EC;
  --muted: #8C9A7A;
  --ink: #120A00;
  --border: rgba(45, 106, 79, 0.22);
  --border2: rgba(45, 106, 79, 0.38);
  --glass: rgba(255, 255, 255, 0.03);
  --glass2: rgba(255, 255, 255, 0.055);
  --error: #C9536E;
  --success: #2D6A4F;
  --success-light: #7ECBA5;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--night);
  color: var(--parchment);
  font-family: 'Crimson Pro', Georgia, serif;
  min-height: 100vh;
  line-height: 1.6;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 10%, rgba(45, 106, 79, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 90%, rgba(126, 203, 165, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 100px;
  position: relative;
  z-index: 1;
}

.main-header {
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
  background: rgba(10, 26, 15, 0.88);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 48px;
  display: flex;
  align-items: center;
}

.nav-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 15px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 14px;
  letter-spacing: .08em;
  color: var(--gold-light);
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-family: 'Cinzel Decorative', serif;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-light);
}

.page-header {
  text-align: center;
  margin-bottom: 48px;
  padding-top: 48px;
}

.big-om {
  font-size: 52px;
  color: var(--gold-light);
  display: block;
  margin-bottom: 16px;
  animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
  from { text-shadow: 0 0 12px rgba(126, 203, 165, 0.35); }
  to { text-shadow: 0 0 36px rgba(126, 203, 165, 0.75), 0 0 72px rgba(45, 106, 79, 0.25); }
}

h1 {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(18px, 3.5vw, 28px);
  color: var(--gold-light);
  letter-spacing: .04em;
  line-height: 1.25;
  margin-bottom: 10px;
}

h2 {
  font-family: 'Cinzel Decorative', serif;
  font-size: 18px;
  color: var(--saffron);
  margin-bottom: 15px;
}

.tagline {
  font-style: italic;
  color: var(--muted);
  font-size: 16px;
}

.card {
  background: var(--glass2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px 36px;
  backdrop-filter: blur(6px);
  margin-bottom: 20px;
}

.card-sm { padding: 22px 28px; }

.field { margin-bottom: 22px; }
.field:last-child { margin-bottom: 0; }

label {
  display: block;
  font-family: 'Cinzel Decorative', serif;
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: 8px;
}

input[type=text],
input[type=password],
textarea {
  width: 100%;
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(45, 106, 79, .28);
  border-radius: 10px;
  padding: 13px 18px;
  color: var(--parchment);
  font-family: 'Crimson Pro', serif;
  font-size: 18px;
  outline: none;
  transition: border-color .25s, box-shadow .25s;
}

input:focus,
textarea:focus {
  border-color: var(--tulasi);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, .14);
}

.hint {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
  font-style: italic;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-family: 'Cinzel Decorative', serif;
  font-size: 10px;
  letter-spacing: .09em;
  transition: transform .2s, box-shadow .2s, opacity .2s;
  text-decoration: none;
}

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none !important;
}

.btn:hover:not(:disabled) { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--tulasi), #1a4a35);
  color: var(--success-light);
  box-shadow: 0 4px 24px rgba(45, 106, 79, .35);
  width: 100%;
  padding: 16px;
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 8px 36px rgba(45, 106, 79, .5);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--ink);
  box-shadow: 0 4px 24px rgba(196, 147, 42, .35);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--gold-light);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(45, 106, 79, .12);
}

.btn-danger {
  background: transparent;
  border: 1px solid rgba(201, 83, 110, .4);
  color: var(--lotus);
}

.btn-sm { padding: 7px 14px; font-size: 9px; border-radius: 7px; }

.status {
  display: none;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 18px;
  font-size: 15px;
  align-items: center;
  gap: 10px;
}

.status.show { display: flex; }
.status.loading { background: rgba(45, 106, 79, .1); border: 1px solid rgba(45, 106, 79, .25); color: var(--success-light); }
.status.error { background: rgba(201, 83, 110, .1); border: 1px solid rgba(201, 83, 110, .3); color: #F5A3B7; }
.status.success { background: rgba(45, 106, 79, .1); border: 1px solid rgba(45, 106, 79, .3); color: var(--success-light); }

.spinner {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 2px solid rgba(126, 203, 165, .25);
  border-top-color: var(--success-light);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.progress-bar-wrap {
  background: rgba(255, 255, 255, .06);
  border-radius: 99px;
  height: 5px;
  margin-bottom: 6px;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--tulasi), var(--success-light));
  transition: width .4s ease;
}

.progress-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 18px;
}

.answer-options { list-style: none; margin-top: 14px; }

.answer-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 18px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all .2s;
  font-size: 16px;
  color: rgba(245, 237, 214, .8);
}

.answer-option:hover {
  border-color: var(--tulasi);
  background: rgba(45, 106, 79, .08);
}

.answer-option.selected {
  border-color: var(--success-light);
  background: rgba(45, 106, 79, .15);
  color: var(--parchment);
}

.answer-option.correct {
  border-color: var(--tulasi);
  background: rgba(45, 106, 79, .15);
  color: var(--success-light);
}

.answer-option.wrong {
  border-color: var(--lotus);
  background: rgba(201, 83, 110, .1);
  color: #F5A3B7;
}

.answer-option input[type=radio] { display: none; }

.opt-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border2);
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  transition: all .2s;
}

.answer-option.selected .opt-circle {
  border-color: var(--success-light);
  background: var(--tulasi);
  color: white;
}

.answer-option.correct .opt-circle {
  border-color: var(--tulasi);
  background: var(--tulasi);
  color: white;
}

.answer-option.wrong .opt-circle {
  border-color: var(--lotus);
  background: var(--lotus);
  color: white;
}

.question-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 16px;
  background: var(--glass);
}

.question-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}

.question-text {
  font-size: 17px;
  color: var(--parchment);
  line-height: 1.5;
  margin-bottom: 4px;
}

.entry-ref {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 12px;
}

.q-expl {
  font-size: 13px;
  font-style: italic;
  color: var(--muted);
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--tulasi);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  background: radial-gradient(circle, rgba(45, 106, 79, .15), transparent);
}

.score-pct {
  font-size: 32px;
  color: var(--success-light);
  font-family: 'Crimson Pro', serif;
  line-height: 1;
}

.score-label {
  font-size: 11px;
  color: var(--muted);
}

.stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.stat {
  background: rgba(45, 106, 79, .07);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 13px;
  color: var(--muted);
  flex: 1;
  min-width: 100px;
  text-align: center;
}

.stat strong {
  display: block;
  font-size: 24px;
  color: var(--success-light);
  font-family: 'Crimson Pro', serif;
  line-height: 1.2;
}

.section-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: 20px;
}

.orn {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 28px 0;
  color: var(--tulasi);
  opacity: .4;
  font-size: 13px;
}

.orn::before,
.orn::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--tulasi), transparent);
}

.badge {
  display: inline-flex;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-family: 'Cinzel Decorative', serif;
  letter-spacing: .06em;
}

.badge-active {
  background: rgba(45, 106, 79, .2);
  color: var(--success-light);
  border: 1px solid rgba(45, 106, 79, .4);
}

.badge-inactive {
  background: rgba(201, 83, 110, .15);
  color: #F5A3B7;
  border: 1px solid rgba(201, 83, 110, .3);
}

.admin-entry {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(45, 106, 79, .08);
}

.admin-entry:last-child { border-bottom: none; }

.admin-entry input[type=checkbox] {
  width: 18px;
  height: 18px;
  accent-color: var(--tulasi);
  margin-top: 4px;
  flex-shrink: 0;
}

.admin-entry-title {
  font-size: 16px;
  color: var(--parchment);
  margin-bottom: 4px;
}

.admin-entry-meta {
  font-size: 12px;
  color: var(--muted);
}

.admin-question {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
  background: var(--glass);
}

.admin-question.selected {
  border-color: var(--tulasi);
  background: rgba(45, 106, 79, .06);
}

.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  gap: 4px;
}

.tab {
  padding: 12px 20px;
  font-family: 'Cinzel Decorative', serif;
  font-size: 9px;
  letter-spacing: .1em;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.tab.active {
  color: var(--success-light);
  border-bottom-color: var(--success-light);
}

.tab:hover:not(.active) { color: var(--parchment); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

footer {
  text-align: center;
  margin-top: 64px;
  font-size: 13px;
  color: rgba(140, 154, 122, .4);
  font-style: italic;
  padding-bottom: 40px;
}

.hidden { display: none !important; }

@media (max-width: 600px) {
  .page { padding: 0 12px 80px; }
  .card { padding: 22px 18px; }
  .nav-container { padding: 10px 16px; }
}
