/* VERSION 1000 - FINAL DEPLOYMENT SYNC */
/* src/style.css - REFACTORED (Modern Android & Desktop Optimized) */

/* ========================================================== */
/* I. DESIGN SYSTEM & VARIABLES */
/* ========================================================== */

:root {
  /* Premium Learning Palette */
  --primary-color: #2D3E50; /* Deep Indigo - Professional & Stable */
  --primary-light: #4A6278;
  --secondary-color: #10B981; /* Emerald Green - Growth & Learning */
  --secondary-hover: #059669;
  --accent-orange: #F59E0B; /* Amber - Energy & Attention */
  
  --bg-color: #F8FAFC; /* Slate White - Eye-friendly preparation */
  --card-bg: #ffffff;
  --text-primary: #1E293B;
  --text-secondary: #64748B;
  
  --success-color: #10B981;
  --error-color: #EF4444;
  --border-color: #E2E8F0;

  /* Spacing & Radii */
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --border-radius: 16px; /* Smoother corners for modern look */

  /* Gradient Overlays */
  --header-gradient: linear-gradient(135deg, #2D3E50 0%, #1E293B 100%);
  --btn-gradient: linear-gradient(to right, #10B981, #059669);
  
  /* Safe Areas */
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);

  /* Splash Screen - Elegant Gradient */
  --splash-bg: linear-gradient(135deg, #2D3E50 0%, #10B981 100%);
  --splash-primary: #ffffff;
}

/* ========================================================== */
/* II. GENERAL STYLES AND LAYOUT */
/* ========================================================== */

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent; /* Removes blue highlight on tap for mobile */
}

html {
  height: 100%;
}
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* Splash Screen */
#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--splash-bg);
  background-size: 400% 400%;
  animation: gradientBG 8s ease infinite;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition:
    opacity 0.8s ease,
    visibility 0.8s;
  color: white;
  text-align: center;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.splash-content {
  animation: splashIn 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes splashIn {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Activation Screen */
#auth-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../assets/auth_bg.png') no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
  z-index: 10100;
  display: flex;
  justify-content: center;
  align-items: flex-start; /* FIX: Start from top to prevent cutting off logo */
  padding: 40px var(--spacing-md);
  overflow-y: auto; /* Ensure scrollability */
}

#auth-screen::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 41, 59, 0.4); /* Dark overlay to make content pop */
  z-index: -1;
}

.auth-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 30px;
  border-radius: 28px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.4);
  text-align: center;
  max-width: 500px;
  width: 100%;
  border: 1px solid rgba(255,255,255,0.4);
  animation: slideUp 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.auth-card h1 {
  font-size: 2.2rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
  font-weight: 900;
}

.auth-info-box {
  background: #f0f7ff;
  border-radius: 16px;
  padding: 15px;
  margin-bottom: 20px;
  text-align: left;
}

.auth-input-group {
  margin: 25px 0;
  background: #f8fafc;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
}

#activation-code {
  width: 100%;
  padding: 16px;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  font-size: 1.3rem;
  letter-spacing: 3px;
  text-align: center;
  margin-bottom: 15px;
  transition: all 0.3s;
}

#activation-code:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* RESTORED: Premium Button Style */
#activate-btn {
  background: var(--secondary-color);
  background-image: var(--btn-gradient);
  color: white;
  border: none;
  padding: 18px;
  border-radius: 14px;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
  width: 100%;
  margin-bottom: 5px;
}

#activate-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

#activate-btn:active {
  transform: scale(0.98);
}

.pricing-card {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: white;
  padding: 24px;
  border-radius: 20px;
  margin-top: 25px;
  position: relative;
  overflow: hidden;
  text-align: left;
}

.pricing-card::after {
  content: 'BEST VALUE';
  position: absolute;
  top: 15px;
  right: -30px;
  background: var(--accent-orange);
  color: white;
  padding: 5px 40px;
  font-size: 0.7rem;
  font-weight: 900;
  transform: rotate(45deg);
}

.pricing-header h3 { margin: 0; font-size: 1.4rem; color: #10B981; }
.pricing-price { font-size: 2rem; font-weight: 800; margin: 10px 0; }
.pricing-price span { font-size: 1rem; opacity: 0.7; }

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 15px 0;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.btn-buy {
  display: block;
  width: 100%;
  background: var(--secondary-color);
  color: white;
  text-decoration: none;
  text-align: center;
  padding: 14px;
  border-radius: 12px;
  font-weight: 800;
  margin-top: 10px;
  transition: transform 0.2s;
}

.btn-buy:hover { transform: scale(1.02); }

#free-trial-btn {
  background: transparent !important;
  border: 2px solid #cbd5e1 !important;
  color: #64748b !important;
}

