/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold: #ffcc33;
  --gold-light: #ffeb99;
  --purple: #8b5cf6;
  --purple-light: #a78bfa;
  --blue: #3b82f6;
  --blue-light: #60a5fa;
  --pink: #ec4899;
  --pink-light: #f472b6;
  --dark: #0a0a14;
  --dark2: #111122;
  --dark3: #1a1a2e;
  --text: #ffffff;
  --text-muted: #cbd5e1;
  --border: rgba(255, 204, 51, 0.3);
  --radius: 20px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--dark);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.section {
  display: none;
  padding: 80px 0;
  animation: fadeInSection 0.6s ease-out;
}

.section.active {
  display: block;
}

@keyframes fadeInSection {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  opacity: 0.5;
  animation: bounce 2s infinite;
}

.scroll-dot {
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
  40% { transform: translateY(-10px) translateX(-50%); }
  60% { transform: translateY(-5px) translateX(-50%); }
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 2rem;
}

.global-bg {
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.3) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.2) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.2) 0%, transparent 50%),
    linear-gradient(180deg, #0a0a14 0%, #111122 100%);
  z-index: -1;
}

.global-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  background: white;
  border-radius: 50%;
  pointer-events: none;
  animation: floatUp linear infinite;
  filter: blur(1px);
}

@keyframes floatUp {
  from { transform: translateY(100vh) scale(0.5); opacity: 0; }
  20% { opacity: 0.6; }
  80% { opacity: 0.4; }
  to { transform: translateY(-10vh) scale(1.2); opacity: 0; }
}

.hero-content {
  position: relative;
  text-align: center;
  z-index: 10;
  max-width: 900px;
  animation: fadeInDown 1s ease-out;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

.cross-icon {
  font-size: clamp(3rem, 8vw, 4.5rem);
  color: var(--gold);
  margin-bottom: 1.5rem;
  display: block;
  text-shadow: 0 0 40px rgba(255, 204, 51, 0.6);
  filter: drop-shadow(0 0 10px rgba(255, 204, 51, 0.4));
}

.hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  background: linear-gradient(to right, #ffcc33, #ffffff, #ffcc33);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 4s linear infinite;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

@keyframes shine {
  to { background-position: 200% center; }
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 2rem;
  font-family: 'Lora', serif;
  font-style: italic;
}

.hero-verse {
  display: inline-block;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 204, 51, 0.4);
  padding: 1rem 2rem;
  border-radius: 12px;
  font-family: 'Lora', serif;
  color: var(--gold-light);
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  margin-bottom: 3rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.2rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-primary {
  background: linear-gradient(135deg, #ffcc33, #ffa500);
  color: #000;
}
.btn-primary:hover {
  transform: scale(1.05) translateY(-3px);
  box-shadow: 0 10px 25px rgba(255, 204, 51, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05) translateY(-3px);
}

/* ===== NAV ===== */
.main-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 10, 20, 0.8);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.nav-logo {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-weight: 700;
  font-size: 1.3rem;
}

.nav-links { display: flex; gap: 0.5rem; }

.nav-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 0.6rem 1.2rem;
  border-radius: 12px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s;
}
.nav-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.nav-btn.active { color: var(--gold); background: rgba(255, 204, 51, 0.15); }

/* ===== SECTION TITLES ===== */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}
.section-header h2 {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
  background: linear-gradient(to bottom, #fff, var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-header p {
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* ===== METAPHOR GRID ===== */
.metaphor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.metaphor-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.metaphor-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 5px;
  background: var(--accent);
  box-shadow: 0 0 20px var(--accent);
}

.metaphor-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.metaphor-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  display: block;
}

.metaphor-card h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #fff;
}

.metaphor-card p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.metaphor-ref {
  display: inline-block;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 30px;
  color: var(--gold);
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 204, 51, 0.2);
}

/* ===== MNEMONIC SECTION ===== */
.mnemonic-box {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  padding: 4rem 2rem;
  text-align: center;
  margin: 4rem 0;
  position: relative;
}

.mnemonic-word {
  font-family: 'Cinzel', serif;
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 900;
  letter-spacing: 0.3em;
  background: linear-gradient(to right, #8b5cf6, #ec4899, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 2rem;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.mnemonic-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.mnemonic-items span {
  background: rgba(0, 0, 0, 0.4);
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-size: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s;
}

.mnemonic-items span:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--gold);
}

/* ===== FLASHCARDS ===== */
.flashcard-area {
  max-width: 800px;
  margin: 0 auto 3rem;
  perspective: 1200px;
}

.flashcard {
  height: clamp(350px, 60vh, 500px);
  cursor: pointer;
  position: relative;
  background: transparent;
}

.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-style: preserve-3d;
}

.flashcard-inner.flipped {
  transform: rotateY(180deg);
}

