/* Trivia / quiz public pages */

:root {
  --qp: #7C3AED;
  --qv: #8B5CF6;
  --qpink: #EC4899;
  --qamber: #F59E0B;
  --qgreen: #10B981;
  --qblue: #0EA5E9;
  --qred: #EF4444;
  --qorange: #F97316;
  --qbg: #F8F7FF;
  --qborder: #EDE9FE;
}

.quiz-page {
  font-family: var(--font-body);
  background: var(--qbg);
  color: var(--text);
}

.quiz-page .quiz-hero {
  padding: 96px 5% 48px;
  background: linear-gradient(135deg, #EDE9FE 0%, #F5F3FF 40%, #FAF9FF 70%, #EFF6FF 100%);
  position: relative;
  overflow: hidden;
}
.quiz-page .quiz-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle 320px at 85% 30%, rgba(124, 58, 237, 0.12) 0%, transparent 70%),
    radial-gradient(circle 200px at 10% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 65%),
    radial-gradient(circle 150px at 50% 10%, rgba(245, 158, 11, 0.08) 0%, transparent 60%);
  pointer-events: none;
}
.quiz-page .hero-deco {
  position: absolute;
  pointer-events: none;
  font-size: 3rem;
  opacity: 0.12;
  user-select: none;
}
.quiz-page .hero-deco.d1 { top: 12%; left: 4%; transform: rotate(-15deg); }
.quiz-page .hero-deco.d2 { top: 18%; right: 5%; transform: rotate(12deg); font-size: 2.4rem; }
.quiz-page .hero-deco.d3 { bottom: 20%; right: 12%; transform: rotate(-8deg); font-size: 2rem; }
.quiz-page .hero-deco.d4 { bottom: 15%; left: 8%; transform: rotate(10deg); font-size: 1.8rem; }
.quiz-page .hero-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.quiz-page .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(124, 58, 237, 0.1);
  border: 1.5px solid rgba(124, 58, 237, 0.2);
  border-radius: 50px;
  padding: 5px 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--qp);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 18px;
}
.quiz-page .hero-badge span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--qp);
  display: inline-block;
  animation: quiz-pulse 2s infinite;
}
@keyframes quiz-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.quiz-page .hero-title {
  font-family: var(--font-body);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 900;
  color: var(--navy);
  line-height: 1.12;
  margin-bottom: 14px;
}
.quiz-page .hero-title .t-accent {
  background: linear-gradient(135deg, #7C3AED, #EC4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.quiz-page .hero-sub {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 28px;
  line-height: 1.7;
}
.quiz-page .hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.quiz-page .btn-play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #7C3AED, #8B5CF6);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  padding: 13px 28px;
  border-radius: 14px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 6px 22px rgba(124, 58, 237, 0.32);
}
.quiz-page .btn-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.4);
  color: #fff;
}
.quiz-page .btn-play svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
}
.quiz-page .btn-browse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  color: var(--qp);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 14px;
  text-decoration: none;
  border: 2px solid rgba(124, 58, 237, 0.25);
  transition: all 0.25s;
}
.quiz-page .btn-browse:hover {
  border-color: var(--qp);
  background: rgba(124, 58, 237, 0.04);
  color: var(--qp);
}
.quiz-page .btn-create-quick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--navy);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 14px;
  text-decoration: none;
  border: 2px solid rgba(15, 31, 92, 0.12);
  transition: all 0.25s;
}
.quiz-page .btn-create-quick:hover {
  border-color: var(--qp);
  color: var(--qp);
  background: #fff;
}
.quiz-page .btn-create-quick--solid {
  background: linear-gradient(135deg, #7C3AED, #8B5CF6);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.28);
  font-weight: 800;
}
.quiz-page .btn-create-quick--solid:hover {
  background: linear-gradient(135deg, #6D28D9, #7C3AED);
  color: #fff;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(124, 58, 237, 0.38);
}
.quiz-page .hero-page-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.quiz-page .qq-promo-section {
  max-width: 1100px;
  margin: 36px auto 40px;
  padding: 0 5%;
}
.quiz-page .qq-promo-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(236, 72, 153, 0.06));
  border: 1.5px solid rgba(124, 58, 237, 0.18);
  border-radius: 22px;
  padding: 28px 32px;
}
.quiz-page .qq-promo-left h2 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 6px;
}
.quiz-page .qq-promo-left p {
  font-size: 14px;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.6;
}
.quiz-page .qq-promo-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.quiz-page .stats-strip {
  max-width: 1180px;
  margin: 36px auto 0;
  padding: 0 5%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  position: relative;
  z-index: 1;
}
.quiz-page .stat-card {
  background: var(--white);
  border: 1.5px solid var(--qborder);
  border-radius: 16px;
  padding: 16px 20px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(124, 58, 237, 0.06);
}
.quiz-page .stat-card .snum {
  font-family: var(--font-body);
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--navy);
  display: block;
  line-height: 1;
}
.quiz-page .stat-card .slbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 4px;
  display: block;
}

