/* ─────────────────────────────────────────────────
   PREMIUM DARK | GLASSMORPHIC | MOBILE-OPTIMIZED BUTTONS
───────────────────────────────────────────────── */
:root {
  --bg-start: #000;
  --bg-end:   #111;
  --glass: rgba(255,255,255,0.05);
  --glass-border: rgba(255,255,255,0.1);
  --accent: #0022B5;
  --text-light: #f5f5f5;
  --font-head: 'Poppins', sans-serif;
  --font-body: 'Montserrat', sans-serif;
  --btn-radius: 8px;
  --transition: 0.3s ease;
  --timer-seconds: 15s;
}

/* Reset & disable rubber-band overscroll */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html, body {
  overscroll-behavior: none;
}
body {
  background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
  color: var(--text-light);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem;
}

/* Container */
.quiz-container {
  width: 100%;
  max-width: 520px;
}

/* Card */
.quiz-card {
  backdrop-filter: blur(12px) saturate(180%);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Header */
.quiz-header {
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.quiz-header h1 {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 1px;
}

/* Progress Ring */
.progress-ring {
  position: relative;      /* enable children absolute positioning */
  width: 60px;             /* match your SVG size */
  height: 60px;
  margin: 0;               /* remove any stray margins */
}
.progress-ring svg {
  display: block;
  width: 100%;
  height: 100%;
}
.ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.2);
  stroke-width: 4;
}
.ring-fg {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset var(--transition);
}
#progressText {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  font-size: 0.75rem;
}
.progress-ring #progressText {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;               /* reset default */
  font-size: 0.9rem;       /* tweak to your taste */
  line-height: 1;
  color: #fff;             /* or whatever contrast you need */
  pointer-events: none;    /* so clicks go to the ring if needed */
}
/* Timer Bar */
.timer-bar {
  height: 5px;
  background: rgba(255,255,255,0.1);
  overflow: hidden;
}
.timer-fill {
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform-origin: left;
  animation: countdown var(--timer-seconds) linear forwards;
}
@keyframes countdown {
  to { width: 0%; }
}

/* Body */
.quiz-body {
  flex: 1;
  padding: 1rem;
}
.quiz-question {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Question Image Constrain */
.question-image-wrapper {
  width: 100%;
  text-align: center;
  margin-bottom: 0.75rem;
}
.question-image-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: var(--btn-radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Answers */
.quiz-answers {
  list-style: none;
  display: grid;
  gap: 0.75rem;
}
.quiz-answers button {
  width: 100%;
  padding: 0.75rem;
  background: rgba(255,255,255,0.1);
  border: 2px solid var(--accent);
  border-radius: var(--btn-radius);
  color: var(--text-light);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.quiz-answers button:hover:not(:disabled) {
  background: var(--accent);
  transform: translateY(-1px);
}
.quiz-answers button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Footer */
.quiz-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}
.next-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 1rem 2rem;
  font-size: 1rem;
  border-radius: var(--btn-radius);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  width: 100%;
}
.next-btn:hover {
  background: #001a94;
  transform: translateY(-1px);
}

/* Share Button */
.share-btn {
  display: none;
  width: 100%;
  margin-top: 1rem;
  background: #1e7e34;
  color: #fff;
  border: none;
  border-radius: var(--btn-radius);
   padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.share-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.45);
}

/* Responsive */
@media (max-width: 400px) {
  .quiz-header h1 { font-size: 1.4rem; }
  .quiz-question { font-size: 1rem; }
}
@media (max-width: 768px) {
  body { padding: 0.5rem; }
  .quiz-container {
    width: 100vw;
    max-width: none;
  }
}
/* Hamburger toggle */
.hamburger {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 9999;       /* way above images */
}

/* Slide-out nav panel */
.side-nav {
  position: fixed;
  top: 0;
  left: -240px;
  width: 240px;
  height: 100%;
  background: #1e1e1e;
  padding: 2rem 1rem;
  transition: left 0.3s ease;
  z-index: 9998;       /* just under the hamburger */
}
.side-nav.open {
  left: 0;
}
/* —— Mobile adjustments —— */
@media (max-width: 600px) {
  .keyboard {
    width: 100%;
    margin: 0 0 0.5rem;
    padding: 0;
    background: transparent;
  }
  .keyboard-row { gap: 0.25rem; }
  .key { padding: 1rem 0; font-size: 1.6rem; }
}

/* —— Slide-out nav link color override —— */
.side-nav a,
.side-nav a:visited {
  color: #fff;
  text-decoration: none;
}

/* Banner nav override (if used) */
.banner-nav,
.banner-nav:visited {
  color: #fff;
  text-decoration: none;
}
/* —— Mobile adjustments —— */
@media (max-width: 600px) {
  .keyboard {
    width: 100%;
    margin: 0 0 0.5rem;
    padding: 0;
    background: transparent;
  }
  .keyboard-row { gap: 0.25rem; }
  .key { padding: 1rem 0; font-size: 1.6rem; }
}

/* —— Slide-out nav link color override —— */
.side-nav a,
.side-nav a:visited {
  color: #fff;
  text-decoration: none;
}

/* Banner nav override (if used) */
.banner-nav,
.banner-nav:visited {
  color: #fff;
  text-decoration: none;
}
.more-games {
  max-width: 900px;
  margin: 3rem auto;
  padding: 0 1rem;
  text-align: center;
}
.more-games h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.75rem;
  margin-bottom: 1rem;
}
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}
.game-card {
  display: block;
  text-decoration: none;
  color: inherit;
  font-family: 'Poppins', sans-serif;
}
.game-card img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform .2s, box-shadow .2s;
}
.game-card:hover img {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.game-card span {
  display: block;
  margin-top: 0.5rem;
  font-weight: 600;
}
.home-grid.two-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 600px;
    margin: 2rem auto;
  }
  .home-grid.two-col a {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
    transition: transform .2s, box-shadow .2s;
  }
  .home-grid.two-col a:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  }
  .home-grid.two-col img {
    width: 40px;
    height: 40px;
    margin-right: 1rem;
  }
  .home-grid.two-col span {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 600;
  }
  /* hide until quiz ends or “already taken” fires */
  .hidden {
    display: none;
  }

  /* container styling */
  #other-games {
    margin: 2rem auto;
    max-width: 900px;
    text-align: center;
  }
  #other-games .logo {
  width: 140px; /* bigger */
  display: block;
  margin: 0 auto 1rem;
  cursor: pointer;
}

  /* two-column grid */
  #other-games .quiz-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
  }

  /* card styling */
  .quiz-card {
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .quiz-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }
  .quiz-card-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
    flex: 1;
  }
  .quiz-card-content h3 {
    margin: 0;
    font-size: 1.25rem;
  }
  .quiz-card-content p {
    margin: 0.5rem 0;
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.4;
  }
  .quiz-card-footer {
    margin-top: 1rem;
  }
  .quiz-card-footer a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #007bff;
    color: #fff;
    border-radius: 0.25rem;
    text-decoration: none;
    font-weight: 500;
  }
  .quiz-card-footer a:hover {
    background: #0056b3;
  }
  /* 1) Keep everything transparent and border-only here */
  #other-games .quiz-card {
    background: transparent !important;
    box-shadow: none !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
  }

  /* 2) Retain the same border-radius from style.css */
  #other-games .quiz-card {
    border-radius: 0.5rem;
  }

  /* 3) If you want the hover shadow back in this section: */
  #other-games .quiz-card:hover {
    box-shadow: 0 2px 6px rgba(255,255,255,0.1) !important;
  }
