/* ============================================================
   FANZONE-GAMES.CSS — Shared template for all Fan Zone game/feature pages
   Loaded by every page in fanzone/ directory
   ============================================================ */

/* ─── CSS CUSTOM PROPERTIES ─────────────────────────────── */
:root {
  /* Fan Zone game pages add one color not in main.css + page accent system */
  --fwc-purple: #a855f7;
  --page-accent: var(--fwc-amber);
  --page-accent-2: #f2b705;
  --page-accent-soft: rgba(242, 183, 5, 0.15);
}

/* ─── PAGE LAYOUT ───────────────────────────────────────── */
.fz-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--ink-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─── STICKY SUB-NAV ────────────────────────────────────── */
/* top offset matches the real rendered height of the main site
   header (.nav) — same fix applied on results.html — so the
   sub-nav sits directly below it instead of overlapping. */
.fz-subnav {
  position: sticky;
  top: 72.5px;
  z-index: 100;
  background: rgba(10, 15, 30, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ink-line);
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-height: 52px;
}

.fz-subnav::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--page-accent),
    var(--page-accent-2),
    var(--page-accent)
  );
  opacity: 0.7;
  pointer-events: none;
}

.fz-subnav-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--ink-text);
  opacity: 0.7;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition:
    color 0.2s,
    background 0.2s;
  min-height: 40px;
  touch-action: manipulation;
}

.fz-subnav-back:hover {
  color: var(--ink-text);
  background: var(--ink-3);
}

.fz-subnav-back:active {
  transform: scale(0.96);
}

.fz-subnav-back svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.fz-subnav-title {
  font-family: var(--font-display);
  font-size: clamp(14px, 3vw, 18px);
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fz-subnav-title .accent {
  color: var(--page-accent);
}

.fz-subnav-score {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--page-accent);
  background: var(--page-accent-soft);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  display: none;
}

.fz-subnav-score.visible {
  display: inline-block;
}

.fz-subnav-level {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-text);
  opacity: 0.7;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.fz-subnav-level .lvl-badge {
  background: linear-gradient(135deg, var(--page-accent), var(--page-accent-2));
  color: var(--ink, #0b0f1e);
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  box-shadow: 0 2px 8px var(--page-accent-soft);
}

@media (min-width: 640px) {
  .fz-subnav-score.visible {
    display: inline-block;
  }
  .fz-subnav-level {
    margin-left: 0;
  }
}

/* ─── HERO SECTION ──────────────────────────────────────── */
.fz-hero {
  padding: var(--space-xxl) var(--space-md) var(--space-xl);
  text-align: center;
  background: linear-gradient(180deg, var(--ink-2) 0%, var(--ink) 100%);
  position: relative;
  overflow: hidden;
}

/* Top gradient strip — more visible */
.fz-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--page-accent),
    var(--page-accent-2),
    var(--page-accent),
    transparent
  );
  opacity: 1;
  z-index: 2;
}

/* Dramatic radial glow behind hero content using both nation colors */
.fz-hero::after {
  content: "";
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  max-width: 120%;
  height: 120%;
  background:
    radial-gradient(
      ellipse 50% 60% at 50% 30%,
      var(--page-accent-soft) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 40% 50% at 30% 50%,
      color-mix(in srgb, var(--page-accent-2) 12%, transparent) 0%,
      transparent 60%
    );
  pointer-events: none;
  z-index: 0;
}

.fz-hero > * {
  position: relative;
  z-index: 1;
}

.fz-hero-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--page-accent);
  background: var(--page-accent-soft);
  border: 1px solid var(--page-accent);
  border-radius: 999px;
  padding: 5px 16px;
  margin-bottom: var(--space-sm);
  font-weight: 700;
}

.fz-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--page-accent), var(--page-accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 var(--space-sm);
}