.quiz-page .trivia-section,
.quiz-page .featured-section,
.quiz-page .cat-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 5% 0;
}
.quiz-page .lb-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 5% 48px;
}
.quiz-page .section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.quiz-page .section-label h2 {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--navy);
}
.quiz-page .section-label .badge-new {
  display: inline-block;
  background: linear-gradient(135deg, #F97316, #F59E0B);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.quiz-page .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.quiz-page .section-header h2 {
  font-family: var(--font-body);
  font-size: 1.18rem;
  font-weight: 900;
  color: var(--navy);
}
.quiz-page .view-all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--qp);
  text-decoration: none;
}
.quiz-page .view-all:hover { color: var(--qv); }
.quiz-page .view-all svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
}

.quiz-page .trivia-widget {
  background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 50%, #5B21B6 100%);
  border-radius: 22px;
  padding: 28px 32px 24px;
  position: relative;
  overflow: hidden;
}
.quiz-page .trivia-widget::before,
.quiz-page .trivia-widget::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
}
.quiz-page .trivia-widget::before {
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
}
.quiz-page .trivia-widget::after {
  bottom: -30px;
  left: -30px;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.05);
}
.quiz-page .tw-inner { position: relative; z-index: 1; }
.quiz-page .tw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}
.quiz-page .tw-title {
  font-size: 12px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.quiz-page .tw-skip,
.quiz-page .tw-next {
  background: rgba(255, 255, 255, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.85);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 8px;
  cursor: pointer;
}
.quiz-page .tw-q {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.22rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 20px;
  line-height: 1.4;
}
.quiz-page .tw-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.quiz-page .tw-opt {
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
}
.quiz-page .tw-opt:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.45);
}
.quiz-page .tw-opt.correct {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10B981;
}
.quiz-page .tw-opt.wrong {
  background: rgba(239, 68, 68, 0.2);
  border-color: #EF4444;
  color: rgba(255, 255, 255, 0.7);
}
.quiz-page .tw-opt:disabled { cursor: default; }
.quiz-page .tw-explanation {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
  display: none;
}
.quiz-page .tw-explanation.show { display: block; }
.quiz-page .tw-next {
  margin-top: 14px;
  display: none;
  font-size: 13px;
  font-weight: 800;
  padding: 9px 22px;
  border-radius: 10px;
}
.quiz-page .tw-next.show { display: inline-flex; align-items: center; gap: 6px; }
.quiz-page .tw-empty {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 600;
}

