/* Layout + base */

html,
body {
  height: 100%;
}

html, body {
  max-width: 100%;
}

* {
  box-sizing: border-box;
}

.card,
.container,
.cat-chip-wrap,
.trivia-card,
.score-list-wrap {
  max-width: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #f5f4ff;
  background: radial-gradient(circle at top, #16162c 0, #060610 45%, #05050a 100%);
}

/* -------------------------------------------------- */
/* HEADER BASE */
/* -------------------------------------------------- */

.site-header {
  background: #0b0b18;
  border-bottom: 1px solid #1f1f35;
  width: 100%;
  position: relative;
}

.site-header .container {
  max-width: 1150px;
  width: 100%;
  margin: 0 auto;
  padding: 12px 16px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* -------------------------------------------------- */
/* LOGO */
/* -------------------------------------------------- */

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.site-logo {
  height: 100px;
  width: auto;
  display: block;
}

.logo-text {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 600;
  font-family: 'Rubik', sans-serif;
}

/* -------------------------------------------------- */
/* DESKTOP NAV */
/* -------------------------------------------------- */

.main-nav {
  display: flex;
  gap: 22px;
  align-items: center;
}

.main-nav a {
  color: #e0e0ff;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 6px 8px;
  border-radius: 6px;
  transition: 0.2s ease;
}

.main-nav a:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

/* -------------------------------------------------- */
/* MOBILE TOGGLE */
/* -------------------------------------------------- */

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}

.mobile-toggle span {
  width: 26px;
  height: 3px;
  background: #ffffff;
  border-radius: 3px;
  transition: 0.25s ease;
}

.mobile-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-toggle.open span:nth-child(2) {
  opacity: 0;
}
.mobile-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* -------------------------------------------------- */
/* MOBILE MENU */
/* -------------------------------------------------- */

.mobile-menu {
  display: none;
}
.mobile-menu a {
  color: #e0e0ff !important;
  text-decoration: none !important;
  font-size: 1.05rem;
  padding: 4px 0;
  border-radius: 4px;
  transition: 0.2s ease;
}

.mobile-menu a:hover {
  color: #fff !important;
  background: rgba(255,255,255,0.06);
}
@media (max-width: 800px) {

  .site-logo {
    height: 60px;
  }

  .main-nav {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .mobile-menu {
    background: #111120;
    border-top: 1px solid #23233a;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 14px 16px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.3s ease;
  }

  .mobile-menu.open {
    max-height: 260px;
    opacity: 1;
  }
}

/* Content container */

.container {
  max-width: 1150px;
  margin: 0 auto;
  padding: 24px 16px 32px;
}

/* Typography */

h1 {
  font-size: 2.3rem;
  margin: 10px 0 22px;
  color: #ffffff;
  letter-spacing: 0.6px;
}

h2 {
  font-size: 1.45rem;
  margin: 0 0 14px;
  color: #e0defc;
  letter-spacing: 0.4px;
}

h3 {
  margin-top: 20px;
  margin-bottom: 10px;
  font-weight: 600;
  color: #c3c0f0;
}

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr; /* mobile: single column */
}

.card.full {
  grid-column: 1 / -1; /* Categories span full width */
}

/* Two columns under categories */
@media (min-width: 900px) {
  .grid {
    grid-template-columns: 1.3fr 1fr; /* Theme&Font wider */
    align-items: flex-start;
  }

  .card.half {
    grid-column: span 1;
  }

  .card.half.theme-font {
    grid-column: 1 / 2;
  }

  .card.half.game-options {
    grid-column: 2 / 3;
  }
}

/* Cards */

.card {
  background: #171725;
  border-radius: 16px;
  border: 1px solid #26263b;
  padding: 20px;
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.55),
    0 0 25px rgba(104, 87, 255, 0.25); /* soft blue/purple glow */
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: #7b63ff;
  box-shadow:
    0 20px 55px rgba(0, 0, 0, 0.75),
    0 0 32px rgba(138, 104, 255, 0.4);
}

/* Checklist */

.checklist {
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
}

.checklist label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.checklist input[type="checkbox"] {
  accent-color: #7d5cff;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  background: #25254a;
  color: #ffffff;
  border-radius: 999px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.4px;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.1s ease;
}