.fz-hero-desc {
  font-size: clamp(14px, 2vw, 16px);
  color: var(--ink-text);
  opacity: 0.75;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ─── MAIN CONTENT AREA ─────────────────────────────────── */
.fz-main {
  flex: 1;
  padding: var(--space-md);
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.fz-main--narrow {
  max-width: 600px;
}

.fz-main--wide {
  max-width: 1200px;
}

@media (min-width: 768px) {
  .fz-main {
    padding: var(--space-lg);
  }
}

/* ─── BUTTONS ───────────────────────────────────────────── */
.fz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: 48px;
  min-width: 48px;
  padding: var(--space-sm) var(--space-lg);
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  touch-action: manipulation;
  text-decoration: none;
  line-height: 1.4;
}

.fz-btn:active {
  transform: scale(0.97);
}

.fz-btn-primary {
  background: linear-gradient(135deg, var(--page-accent), var(--page-accent-2));
  color: var(--ink);
  border-color: var(--page-accent);
  font-weight: 700;
  box-shadow: 0 2px 12px var(--page-accent-soft);
}

.fz-btn-primary:hover {
  filter: brightness(1.15);
  box-shadow:
    0 4px 24px var(--page-accent-soft),
    0 0 0 1px var(--page-accent);
}

.fz-btn-secondary {
  background: var(--ink-3);
  color: var(--ink-text);
  border-color: var(--ink-line);
}

.fz-btn-secondary:hover {
  border-color: var(--page-accent);
  background: var(--page-accent-soft);
  color: var(--page-accent);
}

.fz-btn-ghost {
  background: transparent;
  color: var(--ink-text);
  opacity: 0.7;
  border-color: var(--ink-line);
}

.fz-btn-ghost:hover {
  color: var(--ink-text);
  border-color: var(--page-accent);
}

.fz-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.fz-btn-block {
  display: flex;
  width: 100%;
}

.fz-btn-sm {
  min-height: 36px;
  padding: var(--space-xs) var(--space-md);
  font-size: 14px;
}

/* ─── CARDS ─────────────────────────────────────────────── */
.fz-card {
  background: var(--ink-2);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  transition:
    border-color 0.25s,
    box-shadow 0.25s;
}

.fz-card--accent {
  border-color: var(--page-accent);
  box-shadow:
    0 0 0 1px var(--page-accent-soft),
    0 4px 20px var(--page-accent-soft);
  background: linear-gradient(
    135deg,
    var(--ink-2),
    color-mix(in srgb, var(--page-accent-soft) 40%, var(--ink-2))
  );
}

.fz-card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 var(--space-sm);
  color: var(--page-accent);
}

.fz-card-desc {
  color: var(--ink-text);
  opacity: 0.7;
  font-size: 14px;
  line-height: 1.5;
}

/* ─── INPUTS ────────────────────────────────────────────── */
.fz-input {
  width: 100%;
  min-height: 48px;
  padding: var(--space-sm) var(--space-md);
  font-size: 16px; /* prevents iOS zoom */
  font-family: var(--font-body);
  background: var(--ink-3);
  color: var(--ink-text);
  border: 2px solid var(--ink-line);
  border-radius: var(--radius-md);
  transition: border-color 0.2s;
}

.fz-input:focus {
  outline: none;
  border-color: var(--page-accent);
}

.fz-input::placeholder {
  color: var(--ink-text);
  opacity: 0.7;
}

/* ─── BADGES ────────────────────────────────────────────── */
.fz-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px var(--space-sm);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.fz-badge--gold {
  background: rgba(242, 183, 5, 0.15);
  color: var(--fwc-amber);
  border: 1px solid rgba(242, 183, 5, 0.3);
}

.fz-badge--green {
  background: rgba(43, 207, 156, 0.15);
  color: var(--fwc-green);
  border: 1px solid rgba(43, 207, 156, 0.3);
}

.fz-badge--red {
  background: rgba(239, 67, 96, 0.15);
  color: var(--fwc-red);
  border: 1px solid rgba(239, 67, 96, 0.3);
}

