/* ==========================================================================
   MISSION CALCUL & TEMPLATE CSS
   Combined styles: Preserving base site theme & navbar/footer + Mission Calcul
   ========================================================================== */

:root {
  --accent: #198754;
  --accent-hover: #157347;
  --accent-light: #e8f5e9;
  --bg: #f4f7f9;
  --gray: #495057;
  --card-shadow: 0 10px 40px rgba(0,0,0,0.06);
  --radius-lg: 25px;
  --radius-md: 16px;
  --radius-sm: 10px;
  
  /* Game specific vibrant palette */
  --primary-blue: #3b82f6;
  --primary-purple: #8b5cf6;
  --primary-pink: #ec4899;
  --primary-orange: #f97316;
  --primary-yellow: #eab308;
  --primary-emerald: #10b981;
  --primary-red: #ef4444;
  
  --world-foret: #10b981;
  --world-ocean: #06b6d4;
  --world-espace: #6366f1;
  --world-volcan: #f97316;
  --world-glace: #38bdf8;
}

body {
  background-color: var(--bg);
  font-family: 'Poppins', 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  padding: 15px;
  box-sizing: border-box;
  color: #212529;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 85px !important;
  width: 100%;
}

/* Base Card Styling */
.card {
  background: white;
  padding: 35px;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  width: 100%;
  max-width: 950px;
  text-align: center;
  border-top: 6px solid var(--accent);
  box-sizing: border-box;
  position: relative;
}

.logo {
  max-width: 100%;
  width: 320px;
  height: auto;
  margin: 0 auto 15px auto;
  display: block;
}

.page-title {
  font-family: 'Poppins', 'Tajawal', sans-serif;
  color: #212529 !important;
  margin: 0 auto 10px auto;
  font-weight: 700;
  font-size: clamp(24px, 4.5vw, 36px);
  line-height: 1.3;
  letter-spacing: -0.5px;
}

.page-subtitle {
  color: var(--gray);
  font-size: clamp(15px, 3.5vw, 18px);
  margin-bottom: 25px;
  font-weight: 500;
}

/* Top Navbar */
.top-navbar {
  width: 100%;
  background-color: #ffffff;
  position: fixed;
  top: 0;
  left: 0;
  height: 60px;
  display: flex;
  align-items: center;
  z-index: 9999;
  border-bottom-left-radius: 17px;  
  border-bottom-right-radius: 17px;
  border-bottom: 2px solid var(--accent) !important; 
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.nav-container {
  width: 100%;
  padding: 0 15px;
  display: flex;
  justify-content: center !important;
  align-items: center;
  position: relative;
  height: 100%;
}

.nav-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
}

.nav-links a {
  text-decoration: none;
  color: #4a5568;
  font-weight: 600;
  transition: 0.3s;
  white-space: nowrap;
  font-size: 14px;
}

.nav-links a:hover, .nav-links a.active-link {
  color: var(--accent);
}

