/* Global */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #0f766e 0%, #0f172a 100%);
}

/* HEADER & NAV */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #14532d 0%, #15803d 40%, #047857 100%);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.site-title {
  color: #f9fafb;
  font-weight: 800;
  font-size: 1.125rem;
}

.nav-links {
  display: none; /* shown on desktop via media query */
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  color: #e5e7eb;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: #bbf7d0;
  transform: translateY(-1px);
}

/* Desktop dropdown */
.desktop-dropdown {
  position: relative;
}

.desktop-dropdown-toggle {
  background: none;
  border: none;
  color: #e5e7eb;
  font-weight: 500;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-dropdown-toggle:hover {
  color: #bbf7d0;
  transform: translateY(-1px);
}

.desktop-dropdown-menu {
  position: absolute;
  right: 0;
  top: 140%;
  background: #0f172a;
  border-radius: 0.75rem;
  min-width: 220px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  padding: 0.5rem 0;
  display: none;
}

.desktop-dropdown-menu.open {
  display: block;
}

.desktop-dropdown-menu a {
  display: block;
  padding: 0.6rem 1rem;
  color: #e5e7eb;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.15s ease, padding-left 0.15s ease;
}

.desktop-dropdown-menu a:hover {
  background: #14532d;
  padding-left: 1.4rem;
}

/* Mobile nav */
.mobile-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 2px solid rgba(209, 250, 229, 0.6);
  color: #ecfdf5;
  font-size: 1.4rem;
  padding: 0.1rem 0.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  background: linear-gradient(135deg, #14532d 0%, #16a34a 100%);
  padding: 0.75rem 1.25rem 1rem;
  border-bottom-left-radius: 1rem;
  border-bottom-right-radius: 1rem;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu a {
  display: block;
  color: #ecfdf5;
  text-decoration: none;
  padding: 0.4rem 0;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(22, 163, 74, 0.3);
}

.mobile-menu a:last-child {
  border-bottom: none;
}

/* PAGE HEADER / HERO */
.page-header {
  background: radial-gradient(circle at top left, #22c55e, #0f172a 55%);
  color: #f9fafb;
  text-align: center;
  padding: 4.5rem 1.5rem 6rem;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.4), transparent 55%);
  opacity: 0.7;
  pointer-events: none;
}

.page-header h1 {
  position: relative;
  z-index: 1;
  font-size: 2.6rem;
  font-weight: 900;
  margin-bottom: 0.75rem;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.page-header p {
  position: relative;
  z-index: 1;
  font-size: 1.05rem;
  max-width: 760px;
  margin: 0 auto;
  opacity: 0.95;
}

.hero-emoji {
  position: relative;
  z-index: 1;
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.pulse-animation {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.12); opacity: 0.9; }
}

/* MAIN GAME LAYOUT */
.game-container {
  max-width: 1400px;
  margin: -3.5rem auto 3rem;
  padding: 0 1.25rem;
  position: relative;
  z-index: 10;
}

.game-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 1.5rem;
}

/* CARDS */
.game-card {
  background: #f9fafb;
  border-radius: 1.5rem;
  padding: 2.25rem 2rem;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.35);
}

.card-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #15803d;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

/* Inputs */
.input-group {
  margin-bottom: 1rem;
}

.input-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #16a34a;
  margin-bottom: 0.4rem;
}

.input-field {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 0.75rem;
  border: 2px solid #16a34a;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.input-field:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
  transform: scale(1.01);
}