.fz-badge--blue {
  background: rgba(76, 201, 240, 0.15);
  color: var(--fwc-blue);
  border: 1px solid rgba(76, 201, 240, 0.3);
}

.fz-badge--purple {
  background: rgba(168, 85, 247, 0.15);
  color: var(--fwc-purple);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

/* ─── TOAST SYSTEM ─────────────────────────────────────── */
.fz-toast-container {
  position: fixed;
  top: 120px; /* below main nav + subnav */
  right: var(--space-md);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: calc(100vw - 32px);
  pointer-events: none;
}

.fz-toast {
  padding: var(--space-sm) var(--space-md);
  background: var(--ink-2);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  animation: fz-slideIn 0.3s ease;
  max-width: 320px;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.fz-toast.removing {
  animation: fz-slideOut 0.3s ease forwards;
}

.fz-toast--xp {
  border-left: 4px solid var(--fwc-amber);
}

.fz-toast--achievement {
  border-left: 4px solid var(--fwc-purple);
}

.fz-toast--info {
  border-left: 4px solid var(--fwc-blue);
}

.fz-toast--error {
  border-left: 4px solid var(--fwc-red);
}

.fz-toast-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.fz-toast-text {
  font-size: 14px;
  line-height: 1.4;
}

.fz-toast-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 13px;
}

.fz-toast-text span {
  color: var(--ink-text);
  opacity: 0.7;
  font-size: 12px;
}

/* ─── MODAL ─────────────────────────────────────────────── */
.fz-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  animation: fz-fadeIn 0.2s ease;
}

.fz-modal {
  background: var(--ink-2);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  max-width: 480px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  animation: fz-scaleIn 0.2s ease;
  position: relative;
}

.fz-modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: none;
  border: none;
  color: var(--ink-text);
  opacity: 0.7;
  cursor: pointer;
  font-size: 20px;
  padding: var(--space-xs);
  min-width: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition:
    color 0.2s,
    background 0.2s;
}

.fz-modal-close:hover {
  color: var(--ink-text);
  background: var(--ink-3);
}

.fz-modal h2 {
  font-family: var(--font-display);
  font-size: 20px;
  margin: 0 0 var(--space-sm);
}

/* ─── SKELETON LOADING ──────────────────────────────────── */
.fz-skeleton {
  background: linear-gradient(
    90deg,
    var(--ink-2) 25%,
    var(--ink-3) 50%,
    var(--ink-2) 75%
  );
  background-size: 200% 100%;
  animation: fz-shimmer 1.5s infinite;
  border-radius: var(--radius-md);
  min-height: 48px;
}

/* ─── EMPTY STATE ───────────────────────────────────────── */
.fz-empty-state {
  text-align: center;
  padding: var(--space-xxl) var(--space-md);
  color: var(--ink-text);
  opacity: 0.7;
}

.fz-empty-state svg {
  width: 48px;
  height: 48px;
  opacity: 0.3;
  margin-bottom: var(--space-md);
}

.fz-empty-state-text {
  font-size: 14px;
  line-height: 1.5;
}