.quiz-page .quiz-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.quiz-page .quiz-card {
  background: var(--white);
  border: 1.5px solid var(--qborder);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.28s cubic-bezier(0.22, 0.68, 0, 1.2);
  text-decoration: none;
  color: inherit;
}
.quiz-page .quiz-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 36px rgba(124, 58, 237, 0.14);
  border-color: transparent;
  color: inherit;
}
.quiz-page .qc-top { height: 6px; }
.quiz-page .qc-emoji-wrap {
  padding: 22px 20px 0;
  font-size: 2.2rem;
  line-height: 1;
}
.quiz-page .qc-body {
  padding: 12px 20px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.quiz-page .qc-cat {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 7px;
}
.quiz-page .qc-title {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.35;
  margin-bottom: 8px;
  flex: 1;
}
.quiz-page .qc-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}
.quiz-page .diff-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 6px;
}
.quiz-page .diff-easy { background: rgba(16, 185, 129, 0.12); color: #059669; }
.quiz-page .diff-medium { background: rgba(245, 158, 11, 0.12); color: #B45309; }
.quiz-page .diff-hard { background: rgba(239, 68, 68, 0.12); color: #DC2626; }
.quiz-page .qc-time,
.quiz-page .qc-qs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.quiz-page .qc-time svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.quiz-page .qc-foot {
  padding: 12px 20px 14px;
  border-top: 1px solid var(--qborder);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.quiz-page .qc-plays {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.quiz-page .qc-plays svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.quiz-page .qc-start {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 800;
  color: var(--qp);
}
.quiz-page .qc-start svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
}

.quiz-page .cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.quiz-page .cat-card {
  background: var(--white);
  border: 1.5px solid var(--qborder);
  border-radius: 16px;
  padding: 20px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  transition: all 0.24s;
  color: inherit;
}
.quiz-page .cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.12);
  border-color: transparent;
  color: inherit;
}
.quiz-page .cat-emoji {
  font-size: 2rem;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quiz-page .cat-info h3 {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 2px;
}
.quiz-page .cat-info span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.quiz-page .lb-card {
  background: linear-gradient(135deg, #EFF6FF 0%, #EDE9FE 100%);
  border: 1.5px solid var(--qborder);
  border-radius: 20px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.quiz-page .lb-left h2 {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 4px;
}
.quiz-page .lb-left p { font-size: 13.5px; color: var(--muted); }
.quiz-page .btn-lb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--qp);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 22px;
  border-radius: 12px;
  text-decoration: none;
}
.quiz-page .btn-lb:hover { background: var(--qv); color: #fff; }

.quiz-page .empty-block {
  text-align: center;
  padding: 40px 20px;
  background: var(--white);
  border: 1.5px solid var(--qborder);
  border-radius: 18px;
  color: var(--muted);
  font-size: 14px;
}

/* List page */
.quiz-page .page-hero {
  padding: 100px 5% 30px;
  background: linear-gradient(135deg, #F5F3FF 0%, #EFF6FF 100%);
  border-bottom: 1.5px solid var(--qborder);
  text-align: center;
  position: relative;
}
.quiz-page .page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 300px at 80% 50%, rgba(124, 58, 237, 0.07) 0%, transparent 70%);
  pointer-events: none;
}
.quiz-page .page-hero > * { position: relative; z-index: 1; }
.quiz-page .hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(124, 58, 237, 0.08);
  border: 1.5px solid rgba(124, 58, 237, 0.18);
  border-radius: 50px;
  padding: 4px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--qp);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
}
.quiz-page .page-hero h1 {
  font-family: var(--font-body);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 8px;
}
.quiz-page .page-hero h1 span {
  background: linear-gradient(135deg, #7C3AED, #EC4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.quiz-page .page-hero p {
  font-size: 14px;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto;
}

.quiz-page .toolbar-wrap {
  background: var(--white);
  border-bottom: 1.5px solid var(--qborder);
  position: sticky;
  top: 64px;
  z-index: 100;
  padding: 0 5%;
}
.quiz-page .toolbar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}
.quiz-page .filter-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 2;
  min-width: 0;
  background: var(--qbg);
  border: 1.5px solid var(--qborder);
  border-radius: 11px;
  padding: 0 14px;
  height: 42px;
}
.quiz-page .filter-search:focus-within {
  border-color: var(--qp);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}