/* Buttons */
.game-btn {
  width: 100%;
  padding: 0.8rem 1.2rem;
  border-radius: 0.85rem;
  border: none;
  cursor: pointer;
  font-size: 0.98rem;
  font-weight: 700;
  color: #ecfdf5;
  background: linear-gradient(135deg, #16a34a, #15803d);
  box-shadow: 0 12px 30px rgba(22, 163, 74, 0.45);
  margin-bottom: 0.6rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.game-btn.secondary {
  background: linear-gradient(135deg, #0ea5e9, #1d4ed8);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.45);
}

.game-btn.cert-btn {
  margin-top: 0.4rem;
}

.game-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.game-btn:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.35);
}

.game-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

/* Stats bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stat-card {
  background: linear-gradient(135deg, #0f172a, #15803d);
  padding: 0.75rem 0.8rem;
  border-radius: 0.9rem;
  color: #e5e7eb;
  text-align: center;
}

.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.9;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 900;
  margin-top: 0.1rem;
}

/* Progress bar */
.progress-bar {
  width: 100%;
  height: 0.55rem;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1.4rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #22c55e, #0ea5e9);
  transition: width 0.3s ease;
}

/* Quiz area */
.quiz-area {
  min-height: 260px;
}

.quiz-placeholder {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #9ca3af;
}

.quiz-placeholder-emoji {
  font-size: 3.2rem;
  margin-bottom: 0.75rem;
}

.quiz-placeholder-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #111827;
}

.quiz-placeholder-text {
  font-size: 0.95rem;
}

/* Question card */
.question-card {
  background: radial-gradient(circle at top left, #ecfdf5, #eef2ff);
  border-radius: 1rem;
  padding: 2rem 1.6rem;
}

.question-meta {
  font-size: 0.8rem;
  font-weight: 700;
  color: #15803d;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.7rem;
}

.question-meta span {
  font-size: 0.75rem;
  color: #6b7280;
}

.question-text {
  font-size: 2.25rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 1.6rem;
  color: #0f172a;
}

/* Answers */
.answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.answer-btn {
  padding: 1.1rem 1rem;
  border-radius: 0.9rem;
  border: 3px solid #22c55e;
  background: #ffffff;
  font-size: 1.5rem;
  font-weight: 900;
  color: #15803d;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.answer-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(22, 163, 74, 0.3);
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #ecfdf5;
}

.answer-btn.correct {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #f9fafb;
  border-color: #16a34a;
  animation: correctPulse 0.45s ease;
}

.answer-btn.incorrect {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fef2f2;
  border-color: #ef4444;
  animation: shake 0.45s ease;
}

@keyframes correctPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* Particles */
.particle {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  pointer-events: none;
  animation: particle-float 1s ease-out forwards;
  z-index: 2000;
}

@keyframes particle-float {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -150%) scale(0); opacity: 0; }
}

/* Players */
.player-list {
  margin-top: 0.75rem;
}

.player-placeholder {
  text-align: center;
  padding: 1.3rem;
  color: #9ca3af;
  font-size: 0.92rem;
}