.btn:hover {
  background: #303065;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

.btn.primary {
  background: linear-gradient(135deg, #6f3bff, #3f8cff);
  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.55),
    0 0 20px rgba(111, 59, 255, 0.7);
}

.btn.primary:hover {
  background: linear-gradient(135deg, #8352ff, #4d98ff);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.7),
    0 0 26px rgba(129, 78, 255, 0.8);
}

/* Overlay URL */

.overlay-link {
  margin: 14px 0;
  font-size: 0.9rem;
}

.overlay-link code {
  user-select: all;
  display: inline-block;
  padding: 5px 8px;
  background: #101021;
  border: 1px solid #2c2c44;
  border-radius: 8px;
  font-family: "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;
  font-size: 0.8rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Inputs */

label {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 10px;
}

label input,
label select {
  margin-top: 4px;
  width: 100%;
  max-width: 220px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #2f3046;
  background: #101021;
  color: #f3f3ff;
  font-size: 0.95rem;
  outline: none;
}

label input:focus,
label select:focus {
  border-color: #7b63ff;
  box-shadow: 0 0 0 1px rgba(123, 99, 255, 0.4);
}

/* NEW — STYLE COLOR PICKERS */
input[type="color"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 34px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid #2f3046;
  background: #0f0f1a;
  cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
  border-radius: 8px;
}

input[type="color"]::-webkit-color-swatch {
  border-radius: 8px;
  border: 2px solid #555577;
}

/* Trivia card preview */

.trivia-card.preview {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 18px;
  border: 2px solid #2a2a44;
  padding: 18px 18px 14px;
  margin-top: 14px;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.7),
    0 0 22px rgba(115, 90, 255, 0.45);
  display: flex;
  flex-direction: column;
  gap: 10px;

  /* FIX: ensure bottom-meta is visible */
  min-height: 260px;
}
.trivia-card.preview .bottom-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
/* Themes for card */

.theme-night {
  background: #11121a;
  color: #e3e2ff;
  border-color: #33345b;
}

.theme-ocean {
  background: #072331;
  color: #e2f6ff;
  border-color: #145270;
}

.theme-sunset {
  background: #34141a;
  color: #ffe4d6;
  border-color: #7c3b3f;
}

.theme-mono {
  background: #ffffff;
  color: #15151f;
  border-color: #d7d7e0;
}

/* Fonts for card */

.font-system-ui {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
}
.font-rubik {
  font-family: "Rubik", system-ui, sans-serif !important;
}
.font-montserrat {
  font-family: "Montserrat", system-ui, sans-serif !important;
}

/* Inside card */

.trivia-card.preview .q {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.trivia-card.preview .opts {
  font-size: 0.98rem;
}

.trivia-card.preview .opts span {
  display: block;
  margin-bottom: 4px;
}

.trivia-card.preview .timer {
  margin-top: 4px;
  align-self: flex-end;
  font-weight: 700;
  font-size: 1rem;
  opacity: 0.9;
}
.trivia-card.preview * {
  font-family: inherit !important;
}

/* Status text under Start Game */

#status {
  margin-top: 10px;
  font-size: 0.9rem;
  color: #b8b5ff;
}

/* Responsive tweaks */

@media (max-width: 768px) {
  .site-header .container{
    flex-direction: column;
    align-items: flex-start;
  }

  .card {
    padding: 16px;
  }

  .trivia-card.preview {
    max-width: 100%;
  }
}

/* CATEGORY CHIPS */
.cat-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.cat-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: #141426;
  border-radius: 999px;
  border: 1px solid transparent;
  color: #b9b8d9;
  cursor: pointer;
  font-size: 0.9rem;
  transition: 0.18s ease;
}

.cat-chip img.cat-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: cover;
}

.cat-chip .cat-icon {
  font-size: 1.1rem;
}

.cat-chip.selected {
  color: #fff;
  background: #1b1b32;
  border-color: #6f3bff;
  box-shadow: 0 0 10px rgba(111, 59, 255, 0.55);
}

.cat-chip:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

/* CATEGORY TAG ON CARD */
.cat-tag {
  align-self: flex-start;
  padding: 4px 10px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
  font-size: 0.75rem;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---------- Flip Card for Game View ---------- */

#gameCardWrapper {
  width: 520px;
  max-width: 100%;
  height: 500px;
  margin: 0 auto;
  perspective: 1500px;
  position: relative;
}