/* ─── PROGRESS BAR ─────────────────────────────────────── */
.fz-progress {
  width: 100%;
  height: 8px;
  background: var(--ink-3);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.fz-progress-fill {
  height: 100%;
  background: var(--page-accent);
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

/* ─── ANIMATIONS ────────────────────────────────────────── */
@keyframes fz-fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fz-fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fz-slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fz-slideOut {
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

@keyframes fz-scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fz-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@keyframes fz-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes fz-countUp {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes fz-confetti {
  0% {
    transform: translateY(0) rotate(0);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

@keyframes fz-flipCard {
  from {
    transform: rotateY(0);
  }
  to {
    transform: rotateY(180deg);
  }
}

@keyframes fz-barGrow {
  from {
    width: 0;
  }
}

/* ─── UTILITY CLASSES ───────────────────────────────────── */
.fz-fade-in-up {
  animation: fz-fadeInUp 0.4s ease both;
}

.fz-text-center {
  text-align: center;
}
.fz-text-left {
  text-align: left;
}
.fz-mt-sm {
  margin-top: var(--space-sm);
}
.fz-mt-md {
  margin-top: var(--space-md);
}
.fz-mt-lg {
  margin-top: var(--space-lg);
}
.fz-mb-sm {
  margin-bottom: var(--space-sm);
}
.fz-mb-md {
  margin-bottom: var(--space-md);
}
.fz-mb-lg {
  margin-bottom: var(--space-lg);
}
.fz-hidden {
  display: none !important;
}
.fz-flex {
  display: flex;
}
.fz-flex-col {
  flex-direction: column;
}
.fz-items-center {
  align-items: center;
}
.fz-justify-center {
  justify-content: center;
}
.fz-justify-between {
  justify-content: space-between;
}
.fz-gap-sm {
  gap: var(--space-sm);
}
.fz-gap-md {
  gap: var(--space-md);
}
.fz-gap-lg {
  gap: var(--space-lg);
}
.fz-w-full {
  width: 100%;
}
.fz-grid {
  display: grid;
}
.fz-grid-2 {
  grid-template-columns: 1fr;
  gap: var(--space-md);
}
.fz-grid-3 {
  grid-template-columns: 1fr;
  gap: var(--space-md);
}
.fz-grid-4 {
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

@media (min-width: 640px) {
  .fz-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .fz-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .fz-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .fz-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .fz-grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ─── REDUCED MOTION ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ─── SCROLL BEHAVIOR ───────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

:target {
  scroll-margin-top: 60px;
}

/* ─── SELECTION ─────────────────────────────────────────── */
::selection {
  background: var(--page-accent-soft);
  color: var(--page-accent);
}

/* ─── SCROLLBAR (desktop only) ──────────────────────────── */
@media (min-width: 768px) {
  ::-webkit-scrollbar {
    width: 8px;
  }
  ::-webkit-scrollbar-track {
    background: var(--ink);
  }
  ::-webkit-scrollbar-thumb {
    background: var(--ink-3);
    border-radius: var(--radius-full);
  }
  ::-webkit-scrollbar-thumb:hover {
    background: var(--page-accent-2);
  }
}

/* ============================================================
   ANIMATION KEYFRAMES (Phase 0 — Task 0.1 gap fill)
   ============================================================ */

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

@keyframes countUp {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

@keyframes flipCard {
  0% {
    transform: perspective(600px) rotateY(0deg);
  }
  100% {
    transform: perspective(600px) rotateY(180deg);
  }
}

@keyframes barGrow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

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

@keyframes confetti {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* ── Animation utility classes ── */
.fz-animate-in {
  animation: fadeInUp 0.3s ease-out;
}
.fz-animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}
.fz-animate-bar {
  transform-origin: left;
  animation: barGrow 0.6s ease-out;
}

/* ── Skeleton loading ── */
.fz-skeleton {
  background: linear-gradient(
    90deg,
    var(--ink-3) 25%,
    var(--ink-2) 50%,
    var(--ink-3) 75%
  );
  background-size: 1000px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: var(--radius-sm);
}

/* ============================================================
   MISSING LAYOUT CLASSES (Phase 0 — Task 0.1 gap fill)
   ============================================================ */

.fz-sidebar {
  display: none;
  padding: 1rem;
  background: var(--ink-2);
  border-radius: var(--radius-md);
  border: 1px solid var(--ink-line);
}

@media (min-width: 768px) {
  .fz-main--with-sidebar {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.5rem;
  }

  .fz-sidebar {
    display: block;
    align-self: start;
    position: sticky;
    top: 4rem;
  }
}

.fz-footer {
  padding: 2rem 1rem;
  text-align: center;
  border-top: 1px solid var(--ink-line);
  background: var(--ink);
  color: var(--ink-text);
  opacity: 0.7;
  font-size: 0.85rem;
}

.fz-footer a {
  color: var(--fwc-amber);
  text-decoration: none;
}

.fz-footer a:hover {
  text-decoration: underline;
}

/* ── Breadcrumb ── */
.fz-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--ink-text);
  opacity: 0.6;
  margin-bottom: 1rem;
}

.fz-breadcrumb a {
  color: var(--fwc-amber);
  text-decoration: none;
}

.fz-breadcrumb a:hover {
  text-decoration: underline;
}

.fz-breadcrumb-sep {
  opacity: 0.5;
}

/* ── Progress indicator ── */
.fz-progress {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0.5rem 0;
}

.fz-progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-line);
  transition: background 0.2s;
}

.fz-progress-dot.active {
  background: var(--page-accent, var(--fwc-amber));
}

.fz-progress-dot.done {
  background: var(--fwc-green);
}

/* ── Safe area insets for notched devices ── */
.fz-subnav {
  padding-top: max(0.5rem, env(safe-area-inset-top));
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
}

/* ─── HEADING COLOR FIXES (v2) ─────────────────────────── */
/* Ensure all Fan Zone headings are readable on dark backgrounds */

.fz-section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  font-weight: 800;
  color: var(--fwc-amber);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  margin-bottom: var(--space-lg, 1.5rem);
  text-align: center;
  letter-spacing: -0.02em;
}

/* Daily challenge banner (box next to profile card) */
.fz-daily-banner {
  background: var(--ink-2, #121a30);
  border: 1px solid var(--ink-line, #2a3a5c);
  border-radius: 12px;
  padding: var(--space-md, 1rem);
}

.fz-daily-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm, 0.75rem);
  margin-bottom: var(--space-xs, 0.5rem);
}

.fz-daily-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-text, #eef1fb);
}

.fz-daily-desc {
  font-size: 13px;
  color: var(--ink-text, #eef1fb);
  opacity: 0.7;
  margin-bottom: var(--space-sm, 0.75rem);
}

.fz-daily-countdown {
  font-size: 11px;
  font-family: var(--font-mono, monospace);
  color: var(--ink-muted, #8a9bb8);
  margin-top: var(--space-xs, 0.5rem);
}

/* Feature card titles */
.fz-feature-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-text, #eef1fb);
  margin-bottom: var(--space-xs, 0.5rem);
}

.fz-feature-desc {
  font-size: 13px;
  color: var(--ink-text, #eef1fb);
  opacity: 0.65;
  line-height: 1.5;
  margin-bottom: var(--space-xs, 0.5rem);
}

.fz-feature-count {
  font-size: 12px;
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  color: var(--fwc-amber, #f2b705);
}

/* Game card themed hover + accent top bar */
.fz-game-card {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.25s,
    border-color 0.25s,
    box-shadow 0.25s;
}

.fz-game-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--page-accent), var(--page-accent-2));
  opacity: 0;
  transition: opacity 0.25s;
}

.fz-game-card:hover::before {
  opacity: 1;
}

.fz-game-card:hover,
.fz-game-card:focus-within {
  border-color: var(--page-accent);
  box-shadow:
    0 0 0 1px var(--page-accent-soft),
    0 8px 32px var(--page-accent-soft);
  transform: translateY(-3px);
}

/* Game card titles */
.fz-game-card-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-text, #eef1fb);
}

.fz-game-card-desc {
  font-size: 12px;
  color: var(--ink-text, #eef1fb);
  opacity: 0.6;
  line-height: 1.4;
}

.fz-game-card-score {
  font-size: 11px;
  font-family: var(--font-mono, monospace);
  font-weight: 600;
  color: var(--ink-muted, #8a9bb8);
}

.fz-game-card-score.none {
  color: var(--ink-muted, #8a9bb8);
  opacity: 0.5;
}

/* Profile card explicit colors */
.fz-profile-name {
  color: var(--ink-text, #eef1fb);
}

.fz-profile-stat-label {
  color: var(--ink-muted, #8a9bb8);
}

.fz-profile-stat-value {
  color: var(--fwc-amber, #f2b705);
}

/* ─── THEMED SECTION TITLES ─────────────────────────────── */
.fz-section-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--ink-text);
  margin-bottom: var(--space-md);
  padding-bottom: 10px;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(
      90deg,
      var(--page-accent),
      var(--page-accent-2),
      transparent
    )
    1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fz-section-title svg {
  width: 22px;
  height: 22px;
  color: var(--page-accent);
  flex-shrink: 0;
}

/* ─── STAT TILE (for My Stats page) ─────────────────────── */
.fz-stat-tile {
  background: var(--ink-2);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.25s,
    border-color 0.25s,
    box-shadow 0.25s;
}

.fz-stat-tile::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--page-accent), var(--page-accent-2));
  opacity: 0.8;
}

.fz-stat-tile:hover {
  transform: translateY(-2px);
  border-color: var(--page-accent);
  box-shadow: 0 4px 20px var(--page-accent-soft);
}

.fz-stat-tile-value {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--page-accent), var(--page-accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 4px;
}

.fz-stat-tile-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted, #9aa3c4);
  font-weight: 600;
}

.fz-stat-tile-sub {
  font-size: 12px;
  color: var(--ink-muted, #9aa3c4);
  margin-top: 4px;
}

/* ─── PROGRESS BAR (themed) ──────────────────────────────── */
.fz-progress {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.fz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--page-accent), var(--page-accent-2));
  border-radius: 999px;
  transition: width 0.6s ease;
  box-shadow: 0 0 8px var(--page-accent-soft);
}

.fz-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-family: var(--font-mono);
  margin-bottom: 6px;
}

.fz-progress-label-current {
  color: var(--page-accent);
  font-weight: 700;
}

.fz-progress-label-total {
  color: var(--ink-muted, #9aa3c4);
}

/* ─── GAME PERFORMANCE ROW ──────────────────────────────── */
.fz-game-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.fz-game-row:last-child {
  border-bottom: none;
}

.fz-game-row-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--page-accent-soft);
  border: 1px solid var(--page-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.fz-game-row-info {
  flex: 1;
  min-width: 0;
}

.fz-game-row-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--ink-text);
  margin-bottom: 2px;
}