.quiz-page .filter-search svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  flex-shrink: 0;
}
.quiz-page .filter-search input {
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
  width: 100%;
}
.quiz-page .filter-select {
  height: 42px;
  padding: 0 12px;
  border-radius: 11px;
  border: 1.5px solid var(--qborder);
  background: var(--qbg);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  flex: 1;
  min-width: 0;
}
.quiz-page .filter-select:focus { border-color: var(--qp); }
.quiz-page .timed-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--qbg);
  border: 1.5px solid var(--qborder);
  border-radius: 11px;
  padding: 0 14px;
  height: 42px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
  white-space: nowrap;
}
.quiz-page .timed-toggle.active {
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.3);
  color: var(--qp);
}
.quiz-page .timed-toggle svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.quiz-page .quiz-list-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 5%;
}
.quiz-page .results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 14px;
}
.quiz-page .results-count {
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 600;
}
.quiz-page .results-count strong { color: var(--navy); }

.quiz-page .quiz-grid--list {
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}
.quiz-page .quiz-card.hidden-card { display: none; }
.quiz-page .quiz-grid--list .quiz-card { border-radius: 20px; }
.quiz-page .qc-header {
  padding: 20px 20px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.quiz-page .qc-emoji { font-size: 2.4rem; line-height: 1; }
.quiz-page .qc-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}
.quiz-page .timed-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--qp);
  background: rgba(124, 58, 237, 0.1);
  padding: 3px 9px;
  border-radius: 6px;
}
.quiz-page .timed-badge svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.quiz-page .quiz-grid--list .qc-body { padding: 10px 20px 0; }
.quiz-page .qc-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}
.quiz-page .qc-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-top: 1px solid var(--qborder);
}
.quiz-page .qc-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.quiz-page .qc-stat svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.quiz-page .quiz-grid--list .qc-foot {
  padding: 12px 20px 16px;
  border-top: none;
}
.quiz-page .btn-play-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #7C3AED, #8B5CF6);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 10px;
}
.quiz-page .btn-play-sm:hover { color: #fff; }

.quiz-page .empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--white);
  border: 1.5px solid var(--qborder);
  border-radius: 18px;
  display: none;
  margin-bottom: 40px;
}
.quiz-page .empty-state.show { display: block; }
.quiz-page .empty-icon { font-size: 46px; margin-bottom: 14px; }
.quiz-page .empty-state h3 {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 6px;
}
.quiz-page .empty-state p { font-size: 14px; color: var(--muted); }

.quiz-page .quiz-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 14px;
}
.quiz-page .quiz-breadcrumb a {
  color: var(--qp);
  text-decoration: none;
}
.quiz-page .quiz-breadcrumb a:hover { color: var(--qv); }
.quiz-page .quiz-hub-actions {
  margin-top: 28px;
  display: flex;
  justify-content: center;
}