.auth-footer { margin-top: 20px; opacity: 0.7; font-size: 0.8rem; }

/* Hide content when auth is shown */
body.auth-active #main-header,
body.auth-active .quiz-container {
  display: none !important;
}

.splash-logo {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 2px;
  margin: 0;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.splash-subtitle {
  font-size: 1.1rem;
  margin-top: 10px;
  opacity: 0.9;
  font-weight: 400;
}

.splash-loader {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  margin: 30px auto;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* COMPACT PREMIUM MODAL (Horizontal Layout) */
.auth-card.compact-mode {
  max-width: 800px; /* Wider for horizontal layout */
  width: 95%;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: row; /* Horizontal layout */
  background: white;
}

.premium-content-wrapper {
  display: flex;
  flex-direction: row;
  width: 100%;
}

/* Left Side: Benefits & Info */
.premium-info-side {
  flex: 1.2;
  padding: 30px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.premium-info-side h2 {
  font-size: 1.4rem;
  color: #1e293b;
  margin-bottom: 15px;
  font-weight: 700;
}

.premium-benefits-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.premium-benefits-list li {
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Right Side: Action (Price & Buy) */
.premium-action-side {
  flex: 0.8;
  padding: 30px;
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-left: 1px solid #e2e8f0;
  text-align: center;
}

.premium-price-tag {
  margin-bottom: 20px;
}

.old-price {
  text-decoration: line-through;
  color: #94a3b8;
  font-size: 1rem;
  display: block;
  margin-bottom: 5px;
}

.new-price {
  font-size: 2rem;
  color: #1e293b;
  font-weight: 800;
  display: block;
  line-height: 1;
}

.per-year {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 400;
}

/* Mobile Responsiveness for Modal */
@media (max-width: 768px) {
  .auth-card.compact-mode {
    flex-direction: column;
    max-width: 400px;
  }
  
  .premium-content-wrapper {
    flex-direction: column;
  }
  
  .premium-info-side {
    padding: 20px;
    background: #f8fafc;
  }
  
  .premium-action-side {
    padding: 20px;
    border-left: none;
    border-top: 1px solid #e2e8f0;
  }
}

/* Auth Input Styling inside Modal */
.modal-auth-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  margin-top: 15px;
  font-size: 0.9rem;
  text-align: center;
  text-transform: uppercase;
}
/* End Compact Modal */

#splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100dvh;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.6;
}

header {
  width: 100%;
  padding: 0 var(--spacing-lg);
  background: var(--header-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  flex: 0 0 auto;
  z-index: 1010;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  min-height: 70px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.header-logo-image {
  width: 38px;
  height: 38px;
  background-image: url('../assets/app-logo-small.webp');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 8px;
}

.logo-text {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 1px;
  white-space: nowrap;
  color: white;
}

/* Burger Menu Toggle Button */
#menu-toggle {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 24px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1011;
}

#menu-toggle span {
  width: 24px;
  height: 3px;
  background-color: white;
  border-radius: 10px;
  transition: all 0.3s linear;
  position: relative;
  transform-origin: 1px;
}

/* X Morph Animation */
#menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg);
}
#menu-toggle.open span:nth-child(2) {
  opacity: 0;
  transform: translateX(20px);
}
#menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg);
}

/* Menu Backdrop */
#menu-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  backdrop-filter: blur(2px);
}

#menu-backdrop.visible {
  display: block;
}

/* Category Colors */
.header-institutions {
  background-color: var(--primary-color) !important;
}
.header-history {
  background-color: #6200ee !important;
}
.header-culture {
  background-color: #d81b60 !important;
}
.header-simulation {
  background-color: #455a64 !important;
}