.menu-icon {
  display: none; 
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-icon span {
  width: 30px;
  height: 4px;
  background-color: var(--accent);
  border-radius: 2px;
}

/* Dropdowns */
.dropdown-item {
  position: relative;
  display: inline-block;
}

.dropdown-btn {
  background: transparent;
  border: none;
  color: #4a5568;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.dropdown-btn:hover,
.dropdown-item:hover .dropdown-btn,
.dropdown-btn[aria-expanded="true"] {
  color: #198754;
  background-color: rgba(25, 135, 84, 0.08);
}

.dropdown-arrow {
  transition: transform 0.25s ease;
}

.dropdown-item:hover .dropdown-arrow,
.dropdown-btn[aria-expanded="true"] .dropdown-arrow {
  transform: rotate(180deg);
  stroke: #198754;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  min-width: 220px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10000;
}

@media (min-width: 769px) {
  .dropdown-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

.dropdown-menu.show {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

.dropdown-link {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: #334155 !important;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dropdown-link:hover {
  background-color: rgba(25, 135, 84, 0.1);
  color: #198754 !important;
}

/* Mobile Navbar */
@media (max-width: 768px) {
  .menu-icon { display: flex; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 65px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    width: 90%;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid #eee;
    z-index: 10000;
    gap: 15px;
  }
  .nav-links.active { display: flex !important; }
  .nav-links a { width: 100%; text-align: center; border-bottom: 1px solid #f1f1f1; padding-bottom: 10px; }
  .dropdown-item { width: 100%; }
  .dropdown-btn { width: 100%; justify-content: space-between; padding: 10px 0; }
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 3px solid #198754;
    border-radius: 0;
    margin-top: 4px;
    padding: 4px 0 4px 12px;
    background: transparent !important;
    display: none;
  }
  .dropdown-menu.show { display: block !important; }
}

/* ==========================================================================
   GAME SPECIFIC STYLES - MISSION CALCUL
   ========================================================================== */

/* Top Dashboard Bar in Game Card */
.game-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 12px 20px;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 12px;
}

.player-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-light);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 10px rgba(25, 135, 84, 0.15);
}

.player-info-text {
  text-align: left;
}
.player-name-display {
  font-weight: 700;
  font-size: 16px;
  color: #1e293b;
}
.player-rank-display {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.stats-badges-container {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: white;
  padding: 6px 14px;
  border-radius: 30px;
  border: 1.5px solid #e2e8f0;
  font-weight: 700;
  font-size: 14px;
  color: #334155;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.stat-pill.coins { color: #d97706; border-color: #fef3c7; background: #fffbeb; }
.stat-pill.stars { color: #ca8a04; border-color: #fef08a; background: #fefce8; }
.stat-pill.score { color: #2563eb; border-color: #bfdbfe; background: #eff6ff; }
.stat-pill.streak { color: #dc2626; border-color: #fecaca; background: #fef2f2; }

/* Main Game Views */
.game-view {
  display: none;
  animation: fadeIn 0.35s ease-out forwards;
}
.game-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Screen 1: Game Setup Config */
.setup-box {
  background: #ffffff;
  border-radius: 20px;
  padding: 25px;
  margin-bottom: 25px;
  border: 2px dashed #cbd5e1;
}

.config-group {
  margin-bottom: 22px;
  text-align: left;
}

.config-group label {
  display: block;
  font-weight: 700;
  font-size: 15px;
  color: #334155;
  margin-bottom: 10px;
}

.pill-selector {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pill-opt {
  flex: 1;
  min-width: 100px;
  padding: 12px 16px;
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: #475569;
  text-align: center;
  transition: all 0.2s ease;
  user-select: none;
}

.pill-opt:hover {
  background: #e2e8f0;
  transform: translateY(-2px);
}

.pill-opt.selected {
  background: var(--accent);
  color: white;
  border-color: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(25, 135, 84, 0.25);
}

.avatar-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 10px;
}

.avatar-option {
  font-size: 32px;
  padding: 10px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.avatar-option:hover {
  transform: scale(1.1);
}

.avatar-option.selected {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.3);
}

.mode-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 25px;
}

.mode-card {
  background: #ffffff;
  border: 3px solid #e2e8f0;
  border-radius: 20px;
  padding: 25px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.mode-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.mode-card-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.mode-card-title {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.mode-card-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 15px;
}

.btn-start-mode {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  width: 100%;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-start-mode:hover {
  background: var(--accent-hover);
}

/* Adventure World Map View */
.world-map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-back {
  background: #e2e8f0;
  color: #334155;
  border: none;
  padding: 8px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: 0.2s;
}

.btn-back:hover {
  background: #cbd5e1;
}

.worlds-tab-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 25px;
  scrollbar-width: thin;
}

.world-tab-btn {
  padding: 10px 18px;
  border-radius: 30px;
  background: white;
  border: 2px solid #e2e8f0;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.world-tab-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(25, 135, 84, 0.2);
}

.world-hero-card {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border-radius: 20px;
  padding: 25px;
  margin-bottom: 25px;
  text-align: left;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.25);
}

.world-hero-card.ocean { background: linear-gradient(135deg, #06b6d4, #0284c7); }
.world-hero-card.espace { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.world-hero-card.volcan { background: linear-gradient(135deg, #f97316, #ea580c); }
.world-hero-card.glace { background: linear-gradient(135deg, #38bdf8, #0284c7); }

.world-hero-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 5px;
}

.world-hero-desc {
  font-size: 14px;
  opacity: 0.95;
}

.levels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.level-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.level-card:hover:not(.locked) {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.level-card.locked {
  background: #f1f5f9;
  opacity: 0.6;
  cursor: not-allowed;
  border-color: #cbd5e1;
}

.level-card.boss {
  border: 2px solid #ef4444;
  background: #fef2f2;
}

.level-num {
  font-size: 22px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 6px;
}

.level-stars {
  color: #eab308;
  font-size: 16px;
  letter-spacing: 2px;
}

/* Gameplay Arena */
.arena-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.lives-container {
  display: flex;
  gap: 5px;
  font-size: 22px;
}

.heart-icon {
  animation: pulse 1.5s infinite;
}

.timer-bar-wrapper {
  width: 100%;
  height: 12px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 25px;
}

.timer-bar-fill {
  height: 100%;
  width: 100%;
  background: #10b981;
  transition: width 0.1s linear, background 0.3s;
}

/* Boss Stage Banner */
.boss-banner {
  background: linear-gradient(135deg, #1e1b4b, #311b92);
  color: white;
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.boss-avatar {
  font-size: 55px;
  animation: bossFloat 3s ease-in-out infinite;
}

@keyframes bossFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.boss-details {
  flex: 1;
  text-align: left;
}

.boss-name {
  font-size: 20px;
  font-weight: 800;
  color: #fca5a5;
  margin-bottom: 5px;
}

.boss-hp-bar {
  height: 14px;
  background: rgba(255,255,255,0.2);
  border-radius: 7px;
  overflow: hidden;
  border: 1.5px solid rgba(255,255,255,0.4);
}

.boss-hp-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ef4444, #f97316);
  transition: width 0.4s ease;
}

/* Question Box */
.question-card {
  background: #ffffff;
  border: 3px solid #e2e8f0;
  border-radius: 24px;
  padding: 35px 20px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
  position: relative;
}

.question-text {
  font-size: clamp(32px, 7vw, 54px);
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.visual-counting-box {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1.5px dashed #e2e8f0;
}

.count-dot {
  font-size: 24px;
  animation: popIn 0.3s ease-out;
}

@keyframes popIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 500px) {
  .options-grid {
    grid-template-columns: 1fr;
  }
}

.option-btn {
  background: #f8fafc;
  border: 3px solid #cbd5e1;
  border-radius: 18px;
  padding: 20px 15px;
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  user-select: none;
}

.option-btn:hover:not(:disabled) {
  background: white;
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(25, 135, 84, 0.15);
}

.option-btn.correct {
  background: #dcfce7 !important;
  border-color: #22c55e !important;
  color: #15803d !important;
  animation: pulseGreen 0.4s ease;
}

.option-btn.wrong {
  background: #fee2e2 !important;
  border-color: #ef4444 !important;
  color: #b91c1c !important;
  animation: shake 0.4s ease;
}

.shortcut-badge {
  position: absolute;
  top: 8px;
  left: 12px;
  font-size: 11px;
  font-weight: 700;
  background: #e2e8f0;
  color: #64748b;
  padding: 2px 6px;
  border-radius: 6px;
}

/* Feedback Alert Banner */
.feedback-msg {
  min-height: 48px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  transition: all 0.3s;
  visibility: hidden;
  opacity: 0;
}

.feedback-msg.show {
  visibility: visible;
  opacity: 1;
}

.feedback-msg.correct-feedback {
  background: #dcfce7;
  color: #15803d;
  border: 1.5px solid #86efac;
}

.feedback-msg.wrong-feedback {
  background: #fee2e2;
  color: #b91c1c;
  border: 1.5px solid #fca5a5;
}

/* Victory / Game Over Screen */
.results-card {
  text-align: center;
  padding: 20px 10px;
}

.results-icon {
  font-size: 70px;
  margin-bottom: 15px;
}

.results-title {
  font-size: 28px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 10px;
}

.rewards-grid {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 25px 0;
  flex-wrap: wrap;
}

.reward-box {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 15px 25px;
  text-align: center;
  min-width: 110px;
}

.reward-val {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
}

.reward-lbl {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

/* Action Buttons Bar */
.action-buttons-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 25px;
  flex-wrap: wrap;
}

.btn-game-action {
  padding: 12px 24px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 16px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-primary-action {
  background: var(--accent);
  color: white;
}
.btn-primary-action:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.btn-secondary-action {
  background: #e2e8f0;
  color: #334155;
}
.btn-secondary-action:hover {
  background: #cbd5e1;
}

/* Modals & Trophies / Shop */
.modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.trophy-item {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 15px 10px;
  text-align: center;
}

.trophy-item.unlocked {
  background: #fefce8;
  border-color: #fde047;
}

.trophy-icon {
  font-size: 36px;
  margin-bottom: 6px;
  filter: grayscale(100%);
  opacity: 0.5;
}

.trophy-item.unlocked .trophy-icon {
  filter: grayscale(0%);
  opacity: 1;
}

.trophy-name {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}

/* Confetti Container (Pure DOM / SVG Particles) */
#confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99999;
  overflow: hidden;
}

.confetti-particle {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: fall 3s linear forwards;
}

@keyframes fall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

@keyframes pulseGreen {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* Audio Controls */
.sound-toggle-btn {
  background: white;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 8px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 14px;
  color: #475569;
  transition: 0.2s;
}

.sound-toggle-btn:hover {
  background: #f1f5f9;
}

/* FAQ Section Styling */
.faq-container {
  margin-top: 50px;
  width: 100%;
  max-width: 950px;
  background: white;
  border-radius: var(--radius-lg);
  padding: 35px;
  box-sizing: border-box;
  box-shadow: var(--card-shadow);
  border-top: 6px solid var(--accent);
  text-align: left;
}

.faq-title {
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 25px;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 12px;
}

.faq-item {
  margin-bottom: 15px;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
}

.faq-item summary {
  padding: 16px 20px;
  font-weight: 700;
  font-size: 16px;
  color: #334155;
  cursor: pointer;
  background: #f8fafc;
  outline: none;
  user-select: none;
}

.faq-item summary:hover {
  color: var(--accent);
}

.faq-answer {
  padding: 16px 20px;
  font-size: 15px;
  color: #475569;
  line-height: 1.6;
  background: white;
  border-top: 1px solid #e2e8f0;
}

/* SEO Grid & Rating Section */
.seo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 950px;
  margin: 40px auto;
  box-sizing: border-box;
}

.seo-card {
  background: white;
  padding: 25px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
  border-top: 5px solid var(--accent);
  text-align: left;
  box-sizing: border-box;
}

.seo-title {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.seo-text {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
}

.rating-section {
  max-width: 700px;
  margin: 40px auto;
  text-align: center;
  padding: 30px;
}

.rating-section h2 {
  font-size: 26px;
  margin-bottom: 10px;
  font-weight: 700;
}

.rating-subtitle {
  color: #666;
  margin-bottom: 25px;
  font-size: 16px;
}

#rating-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.rating-stars {
  font-size: 34px;
  cursor: pointer;
}

.rating-star {
  color: #cbd5e1;
  transition: color 0.2s;
}

.rating-star.active {
  color: #f59e0b;
}

.rating-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
}

.rating-message {
  display: none;
  color: #16a34a;
  font-weight: 700;
}

/* Footer */
footer {
  text-align: center;
  padding: 30px 20px;
  font-size: 14px;
  color: #212529 !important;
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  direction: ltr !important;
  width: 100%;
  box-sizing: border-box;
}

footer a {
  color: #155724 !important;
  text-decoration: underline !important;
  cursor: pointer;
  font-weight: 600;
}

/* Toast */
#toast {
  visibility: hidden;
  min-width: 250px;
  background-color: #28a745;
  color: #fff;
  text-align: center;
  border-radius: 12px;
  padding: 16px;
  position: fixed;
  z-index: 10000;
  left: 50%;
  top: -100px;
  transform: translateX(-50%);
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transition: top 0.4s, visibility 0.4s, opacity 0.4s;
  opacity: 0;
}

#toast.show {
  visibility: visible;
  top: 30px;
  opacity: 1;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  overflow-y: auto;
}

.modal-content {
  background: white;
  margin: 6% auto;
  padding: 30px;
  width: 90%;
  max-width: 650px;
  border-radius: var(--radius-lg);
  text-align: left;
  line-height: 1.6;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-content h2 {
  border-bottom: 2px solid var(--accent);
  padding-bottom: 10px;
  margin-top: 0;
  color: #1e293b;
}

.close-btn {
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: #64748b;
}

.close-btn:hover {
  color: #0f172a;
}