.player-item {
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  border-radius: 0.75rem;
  padding: 0.75rem 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.player-item.active {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #ecfdf5;
  transform: scale(1.02);
  box-shadow: 0 10px 26px rgba(22, 163, 74, 0.5);
}

.player-name {
  font-size: 0.98rem;
  font-weight: 700;
}

.player-sub {
  font-size: 0.8rem;
  opacity: 0.85;
}

.player-score {
  font-size: 1.35rem;
  font-weight: 900;
}

/* Ads */
.adsense-container {
  background: linear-gradient(135deg, #ecfeff, #eef2ff);
  border-radius: 1.25rem;
  padding: 1.25rem;
  margin: 1.5rem 0;
  border: 2px dashed #a5b4fc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.adsense-placeholder {
  text-align: center;
  color: #4f46e5;
  font-size: 0.9rem;
}

.adsense-emoji {
  font-size: 2.4rem;
  margin-bottom: 0.3rem;
}

.adsense-title {
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.adsense-text {
  font-size: 0.9rem;
}

/* Tips box */
.tips-box {
  background: linear-gradient(135deg, #ecfdf5, #e0f2fe);
  padding: 1.1rem 1rem;
  border-radius: 0.9rem;
  border-left: 4px solid #22c55e;
  margin-top: 1.1rem;
}

.tips-title {
  font-weight: 700;
  color: #15803d;
  margin-bottom: 0.3rem;
}

.tips-text {
  color: #4b5563;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Results */
.results-wrapper {
  text-align: center;
  padding: 2rem 1.5rem;
}

.results-emoji {
  font-size: 3rem;
  margin-bottom: 0.7rem;
}

.results-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: #15803d;
  margin-bottom: 0.5rem;
}

.results-winner {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1rem;
}

.results-box {
  background: linear-gradient(135deg, #eff6ff, #ecfdf5);
  border-radius: 1rem;
  padding: 1.4rem 1.1rem;
}

.results-box-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.75rem;
}

.results-player {
  background: #ffffff;
  border-radius: 0.75rem;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.45rem;
}

.results-player-name {
  font-weight: 700;
  color: #111827;
  font-size: 0.95rem;
}

.results-player-stats {
  font-size: 0.85rem;
  color: #4b5563;
}

.results-time {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #4b5563;
}

/* Blog */
.blog-section {
  max-width: 980px;
  margin: 3rem auto;
  padding: 0 1.25rem 1rem;
}

.blog-content {
  background: #f9fafb;
  border-radius: 1.75rem;
  padding: 2.5rem 2.3rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.35);
  line-height: 1.8;
}

.blog-content h2 {
  font-size: 2.1rem;
  font-weight: 900;
  margin-bottom: 1.4rem;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blog-content h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-top: 1.9rem;
  margin-bottom: 0.9rem;
  color: #111827;
}

.blog-content h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  color: #1f2937;
}

.blog-content p {
  font-size: 0.98rem;
  color: #4b5563;
  margin-bottom: 0.9rem;
}

.blog-content ul {
  margin: 0.4rem 0 1rem 1.4rem;
  color: #4b5563;
  font-size: 0.96rem;
}

.blog-content li {
  margin-bottom: 0.4rem;
}

.blog-content a {
  color: #2563eb;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.blog-content a:hover {
  color: #1d4ed8;
}

.highlight-box {
  background: linear-gradient(135deg, #ecfdf5, #f5f3ff);
  padding: 1.1rem 1.1rem;
  border-radius: 0.9rem;
  border-left: 4px solid #16a34a;
  margin: 1.3rem 0;
  font-size: 0.96rem;
  color: #374151;
}

.example-box {
  background: #eff6ff;
  border-radius: 0.9rem;
  padding: 1rem 1.1rem;
  border-left: 4px solid #1d4ed8;
  margin: 1.1rem 0;
  font-size: 0.96rem;
  color: #374151;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, #020617, #0b1120);
  color: #e5e7eb;
  padding: 3.5rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-column h3 {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.9rem;
  color: #9ca3af;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column li {
  margin-bottom: 0.4rem;
}

.footer-column a {
  color: #cbd5f5;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.15s ease, transform 0.15s ease;
}

.footer-column a:hover {
  color: #22c55e;
  transform: translateX(3px);
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  margin-top: 2rem;
  padding-top: 1.2rem;
  text-align: center;
  font-size: 0.85rem;
  color: #9ca3af;
}

/* Notification */
.notification {
  position: fixed;
  top: 88px;
  right: 16px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #ecfdf5;
  padding: 0.8rem 1rem;
  border-radius: 0.85rem;
  box-shadow: 0 18px 40px rgba(22, 163, 74, 0.6);
  font-size: 0.9rem;
  z-index: 3000;
  animation: slideInRight 0.25s ease-out;
}

.notification-text {
  font-weight: 700;
}

.notification-hide {
  animation: slideOutRight 0.25s ease-in forwards;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(90px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(90px); }
}

/* Responsive */
@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
  .mobile-menu-btn {
    display: none;
  }
  .mobile-menu {
    display: none !important;
  }
}

@media (max-width: 1024px) {
  .game-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .page-header {
    padding: 3.2rem 1.25rem 4.2rem;
  }

  .page-header h1 {
    font-size: 1.9rem;
  }

  .page-header p {
    font-size: 0.95rem;
  }

  .game-card {
    padding: 1.65rem 1.4rem;
  }

  .stats-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .question-text {
    font-size: 1.8rem;
  }

  .answer-btn {
    font-size: 1.2rem;
    padding: 0.9rem 0.7rem;
  }

  .blog-content {
    padding: 2rem 1.5rem;
  }
}