#gameCard {
  width: 100%;
  height: 100%;
  border-radius: 22px;
  transform-style: preserve-3d;
  transition: transform 1s ease, box-shadow 0.6s ease;
  position: relative;
  box-shadow:
    0 22px 55px rgba(0,0,0,0.65),
    0 0 45px rgba(130, 105, 255, 0.35);
  opacity: 0;
  transform: translateY(40px) scale(0.9);
}

#gameCard.reveal {
  opacity: 1;
  transform: translateY(0) scale(1);
}

#gameCardWrapper.flip #gameCard {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  padding: 26px 30px;
  border-radius: 22px;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 18px;
}
.card-face img.cat-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: cover;
}
.card-face.back {
  transform: rotateY(180deg);
}

/* Real card themes */
.theme-night .card-face {
  background: #111;
  color: #fff;
  border: 2px solid #333;
}

/* Category tag */
.card-face .cat-tag {
  font-size: 0.9rem;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  align-self: flex-start;
  transform: translateY(-10px);
  opacity: 0;
  transition: all 0.5s ease;
}

.card-face.animate .cat-tag {
  transform: translateY(0);
  opacity: 1;
}

/* Question text */
.card-face .q {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.33;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.card-face.animate .q {
  opacity: 1;
  transform: translateY(0);
}

/* Options container */
.card-face .opts div {
  font-size: 1.1rem;
  margin: 6px 0;
  opacity: 0;
  transform: translateX(-10px);
}

/* Staggered fade-in for answer choices */
.card-face.animate .opts div:nth-child(1) {
  animation: optIn 0.45s ease forwards 0.15s;
}
.card-face.animate .opts div:nth-child(2) {
  animation: optIn 0.45s ease forwards 0.30s;
}
.card-face.animate .opts div:nth-child(3) {
  animation: optIn 0.45s ease forwards 0.45s;
}
.card-face.animate .opts div:nth-child(4) {
  animation: optIn 0.45s ease forwards 0.60s;
}

@keyframes optIn {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Timer */
.card-face .timer {
  margin-top: auto;
  font-weight: 700;
  font-size: 1.4rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.card-face.animate .timer {
  opacity: 1;
  transform: translateY(0);
}

/* Intermission side */
.intermission-title {
  text-align: center;
  margin-top: 40px;
  font-size: 1.6rem;
  font-weight: 800;
}

.intermission-winners {
  margin-top: 20px;
  text-align: center;
  font-size: 1.2rem;
  opacity: 0.95;
}

.intermission-next {
  margin-top: auto;
  text-align: center;
  font-size: 1rem;
  opacity: 0.7;
}
#gameContainer > .card {
  max-width: 650px;
  margin: 0 auto;
}

@media (max-width: 768px) {

  /* The whole card section */
  #gameContainer > .card {
    max-width: 100%;
    margin: 0 auto 24px;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
  }

  /* Make wrapper fill the screen width */
  #gameCardWrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    /* Responsive height tied to width — adjust 1.25 if needed */
    height: calc(100vw * 1.25);
    perspective: 1500px;
  }

  /* The actual flipping card should scale inside wrapper */
  #gameCard {
    width: 100%;
    height: 100%;
    transform: none !important;
    border-radius: 18px;
  }

  /* Reduce padding on card faces so content fits */
  #gameCard .card-face {
    padding: 14px 14px;
    gap: 12px;
  }

  /* Category tag */
  #gameCard .cat-tag {
    font-size: 0.78rem;
    padding: 5px 12px;
  }

  /* Question text (smaller for mobile) */
  #gameCard .q {
    font-size: 1.05rem;
    line-height: 1.3;
  }

  /* Options */
  #gameCard .opts div {
    font-size: 0.95rem;
    margin: 4px 0;
  }

  /* Bottom meta row */
  #gameCard .bottom-meta .qid {
    font-size: 0.85rem;
  }

  #gameCard .bottom-meta .timer {
    font-size: 1.1rem;
  }
}

/* ---------- Countdown Overlay ---------- */