.quiz-page .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.quiz-page .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .quiz-page .quiz-grid,
  .quiz-page .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .quiz-page .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .quiz-page .quiz-grid--list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .quiz-page .toolbar { flex-wrap: wrap; }
  .quiz-page .filter-search { flex: 1 1 100%; }
  .quiz-page .filter-select { flex: 1 1 calc(50% - 5px); }
  .quiz-page .timed-toggle { flex: 1 1 100%; justify-content: center; }
}
@media (max-width: 560px) {
  .quiz-page .tw-options { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .quiz-page .quiz-grid--list { grid-template-columns: 1fr; }
}
@media (max-width: 360px) {
  .quiz-page .quiz-grid,
  .quiz-page .cat-grid { grid-template-columns: 1fr; }
}

/* ── DETAIL / PLAY ── */
.quiz-page #infoScreen { display: block; }
.quiz-page #playScreen { display: none; }
.quiz-page .detail-breadcrumb {
  padding: 24px 5% 0;
  max-width: 1100px;
  margin: 0 auto;
}
.quiz-page .detail-breadcrumb-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}
.quiz-page .detail-breadcrumb-inner a {
  color: var(--muted);
  text-decoration: none;
}
.quiz-page .detail-breadcrumb-inner a:hover { color: var(--qp); }
.quiz-page .info-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 5% 60px;
}
.quiz-page .info-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}
.quiz-page .quiz-info-card {
  background: var(--white);
  border: 1.5px solid var(--qborder);
  border-radius: 22px;
  overflow: hidden;
}
.quiz-page .qic-banner { height: 8px; }
.quiz-page .qic-body { padding: 28px 30px; }
.quiz-page .qic-top {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}
.quiz-page .qic-emoji { font-size: 3.5rem; line-height: 1; flex-shrink: 0; }
.quiz-page .qic-cat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.quiz-page .qic-cat {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.quiz-page .featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--qp);
  background: rgba(124, 58, 237, 0.1);
  padding: 3px 10px;
  border-radius: 6px;
}
.quiz-page .qic-title {
  font-family: var(--font-body);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 6px;
}
.quiz-page .qic-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}
.quiz-page .detail-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 22px 0;
}
.quiz-page .stat-pill {
  background: var(--qbg);
  border: 1.5px solid var(--qborder);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: center;
}
.quiz-page .stat-pill .sn {
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--navy);
  display: block;
  line-height: 1;
}
.quiz-page .stat-pill .sl {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 3px;
  display: block;
}
.quiz-page .rules-box {
  background: var(--qbg);
  border: 1.5px solid var(--qborder);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 22px;
}
.quiz-page .rules-box h3 {
  font-size: 13px;
  font-weight: 800;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.quiz-page .rule-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13.5px;
  color: var(--text);
}
.quiz-page .rule-item:last-child { margin-bottom: 0; }
.quiz-page .rule-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  background: rgba(124, 58, 237, 0.1);
}
.quiz-page .btn-start {
  width: 100%;
  background: linear-gradient(135deg, #F97316, #F59E0B);
  color: #fff;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 900;
  padding: 15px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(249, 115, 22, 0.3);
}
.quiz-page .btn-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(249, 115, 22, 0.4);
}
.quiz-page .side-card {
  background: var(--white);
  border: 1.5px solid var(--qborder);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 18px;
}
.quiz-page .sc-head {
  padding: 13px 18px;
  border-bottom: 1px solid var(--qborder);
}
.quiz-page .sc-head h2 {
  font-size: 12px;
  font-weight: 800;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.quiz-page .sc-body { padding: 14px 18px; }
.quiz-page .detail-lb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--qborder);
}
.quiz-page .detail-lb-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.quiz-page .detail-lb-rank {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  background: var(--qbg);
  color: var(--muted);
  border: 1.5px solid var(--qborder);
}
.quiz-page .detail-lb-rank.r1 { background: linear-gradient(135deg, #F59E0B, #F97316); color: #fff; border: none; }
.quiz-page .detail-lb-rank.r2 { background: linear-gradient(135deg, #94A3B8, #CBD5E1); color: #fff; border: none; }
.quiz-page .detail-lb-rank.r3 { background: linear-gradient(135deg, #B45309, #D97706); color: #fff; border: none; }
.quiz-page .detail-lb-info { flex: 1; min-width: 0; }
.quiz-page .detail-lb-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quiz-page .detail-lb-sub { font-size: 11.5px; color: var(--muted); }
.quiz-page .detail-lb-pct { font-size: 14px; font-weight: 800; color: var(--qp); }
.quiz-page .related-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 1px solid var(--qborder);
  color: inherit;
}
.quiz-page .related-link:last-child { border-bottom: none; }
.quiz-page .play-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 22px 5% 60px;
}
.quiz-page .quiz-topbar {
  background: var(--white);
  border: 1.5px solid var(--qborder);
  border-radius: 16px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.quiz-page .q-counter {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 800;
  color: var(--navy);
}
.quiz-page .q-counter span { color: var(--qp); }
.quiz-page .timer-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 900;
  color: var(--navy);
}
.quiz-page .timer-wrap svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.quiz-page .timer-wrap.urgent {
  color: var(--qred);
  animation: quiz-timer-pulse 0.8s infinite;
}
@keyframes quiz-timer-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.quiz-page .score-display {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 800;
  color: var(--qgreen);
}
.quiz-page .progress-bar-wrap {
  height: 8px;
  background: var(--qborder);
  border-radius: 50px;
  overflow: hidden;
  margin-bottom: 24px;
}
.quiz-page .progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #7C3AED, #EC4899);
  border-radius: 50px;
  transition: width 0.4s ease;
}
.quiz-page .question-card {
  background: var(--white);
  border: 1.5px solid var(--qborder);
  border-radius: 22px;
  padding: 30px;
  margin-bottom: 18px;
}
.quiz-page .q-num-badge {
  display: inline-block;
  background: rgba(124, 58, 237, 0.1);
  color: var(--qp);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: 6px;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}
.quiz-page .q-text {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.2vw, 1.22rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.45;
  margin-bottom: 6px;
}
.quiz-page .q-type-note {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 20px;
}
.quiz-page .options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.quiz-page .opt-btn {
  background: var(--qbg);
  border: 2px solid var(--qborder);
  border-radius: 14px;
  padding: 14px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
}
.quiz-page .opt-btn:hover:not(:disabled) {
  border-color: var(--qp);
  background: rgba(124, 58, 237, 0.06);
}
.quiz-page .opt-btn.selected-correct {
  border-color: var(--qgreen);
  background: rgba(16, 185, 129, 0.1);
  color: #065F46;
}
.quiz-page .opt-btn.selected-wrong {
  border-color: var(--qred);
  background: rgba(239, 68, 68, 0.08);
  color: #991B1B;
}
.quiz-page .opt-btn.show-correct {
  border-color: var(--qgreen);
  background: rgba(16, 185, 129, 0.07);
}
.quiz-page .opt-btn:disabled { cursor: default; }
.quiz-page .opt-letter {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.1);
  color: var(--qp);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.quiz-page .opt-btn.selected-correct .opt-letter,
.quiz-page .opt-btn.show-correct .opt-letter {
  background: var(--qgreen);
  color: #fff;
}
.quiz-page .opt-btn.selected-wrong .opt-letter {
  background: var(--qred);
  color: #fff;
}
.quiz-page .exp-box {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.06), rgba(236, 72, 153, 0.04));
  border: 1.5px solid rgba(124, 58, 237, 0.18);
  border-radius: 14px;
  padding: 16px 18px;
  display: none;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.65;
}
.quiz-page .exp-box.show { display: block; }
.quiz-page .exp-box strong { color: var(--qp); }
.quiz-page .q-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}
.quiz-page .btn-next {
  background: linear-gradient(135deg, #7C3AED, #8B5CF6);
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 900;
  padding: 11px 28px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: none;
}
.quiz-page .btn-next.show { display: block; }
.quiz-page .btn-skip {
  background: transparent;
  border: 1.5px solid var(--qborder);
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 11px;
  cursor: pointer;
  display: none;
}
.quiz-page .btn-skip.show { display: block; }

/* ── LEADERBOARD ── */
.quiz-page .lb-hero {
  padding: 40px 5% 36px;
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF9EE 40%, #FFF8F0 70%, #FFF5EB 100%);
  border-bottom: 1.5px solid #FDE68A;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.quiz-page .lb-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 580px;
  margin: 0 auto;
}
.quiz-page .lb-hero h1 {
  font-family: var(--font-body);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 8px;
}
.quiz-page .lb-hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, #F59E0B, #F97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.quiz-page .lb-hero p {
  font-size: 14px;
  color: var(--muted);
  max-width: 420px;
  margin: 0 auto;
}
.quiz-page .my-stats {
  max-width: 1100px;
  margin: 30px auto 0;
  padding: 0 5%;
}
.quiz-page .my-stats-card {
  background: linear-gradient(135deg, #EDE9FE 0%, #E0F2FE 100%);
  border: 1.5px solid var(--qborder);
  border-radius: 18px;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.quiz-page .ms-left { display: flex; align-items: center; gap: 14px; }
.quiz-page .ms-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7C3AED, #8B5CF6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}
.quiz-page .ms-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 2px;
}
.quiz-page .ms-sub { font-size: 12.5px; color: var(--muted); }
.quiz-page .ms-stats { display: flex; gap: 20px; flex-wrap: wrap; }
.quiz-page .ms-stat { text-align: center; }
.quiz-page .ms-stat .mn {
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--navy);
  display: block;
  line-height: 1;
}
.quiz-page .ms-stat .ml {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 3px;
}
.quiz-page .btn-play-quiz {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #7C3AED, #8B5CF6);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 22px;
  border-radius: 12px;
  text-decoration: none;
}
.quiz-page .podium-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 5% 0;
}
.quiz-page .podium-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  margin-bottom: 36px;
}
.quiz-page .podium-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 120px;
}
.quiz-page .p-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  position: relative;
  margin-bottom: 10px;
}
.quiz-page .p-avatar.av1 {
  background: linear-gradient(135deg, #F59E0B, #F97316);
  width: 76px;
  height: 76px;
  font-size: 26px;
}
.quiz-page .p-avatar.av2 { background: linear-gradient(135deg, #94A3B8, #CBD5E1); }
.quiz-page .p-avatar.av3 { background: linear-gradient(135deg, #B45309, #D97706); }
.quiz-page .p-crown { position: absolute; top: -16px; font-size: 22px; }
.quiz-page .p-medal {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: #fff;
  position: absolute;
  bottom: -4px;
  right: -4px;
}
.quiz-page .p-medal.m1 { background: linear-gradient(135deg, #F59E0B, #F97316); }
.quiz-page .p-medal.m2 { background: linear-gradient(135deg, #94A3B8, #CBD5E1); }
.quiz-page .p-medal.m3 { background: linear-gradient(135deg, #B45309, #D97706); }
.quiz-page .p-name {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 2px;
  text-align: center;
}
.quiz-page .p-score {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 10px;
  text-align: center;
}
.quiz-page .p-block {
  border-radius: 16px 16px 0 0;
  width: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quiz-page .p-block.b1 {
  height: 100px;
  background: linear-gradient(180deg, #FEF3C7, #FDE68A);
  border: 2px solid #F59E0B;
}
.quiz-page .p-block.b2 {
  height: 72px;
  background: linear-gradient(180deg, #F1F5F9, #E2E8F0);
  border: 2px solid #94A3B8;
}
.quiz-page .p-block.b3 {
  height: 54px;
  background: linear-gradient(180deg, #FEF3C7 0%, #FEE0A6 100%);
  border: 2px solid #D97706;
}
.quiz-page .p-place {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 900;
  color: rgba(0, 0, 0, 0.25);
}
.quiz-page .lb-controls {
  max-width: 1100px;
  margin: 0 auto 20px;
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.quiz-page .lb-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.quiz-page .lb-tab {
  background: var(--white);
  border: 1.5px solid var(--qborder);
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
}
.quiz-page .lb-tab:hover { border-color: var(--qp); color: var(--qp); }
.quiz-page .lb-tab.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.quiz-page .lb-quiz-select {
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1.5px solid var(--qborder);
  background: var(--white);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}
.quiz-page .lb-table-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 5% 60px;
}
.quiz-page .lb-table {
  background: var(--white);
  border: 1.5px solid var(--qborder);
  border-radius: 18px;
  overflow: hidden;
}
.quiz-page .lb-table-header,
.quiz-page .lb-table-row {
  display: grid;
  grid-template-columns: 56px 1fr 120px 100px 100px 100px;
  gap: 0;
  padding: 14px 22px;
  align-items: center;
}
.quiz-page .lb-table-header {
  background: var(--qbg);
  border-bottom: 1.5px solid var(--qborder);
}
.quiz-page .lb-table-header span {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
}
.quiz-page .lb-table-row {
  border-bottom: 1px solid var(--qborder);
}
.quiz-page .lb-table-row:last-child { border-bottom: none; }
.quiz-page .lb-table-row.top3 { background: rgba(245, 158, 11, 0.04); }
.quiz-page .lb-table-row.is-you { background: rgba(124, 58, 237, 0.06); }
.quiz-page .rank-badge {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 900;
  background: var(--qbg);
  color: var(--muted);
  border: 1.5px solid var(--qborder);
}
.quiz-page .rank-badge.r1 { background: linear-gradient(135deg, #F59E0B, #F97316); color: #fff; border: none; }
.quiz-page .rank-badge.r2 { background: linear-gradient(135deg, #94A3B8, #CBD5E1); color: #fff; border: none; }
.quiz-page .rank-badge.r3 { background: linear-gradient(135deg, #B45309, #D97706); color: #fff; border: none; }
.quiz-page .player-cell { display: flex; align-items: center; gap: 11px; min-width: 0; }
.quiz-page .player-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}
.quiz-page .player-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}
.quiz-page .player-sub { font-size: 11.5px; color: var(--muted); }
.quiz-page .you-tag {
  display: inline-block;
  background: rgba(124, 58, 237, 0.1);
  color: var(--qp);
  font-size: 10px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 5px;
  margin-left: 6px;
  text-transform: uppercase;
}
.quiz-page .score-cell {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 900;
  color: var(--navy);
}
.quiz-page .pct-a { color: var(--qgreen); font-weight: 700; }
.quiz-page .pct-b { color: #0EA5E9; font-weight: 700; }
.quiz-page .pct-c { color: var(--qamber); font-weight: 700; }
.quiz-page .pct-f { color: var(--qred); font-weight: 700; }
.quiz-page .time-cell,
.quiz-page .date-cell {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

/* ── RESULT ── */
.quiz-page .result-hero {
  min-height: calc(100vh - 64px);
  padding: 48px 5% 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #1a0533 0%, #2d1068 35%, #1a1068 65%, #0d1a4d 100%);
  color: #fff;
}
.quiz-page .result-hero .hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 600px;
  width: 100%;
}
.quiz-page .grade-letter {
  font-family: var(--font-body);
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
}
.quiz-page .result-title {
  font-family: var(--font-body);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900;
  margin: 16px 0 8px;
}
.quiz-page .result-sub { opacity: 0.8; margin-bottom: 28px; }
.quiz-page .result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.quiz-page .result-stat {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 14px;
}
.quiz-page .result-stat .rn {
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-weight: 900;
  display: block;
}
.quiz-page .result-stat .rl {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.75;
  margin-top: 4px;
  display: block;
}
.quiz-page .result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.quiz-page .btn-result {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.quiz-page .btn-result-primary {
  background: linear-gradient(135deg, #7C3AED, #EC4899);
  color: #fff;
}
.quiz-page .btn-result-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
}
.quiz-page .result-missing {
  opacity: 0.9;
  margin-bottom: 20px;
}

@media (max-width: 860px) {
  .quiz-page .info-layout { grid-template-columns: 1fr; }
  .quiz-page .detail-stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .quiz-page .lb-table-header,
  .quiz-page .lb-table-row { grid-template-columns: 48px 1fr 90px 80px; }
  .quiz-page .time-cell,
  .quiz-page .date-cell { display: none; }
  .quiz-page .lb-table-header span:nth-child(5),
  .quiz-page .lb-table-header span:nth-child(6) { display: none; }
}
@media (max-width: 560px) {
  .quiz-page .options-grid { grid-template-columns: 1fr; }
  .quiz-page .p-block { width: 100px; }
  .quiz-page .result-stats { grid-template-columns: 1fr; }
  .quiz-page .lb-table-header,
  .quiz-page .lb-table-row { grid-template-columns: 44px 1fr 80px; }
  .quiz-page .lb-table-header span:nth-child(4),
  .quiz-page .score-cell { display: none; }
}