.fz-game-row-stats {
  font-size: 12px;
  color: var(--ink-muted, #9aa3c4);
  font-family: var(--font-mono);
}

.fz-game-row-high {
  text-align: right;
  flex-shrink: 0;
}

.fz-game-row-high-val {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--page-accent);
  line-height: 1;
}

.fz-game-row-high-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted, #9aa3c4);
  font-family: var(--font-mono);
  margin-top: 2px;
}

/* ─── STAT GRID ──────────────────────────────────────────── */
.fz-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-md);
}

@media (max-width: 767px) {
  .fz-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Sub-nav header offset — mobile header renders taller (81px),
   matching the same breakpoint/value used on results.html. */
@media (max-width: 768px) {
  .fz-subnav {
    top: 81px;
  }
}

/* ─── BADGE GRID (achievements/cards summary) ────────────── */
.fz-badge-summary {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fz-badge-summary-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
}

.fz-badge-summary-icon.ach {
  background: var(--page-accent-soft);
  border: 1px solid var(--page-accent);
}

.fz-badge-summary-icon.cards {
  background: color-mix(in srgb, var(--page-accent-2) 15%, transparent);
  border: 1px solid var(--page-accent-2);
}

.fz-badge-summary-info {
  flex: 1;
}

.fz-badge-summary-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-text);
}

.fz-badge-summary-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted, #9aa3c4);
}