#navbar {
  display: flex;
  gap: var(--spacing-sm);
  padding: 0;
  background: transparent;
  box-shadow: none;
  flex: 0 0 auto;
  overflow: visible;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 20px;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.nav-btn.selected {
  background: var(--btn-gradient) !important;
  border-color: var(--secondary-color) !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* ========================================================== */
/* III. QUIZ CONTAINER */
/* ========================================================== */

.quiz-container {
  width: 95%;
  max-width: 650px;
  background-color: var(--card-bg);
  padding: var(--spacing-lg) var(--spacing-md);
  border-radius: var(--border-radius);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
  margin: 0 auto var(--spacing-sm);

  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative; /* Required for pseudo-element background */
  z-index: 1;
}

/* Internal background for the card (helpful for mobile) */
.quiz-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.08; /* Very subtle to not interfere with text */
  z-index: -1;
  pointer-events: none;
  transition: background-image 0.6s ease;
}

/* Sync internal background with category */
body[data-category="institutions"] .quiz-container::before { background-image: url('../assets/bg_institutions.webp'); }
body[data-category="history"] .quiz-container::before { background-image: url('../assets/bg_history.webp'); }
body[data-category="geography"] .quiz-container::before { background-image: url('../assets/bg_geography.png'); }
body[data-category="culture"] .quiz-container::before { background-image: url('../assets/bg_culture.png'); }
body[data-category="language"] .quiz-container::before { background-image: url('../assets/bg_language.webp'); }
body[data-category="listening"] .quiz-container::before { background-image: url('../assets/bg_listening.webp'); }
body[data-category="simulation"] .quiz-container::before { background-image: url('../assets/bg_simulation.webp'); }
body[data-category="demo"] .quiz-container::before { background-image: url('../assets/bg_simulation.webp'); } /* Reusing robust simulation background for demo */

#start-screen {
  text-align: center;
}

#start-btn {
  padding: 18px 45px;
  font-size: 1.25rem;
  font-weight: 800;
  border-radius: 50px;
  background: var(--btn-gradient);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  align-self: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#start-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
  filter: brightness(1.05);
}

#start-btn:active {
  transform: scale(0.96);
}

#start-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: var(--spacing-lg);
  padding: var(--spacing-lg);
  position: relative;
  z-index: 10;
}

/* Base style for global background animation */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.25; /* Slightly more visible but still subtle */
  z-index: -10;
  transition: background-image 0.8s ease-in-out;
  pointer-events: none;
}

/* Category Specific Backgrounds on Body */
body[data-category="institutions"]::before { background-image: url('../assets/bg_institutions.webp'); }
body[data-category="history"]::before { background-image: url('../assets/bg_history.webp'); }
body[data-category="geography"]::before { background-image: url('../assets/bg_geography.png'); }
body[data-category="culture"]::before { background-image: url('../assets/bg_culture.png'); }
body[data-category="language"]::before { background-image: url('../assets/bg_language.webp'); }
body[data-category="listening"]::before { background-image: url('../assets/bg_listening.webp'); }
body[data-category="simulation"]::before { background-image: url('../assets/bg_simulation.webp'); }
body[data-category="demo"]::before { background-image: url('../assets/bg_simulation.webp'); }

.welcome-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 10px auto 0;
  max-width: 80%;
  text-align: center;
  line-height: 1.5;
}

#category-title {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin: 0;
  text-align: center;
}

/* ========================================================== */
/* IV. QUESTION AREA (SCROLLABLE) */
/* ========================================================== */

.question-container {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 200px;
  scrollbar-gutter: stable;
}

.question-container::-webkit-scrollbar {
  width: 6px;
}
.question-container::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

#question-text {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-lg);
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-primary);
  text-align: center;
}

#question-image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
}

#quick-jump-container {
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

#question-number-select {
  padding: 6px 12px;
  border: 1.5px solid var(--border-color);
  border-radius: 6px;
  font-weight: 600;
  outline: none;
}

/* ========================================================== */
/* V. INTERACTIVE ELEMENTS (BUTTONS, T/F) */
/* ========================================================== */

#answer-buttons {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px;
  margin-top: var(--spacing-md);
}

.btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: var(--spacing-md);
}

.btn {
  background-color: #f0f4f8;
  color: var(--text-primary);
  border: 2px solid transparent;
  padding: 16px 12px;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
}

/* Reset Button - Smaller and Right-Aligned */
.btn-reset {
  background-color: #e0e0e0;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
  min-height: auto;
  align-self: flex-end;
  margin-top: var(--spacing-sm);
}

.btn-reset:hover {
  background-color: #d0d0d0;
  border-color: #999;
}

.btn-reset:active {
  transform: scale(0.95);
}

/* State Classes */
.correct {
  background-color: var(--success-color) !important;
  color: white !important;
}
.wrong {
  background-color: var(--error-color) !important;
  color: white !important;
}