.game-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, rgba(20, 20, 60, 0.95), rgba(5, 5, 15, 0.98));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.countdown-box {
  min-width: 260px;
  padding: 24px 30px;
  border-radius: 18px;
  box-shadow:
    0 18px 45px rgba(0,0,0,0.8),
    0 0 30px rgba(120, 90, 255, 0.6);
  text-align: center;
  font-size: 1.4rem;
  font-weight: 600;
  background: #000; /* temporary until JS overrides */
  border: 1px solid #000;
  color: #fff;
}

/* ---------- Leaderboard Overlay ---------- */

.leaderboard-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, rgba(20, 20, 60, 0.96), rgba(5, 5, 15, 0.98));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.leaderboard-container {
  width: 100%;
  max-width: 640px;
  background: #151526;
  border-radius: 20px;
  border: 1px solid #434388;
  padding: 24px 22px 18px;
  box-shadow:
    0 22px 60px rgba(0,0,0,0.85),
    0 0 40px rgba(135, 100, 255, 0.7);
  text-align: center;
}

.leaderboard-container h2 {
  margin-bottom: 16px;
}

/* Podiums */

.podiums {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 16px;
}

.podium {
  flex: 1;
  max-width: 150px;
  background: #1b1b32;
  border-radius: 14px 14px 6px 6px;
  padding: 10px 8px 8px;
  border: 1px solid #38386b;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
}

.podium.first {
  transform: translateY(-8px);
  border-color: #ffdf6a;
  box-shadow: 0 0 16px rgba(255, 223, 106, 0.7);
}

.podium.second {
  border-color: #b0b8c8;
}

.podium.third {
  border-color: #e08a5a;
}