.flashcard-front, .flashcard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.flashcard-front {
  background: linear-gradient(135deg, #1e1e3f, #2d2d5f);
  z-index: 2;
}

.flashcard-back {
  background: linear-gradient(135deg, #1e3f2d, #2d5f40);
  transform: rotateY(180deg);
}

.card-label {
  position: absolute;
  top: 2rem;
  left: 2rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  opacity: 0.7;
}

.card-text {
  font-size: clamp(1.2rem, 3.5vw, 2rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}

.card-tap-hint {
  position: absolute;
  bottom: 2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  opacity: 0.6;
  font-style: italic;
}

.flashcard-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem 2rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-bar-container {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(to right, var(--gold), var(--purple));
  transition: width 0.5s ease;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-num {
  font-weight: 700;
  color: var(--gold);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.flashcard-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.dot.active {
  background: var(--gold);
  transform: scale(1.3);
  box-shadow: 0 0 10px var(--gold);
}

.dot.known {
  background: var(--purple);
}

.flashcard-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 1rem;
}

.ctrl-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
}

.ctrl-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--gold);
}

.ctrl-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.reaction-btns {
  display: flex;
  gap: 1rem;
}

.react-btn {
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}

.react-no { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }
.react-yes { background: rgba(34, 197, 94, 0.2); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.3); }

.react-no:hover { background: rgba(239, 68, 68, 0.4); transform: translateY(-2px); }
.react-yes:hover { background: rgba(34, 197, 94, 0.4); transform: translateY(-2px); }

/* ===== QUIZ ===== */
.quiz-top-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.quiz-progress-bar-wrap {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin-bottom: 3rem;
  overflow: hidden;
}

.quiz-progress-bar {
  height: 100%;
  background: var(--blue);
  transition: width 0.4s ease;
}

.question-card {
  background: rgba(255, 255, 255, 0.04);
  padding: 4rem 3rem;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  margin-bottom: 2rem;
  text-align: center;
}

.question-number-badge {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: #000;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 4px 15px rgba(255, 204, 51, 0.4);
}

.question-text {
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  line-height: 1.3;
  margin-bottom: 1.5rem;
}

.hint-btn {
  background: transparent;
  border: 1px dashed var(--gold);
  color: var(--gold);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.hint-btn:hover { background: rgba(255, 204, 51, 0.1); }

.hint-box {
  background: rgba(255, 204, 51, 0.05);
  border-left: 4px solid var(--gold);
  padding: 1.5rem;
  margin-top: 1.5rem;
  font-style: italic;
  color: var(--gold-light);
  text-align: left;
  border-radius: 0 12px 12px 0;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.2rem;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.5rem 2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.option-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--gold);
  transform: translateX(10px);
}

.option-letter {
  background: rgba(255, 255, 255, 0.1);
  width: 35px;
  height: 35px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.option-btn.correct {
  background: rgba(34, 197, 94, 0.1);
  border-color: #22c55e;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
}
.option-btn.correct .option-letter { background: #22c55e; color: #fff; }

.option-btn.wrong {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
}
.option-btn.wrong .option-letter { background: #ef4444; color: #fff; }

.rationale-box {
  margin-top: 2rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 2rem;
  border-radius: 20px;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.rationale-icon { font-size: 1.5rem; }

/* ===== RESULTS ===== */
.quiz-results {
  text-align: center;
  padding: 4rem 2rem;
}

.results-trophy {
  font-size: 5rem;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 20px rgba(255, 204, 51, 0.4));
}

.results-score {
  font-size: 4rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 1rem;
}

.results-denom { font-size: 1.5rem; color: var(--text-muted); opacity: 0.5; }

.results-breakdown {
  max-width: 600px;
  margin: 3rem auto;
  text-align: left;
}

.breakdown-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.bd-correct { color: #86efac; }
.bd-wrong { color: #fca5a5; }

.results-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 3rem;
}

/* ===== FOOTER ===== */
.site-footer {
  padding: 5rem 2rem;
  background: #05050a;
}

/* ===== MOBILE ADJUSTMENTS ===== */
@media (max-width: 768px) {
  .nav-logo { font-size: 1.1rem; }
  .nav-btn { padding: 0.5rem 0.8rem; font-size: 0.85rem; }
  
  .hero-content { padding: 1rem; }
  .hero-buttons { flex-direction: column; width: 100%; max-width: 300px; margin: 0 auto; }
  
  .metaphor-grid { grid-template-columns: 1fr; }
  
  .mnemonic-word { letter-spacing: 0.1em; }
  
  .flashcard-controls { flex-direction: column; gap: 1.5rem; }
  .reaction-btns { width: 100%; justify-content: center; }
  .ctrl-btn { width: 100%; }

  .question-card { padding: 2rem 1.5rem; }
}

@media (max-width: 480px) {
  .nav-inner { height: 60px; padding: 0 1rem; }
  .nav-logo { display: none; } /* Hide logo on very small screens to save space */
  .nav-links { width: 100%; justify-content: space-around; }
  
  .mnemonic-items span { width: 100%; }
}