/* T/F & Statements */
.statement-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.statement-row {
  background: #fdfdfd;
  border: 1px solid #f0f0f0;
  padding: 14px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.tf-container {
  display: flex;
  gap: 6px;
}
.tf-btn {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  border: none;
  background-color: #eee;
  font-weight: 800;
  font-size: 1.1rem;
}
.selected-tf {
  background-color: var(--primary-color) !important;
  color: white !important;
}

/* ========================================================== */
/* VI. MATCHING & FILL-IN BLANKS */
/* ========================================================== */

.matching-grid {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}
.matching-column {
  background: #f8faff;
  border: 1.5px solid #e1e8f0;
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
}
.matching-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e1e8f0;
}
.match-select {
  width: 120px;
  padding: 8px;
  border-radius: 6px;
  border: 1.5px solid var(--accent-blue);
}

/* ========================================================== */
/* VII. FIXED NAVIGATION (BOTTOM) */
/* ========================================================== */

#navigation-controls {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);

  padding: var(--spacing-md) var(--spacing-md)
    calc(var(--spacing-md) + var(--safe-area-bottom));
  box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  z-index: 1000;
}

#navigation-controls .btn {
  flex: 1;
  max-width: 300px;
  margin-bottom: 0;
}

#prev-btn {
  background-color: #6c757d;
}
#next-btn {
  background-color: var(--secondary-color);
}

/* ========================================================== */
/* VIII. FOOTER STYLE */
/* ========================================================== */

#main-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: transparent;
  padding: 15px 0;
  text-align: center;
  opacity: 0.4;
  z-index: 5; /* Below modals but on top of page */
  pointer-events: none; /* Make it invisible to clicks so it doesn't block buttons */
}

.footer-content p {
  margin: 0;
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* ========================================================== */
/* IX. RESPONSIVE MOBILE ADJUSTMENTS */
/* ========================================================== */

@media (max-width: 700px) {
  header {
    padding: 0 var(--spacing-md);
    justify-content: center; /* Center logo on mobile */
  }

  #menu-toggle {
    display: flex;
    position: absolute;
    left: var(--spacing-md);
  }

  .logo-text {
    font-size: 1.2rem;
  }

  #navbar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 260px;
    flex-direction: column;
    justify-content: flex-start;
    padding: calc(60px + var(--spacing-lg)) var(--spacing-md) var(--spacing-md);
    background-color: white;
    z-index: 1010;
    transform: translateX(-100%);
    border-radius: 0;
    margin: 0;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    gap: 0;
  }

  #navbar.open {
    transform: translateX(0);
  }

  .nav-btn {
    color: var(--primary-color);
    background: none;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 0;
    text-align: left;
    padding: 16px 20px;
    font-size: 1rem;
    width: 100%;
  }

  .nav-btn.selected {
    background-color: #f8f8f8 !important;
    color: var(--secondary-color) !important;
    border-color: #f0f0f0 !important;
    box-shadow: none;
  }

  .nav-btn:last-child {
    border-bottom: none;
  }

  .btn-grid {
    grid-template-columns: 1fr;
  }
  .statement-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .tf-container {
    width: 100%;
    margin-top: 10px;
    justify-content: center;
  }
  .match-select {
    width: 100px;
  }
}
/* ========================================================== */
/* VIII. SIMULATION RECALL STYLES */
/* ========================================================== */

.recall-textarea {
  border: 2px solid var(--border-color);
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
  transition: border-color 0.2s;
}

.recall-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.checklist-label {
  display: flex !important;
  align-items: center;
  background-color: #f9f9f9;
  padding: 10px;
  margin: 8px 0 !important;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.checklist-label:hover {
  background-color: #eee;
}

.checklist-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-right: 12px;
}

/* Image Selection Grid */
.image-selection-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 15px;
}

.image-selection-item {
  border: 4px solid transparent;
  border-radius: 12px;
  padding: 8px;
  cursor: pointer;
  background: #f9f9f9;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.image-selection-item:hover:not(.selected-image) {
  background: #f0f0f0;
  transform: translateY(-2px);
}

.image-selection-item img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  border-radius: 6px;
  background: white;
}