.podium .place {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.podium .name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.podium .score {
  opacity: 0.9;
}

/* Score list below podiums */

.score-list-wrap {
  max-height: 150px;
  overflow: hidden;
  margin-bottom: 16px;
  border-top: 1px solid #30305a;
  padding-top: 8px;
}

.score-list {
  font-size: 0.9rem;
  text-align: left;
  max-height: 150px;
  overflow-y: auto;
}

.score-list div {
  padding: 3px 4px;
}

/* Reuse existing btn styling; center Back button */
.leaderboard-container .btn {
  margin-top: 8px;
}

/* Make sure preview children inherit font */
.trivia-card.preview * {
  font-family: inherit;
}
.bottom-meta {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.1rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.card-face.animate .bottom-meta {
  opacity: 1;
  transform: translateY(0);
}

.bottom-meta .qid {
  font-size: 0.9rem;
  opacity: 0.8;
}

.bottom-meta .timer {
  font-size: 1.4rem;
  font-weight: 700;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px 22px;
  margin-top: 12px;
}

.color-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.95rem;
}

.color-grid input[type="color"] {
  appearance: none;
  width: 100%;
  height: 38px;
  border-radius: 8px;
  border: 1px solid #2f3046;
  background: #101021;
  padding: 0;
  cursor: pointer;
}

.color-grid input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-grid input[type="color"]::-webkit-color-swatch {
  border-radius: 8px;
  border: none;
}
.trivia-card.preview .bottom-meta {
    opacity: 1 !important;
    transform: translateY(0) !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.leaderboard-overlay {
  animation: fadeInBg 0.7s ease forwards;
  opacity: 0;
}

@keyframes fadeInBg {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.leaderboard-container {
  transform: scale(0.85) translateY(20px);
  opacity: 0;
  animation: boardIn 0.6s ease forwards 0.25s;
}

@keyframes boardIn {
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.podium {
  transform: scale(0.7) translateY(20px);
  opacity: 0;
  animation: podiumIn 0.5s ease forwards;
}

.podium.first  { animation-delay: 0.4s; }
.podium.second { animation-delay: 0.55s; }
.podium.third  { animation-delay: 0.7s; }

@keyframes podiumIn {
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}
.podium .name, 
.podium .score {
  opacity: 0;
  transform: translateY(8px);
  animation: winnerFade 0.4s ease forwards;
}

.podium.first .name,
.podium.first .score  { animation-delay: 0.9s; }

.podium.second .name,
.podium.second .score { animation-delay: 1.05s; }

.podium.third .name,
.podium.third .score  { animation-delay: 1.2s; }

@keyframes winnerFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -------------------------------------------------- */
/* COOKIE BANNER */
/* -------------------------------------------------- */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #101020;
  border-top: 1px solid #2b2b46;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-banner p {
  margin: 0;
  font-size: 0.92rem;
}

.cookie-banner-actions {
  display: flex;
  gap: 10px;
}

.btn.small {
  padding: 7px 14px;
  font-size: 0.85rem;
}

/* -------------------------------------------------- */
/* MODALS */
/* -------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #161627;
  padding: 26px 28px;
  border-radius: 16px;
  width: 100%;
  max-width: 540px;
  border: 1px solid #2e2e45;
  box-shadow: 0 0 30px rgba(0,0,0,0.4);
  position: relative;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.modal-content h2 {
  margin-top: 0;
}

.modal-scroll {
  overflow-y: auto;
  margin-top: 12px;
  padding-right: 6px;
  max-height: 60vh;
  font-size: 0.95rem;
  line-height: 1.45;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  color: #fff;
  font-size: 1.7rem;
  border: none;
  cursor: pointer;
}

/* Cookie Preference Toggles */

.cookie-toggle {
  margin: 18px 0;
}

.cookie-toggle label {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cookie-toggle .desc {
  font-size: 0.8rem;
  opacity: 0.7;
  margin: 6px 0 0;
}
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  background-color: #444460;
  border-radius: 24px;
  transition: .3s;
  cursor: pointer;
}

.slider:before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: .3s;
}

/* Toggle ON */
input:checked + .slider {
  background-color: #6f6bff;
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* Disabled toggle */
.switch.disabled .slider {
  background-color: #2b2b3a !important;
  cursor: not-allowed;
}

.switch.disabled .slider:before {
  background-color: #999;
}

.switch.disabled input {
  cursor: not-allowed;
}
/* -------------------------------------------------- */
/* FOOTER */
/* -------------------------------------------------- */

.site-footer {
  background: #0b0b18;
  border-top: 1px solid #1f1f35;
  padding: 28px 0 32px;
  margin-top: 40px;
}

.footer-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Footer Nav */
.footer-nav {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-link {
  background: none;
  border: none;
  color: #e0e0ff;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  transition: 0.2s ease;
}

.footer-link:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

/* Social Icons */
.footer-social {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.social-icon {
  font-size: 1.4rem;
  text-decoration: none;
  color: #e0e0ff;
  transition: 0.2s ease;
}

.social-icon:hover {
  color: #fff;
  transform: translateY(-2px);
}

/* Copyright */
.footer-copy {
  font-size: 0.85rem;
  opacity: 0.6;
}

/* Mobile tweak so nav stacks nicely */
@media (max-width: 600px) {
  .footer-nav {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}
/* =========================== */
/* LOGIN HERO */
/* =========================== */

.login-hero {
  padding: 50px 16px 70px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  text-align: center;
}

.login-card {
  background: rgba(20, 20, 40, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid #2a2a45;
  border-radius: 20px;
  padding: 38px 28px;
  max-width: 560px;
  width: 100%;
  box-shadow: 0 0 35px rgba(80, 60, 200, 0.35);
  animation: fadeIn 0.4s ease;
}

.login-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 12px;
}

.login-tagline {
  font-size: 1.1rem;
  opacity: 0.85;
  margin-bottom: 24px;
}

.login-steps {
  list-style: none;
  padding: 0;
  margin: 0 auto 30px;
  text-align: left;
  max-width: 400px;
}

.login-steps li {
  font-size: 1rem;
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.login-steps li span {
  font-weight: 700;
  color: #c7b3ff;
}

.twitch-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #9146FF;
  padding: 14px 22px;
  font-size: 1.1rem;
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: 0.25s ease;
  margin-top: 10px;
}

.twitch-login-btn:hover {
  background: #7d35e8;
  transform: translateY(-2px);
}

.twitch-icon {
  height: 20px;
  width: 20px;
}

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

@media(max-width: 480px) {
  .login-title { font-size: 1.65rem; }
  .login-card { padding: 28px 20px; }
  .login-steps li { font-size: 0.95rem; }
  .twitch-login-btn { width: 100%; justify-content: center; }
}
.about-wrapper {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  text-align: center;
}

/* Hero Title */
.about-title {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #9ea6ff, #d6d8ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Tagline */
.about-subtitle {
  font-size: 1.15rem;
  opacity: 0.85;
  margin-bottom: 20px;
}

/* Info Card */
.about-card {
  background: #111122;
  border: 1px solid #2c2c44;
  padding: 28px;
  border-radius: 18px;
  box-shadow: 0 0 26px rgba(70, 70, 255, 0.15);
  text-align: left;
  font-size: 1.05rem;
  line-height: 1.55;
}

/* Bullet List */
.about-card ul {
  margin: 0;
  padding-left: 20px;
}

.about-card li {
  margin: 10px 0;
}

/* Feature Grid */
.about-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.feature-box {
  background: #151528;
  border: 1px solid #2f2f4b;
  padding: 20px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
  transition: 0.25s ease;
}

.feature-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 22px rgba(90,90,255,0.25);
}

/* Feature icons */
.feature-box i {
  font-size: 2rem;
  color: #b0b9ff;
  margin-bottom: 12px;
}

/* CTA button reuse */
.about-cta {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.about-cta .btn {
  font-size: 1.1rem;
  padding: 12px 26px;
}

.faq-section {
  padding: 50px 0;
  max-width: 900px;
}

.page-title {
  font-size: 2.4rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 12px;
}

.page-subtitle {
  text-align: center;
  font-size: 1.1rem;
  opacity: 0.8;
  margin-bottom: 40px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.faq-item {
  background: #111120;
  border: 1px solid #26263f;
  padding: 22px 26px;
  border-radius: 14px;
  box-shadow: 0 0 20px rgba(0,0,0,0.25);
  transition: 0.25s ease;
}

.faq-item:hover {
  border-color: #39395d;
  transform: translateY(-2px);
}

.faq-item h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.faq-item p {
  margin-top: 10px;
  font-size: 1rem;
  line-height: 1.55;
  opacity: 0.9;
}

.faq-item code {
  background: rgba(255,255,255,0.07);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.95rem;
}

.faq-section a {
  color: #a9a9ff;               /* soft readable lavender */
  text-decoration: none;        /* remove underline */
  transition: 0.2s ease;
}

.faq-section a:hover {
  color: #ffffff;
  text-shadow: 0 0 6px rgba(160, 150, 255, 0.65);
}

/* Mobile Adjustments */
@media (max-width: 600px) {
  .faq-item {
    padding: 18px 20px;
  }
  .page-title {
    font-size: 1.9rem;
  }
}
.trivia-card .opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  margin-top: 20px;
  width: 100%;
}

.trivia-card .opts div {
  padding: 10px 12px;
  font-size: 1rem;
  line-height: 1.3;
  border-radius: 8px;
  text-align: left;
  word-wrap: break-word;
}

/* mobile optimization */
@media (max-width: 480px) {
  .trivia-card .opts {
    gap: 10px;
  }
  .trivia-card .opts div {
    font-size: 0.9rem;
    padding: 8px 10px;
  }
}
#cardPreview {
    max-width: 500px;
    min-height: 400px;
    margin: 0 auto;
}
/* Make the card use vertical flex layout */
.trivia-card {
    display: flex;
    flex-direction: column;
}

.trivia-card .opts {
    flex-grow: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
    margin-top: 20px;
}

.trivia-card .q {
    margin-bottom: 10px;
}

.trivia-card .bottom-meta {
    margin-top: auto;
}

.header-inner {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
}


.logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}

.logo-text {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 4px;
}

.main-nav {
  order: 3;
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}


.sj-chip {
    position: absolute;
    left: 1.5rem;
    top: 55px;
    transform: none;
    display: flex;
    align-items: center;
    gap: 6px;

    padding: 6px 12px;
    background: rgba(120, 70, 255, 0.15);
    border: 1px solid #7a4bff;
    border-radius: 999px;

    color: #e8e8ff;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;

    transition: 0.25s ease;
    backdrop-filter: blur(6px);
}

.sj-chip-logo {
    height: 18px;
    width: 18px;
    object-fit: contain;
    display: block;
}

.sj-chip:hover {
    background: #7a4bff;
    color: #fff;
    box-shadow: 0 0 10px #7a4bff;
}

@media(max-width: 800px) {
    .sj-chip {
        position: static;
        transform: none;
        margin-bottom: 0.5rem;
        order: 0;
        top: auto;
    }
}