.image-selection-item.selected-image {
  border-color: #2196f3;
  background: #e3f2fd;
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

.image-selection-item.btn-secondary {
  background-color: #757575;
  color: white;
}

.btn-secondary:hover {
  background-color: #616161;
}

.correct-image {
  border-color: #4caf50;
  background: #e8f5e9;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.image-selection-item.wrong-image {
  border-color: #f44336;
  background: #ffebee;
  box-shadow: 0 4px 12px rgba(244, 67, 54, 0.2);
}

.image-label {
  display: block;
  margin-top: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  color: #333;
}

/* Matching Image Grid */
.matching-image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin: 20px 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
}

.matching-image-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background: white;
  transition: transform 0.2s;
}

.matching-image-item:hover {
  transform: scale(1.02);
}

.matching-image-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.matching-image-label {
  position: absolute;
  top: 5px;
  left: 5px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.9rem;
}

.success-msg {
  color: var(--success-color);
  font-weight: bold;
  animation: fadeIn 0.5s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reading Text Container */
#reading-text-container {
  background-color: #fff;
  border: 2px solid var(--primary-color);
  border-radius: var(--border-radius);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  max-height: 250px;
  overflow-y: auto;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) #f0f0f0;
}

#reading-text-container::-webkit-scrollbar {
  width: 8px;
}

#reading-text-container::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 4px;
}

#reading-title {
  margin-top: 0;
  color: var(--primary-color);
  font-size: 1.1rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
  margin-bottom: 12px;
}

#reading-content {
  font-size: 1rem;
  line-height: 1.6;
  color: #444;
  white-space: pre-line; /* Preserves newlines */
}

/* ========================================================== */
/* PREMIUM MODAL / AUTH SCREEN STYLES */
/* ========================================================== */

.auth-card.compact-mode {
  background: white;
  width: 95%;
  max-width: 800px;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.premium-content-wrapper {
  display: flex;
  min-height: 400px;
}

.premium-info-side {
  flex: 1;
  padding: 40px;
  background: #ffffff;
}

.premium-action-side {
  width: 320px;
  padding: 40px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-left: 1px solid #e2e8f0;
}

.premium-info-side h2 {
  color: #1e293b;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 25px;
}

.premium-benefits-list {
  list-style: none !important; /* Forces removal of dots */
  padding: 0 !important;
  margin: 0 0 30px 0;
}

.premium-benefits-list li {
  margin-bottom: 15px;
  font-size: 1.05rem;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 10px;
}

.premium-price-tag {
  text-align: center;
  margin-bottom: 25px;
}

.old-price {
  display: block;
  text-decoration: line-through;
  color: #94a3b8;
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.new-price {
  display: block;
  color: #1e293b;
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
}

.per-year {
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 600;
}

.btn-buy {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  border: none;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-buy:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

@media (max-width: 768px) {
  .premium-content-wrapper {
    flex-direction: column;
  }
  .premium-action-side {
    width: 100%;
    border-left: none;
    border-top: 1px solid #e2e8f0;
    padding: 30px;
  }
  .premium-info-side {
    padding: 30px;
  }
}
/* --- MOBİL ÖDEME EKRANI DÜZELTMESİ --- */
@media (max-width: 768px) {
  /* Arka plandaki kartın ekranı taşmasını engelle */
  .auth-card.compact-mode {
    width: 92% !important;
    max-height: 90vh; /* Ekrandan taşmaması için */
    overflow-y: auto !important; /* İçerik çoksa kaydırılabilir yap */
    display: block !important; /* Flex'i iptal et */
  }

  .premium-content-wrapper {
    flex-direction: column !important; /* Elemanları alt alta diz */
  }

  /* Bilgi kısmını (Üst taraf) düzenle */
  .premium-info-side {
    padding: 20px !important;
    text-align: center;
  }

  .premium-info-side h2 {
    font-size: 1.4rem !important;
    margin-bottom: 15px !important;
  }

  .premium-benefits-list li {
    font-size: 0.95rem !important;
    justify-content: center; /* İkon ve yazıyı ortala */
  }

  /* Ödeme ve Fiyat kısmını (Alt taraf) düzenle */
  .premium-action-side {
    width: 100% !important;
    padding: 25px 20px !important;
    border-left: none !important;
    border-top: 2px dashed #e2e8f0; /* Ayırıcı bir çizgi ekle */
    background: #fdfdfd !important;
  }

  .new-price {
    font-size: 2.2rem !important; /* Fiyatı biraz küçült ki sığsın */
  }

  /* Aktivasyon kodu kutusunu sığdır */
  .modal-auth-input {
    width: 100% !important;
    margin: 10px 0 !important;
    box-sizing: border-box;
  }
}
