/* ============================================================
   FANZONE-HUB.CSS — Additional hub page styles (Phase 2 Task 2.1)
   Builds on top of fanzone.css with interactive hub features.
   ============================================================ */

/* ─── ANIMATED HERO GRADIENT ───────────────────────────── */
.section--spotlight {
  position: relative;
  overflow: hidden;
}

.section--spotlight::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    ellipse at center,
    rgba(242, 183, 5, 0.06) 0%,
    transparent 50%
  );
  animation: hubGradient 12s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

.section--spotlight > .container {
  position: relative;
  z-index: 1;
}

@keyframes hubGradient {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  100% {
    transform: translate(10%, 5%) rotate(2deg);
  }
}

/* ─── COUNT-UP ANIMATION ───────────────────────────────── */
.fz-hero-stat-value {
  opacity: 0;
  animation: countUp 0.6s ease-out forwards;
}

.fz-hero-stat-value.fz-counted {
  opacity: 1;
  animation: none;
}

.fz-hero-stat:nth-child(1) .fz-hero-stat-value {
  animation-delay: 0.1s;
}
.fz-hero-stat:nth-child(2) .fz-hero-stat-value {
  animation-delay: 0.25s;
}
.fz-hero-stat:nth-child(3) .fz-hero-stat-value {
  animation-delay: 0.4s;
}
.fz-hero-stat:nth-child(4) .fz-hero-stat-value {
  animation-delay: 0.55s;
}

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

/* ─── FEATURED GAME CAROUSEL ──────────────────────────── */
.fz-featured-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg, 16px);
  margin-bottom: var(--space-lg, 1.5rem);
  min-height: 180px;
  background: var(--ink-2, #121a30);
  border: 1px solid var(--ink-line, #2a3a5c);
}

.fz-featured-track {
  display: flex;
  transition: transform 0.5s ease;
  height: 100%;
  min-height: 180px;
}

.fz-featured-slide {
  flex: 0 0 100%;
  min-width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-lg, 1.5rem);
  padding: var(--space-lg, 1.5rem) var(--space-xl, 2rem);
  position: relative;
  overflow: hidden;
}

.fz-featured-slide::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    ellipse at left,
    var(--slide-accent, var(--fwc-amber, #f2b705)) 0%,
    transparent 70%
  );
  opacity: 0.08;
  pointer-events: none;
}

.fz-featured-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--slide-accent, var(--fwc-amber, #f2b705));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--ink, #0a0f1e);
  z-index: 1;
}

.fz-featured-icon svg {
  width: 28px;
  height: 28px;
}

.fz-featured-text {
  flex: 1;
  z-index: 1;
}

.fz-featured-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted, #8a9bb8);
  margin-bottom: 4px;
}

.fz-featured-title {
  font-family: var(--font-display, "Montserrat", sans-serif);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 800;
  color: var(--slide-accent, var(--fwc-amber, #f2b705));
  margin-bottom: 4px;
}

.fz-featured-desc {
  font-size: 13px;
  color: var(--ink-text, #eef1fb);
  opacity: 0.8;
  line-height: 1.4;
  max-width: 400px;
}

.fz-featured-dots {
  position: absolute;
  bottom: 12px;
  right: 16px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.fz-featured-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-line, #2a3a5c);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  padding: 0;
}

.fz-featured-dot.active {
  background: var(--fwc-amber, #f2b705);
}

/* Mobile: stack vertically */
@media (max-width: 640px) {
  .fz-featured-slide {
    flex-direction: column;
    text-align: center;
    gap: var(--space-md, 1rem);
    padding: var(--space-md, 1rem);
  }

  .fz-featured-desc {
    max-width: 280px;
    margin: 0 auto;
  }
}

/* ─── 3D TILT ON GAME CARDS (desktop only) ─────────────── */
@media (min-width: 768px) and (hover: hover) {
  .fz-game-card {
    transform-style: preserve-3d;
    perspective: 600px;
  }

  .fz-game-card:hover {
    transform: translateY(-4px) rotateX(2deg);
    box-shadow:
      0 12px 30px rgba(0, 0, 0, 0.35),
      0 0 20px var(--card-accent, rgba(242, 183, 5, 0.15));
  }

  .fz-game-card:hover .fz-game-card-icon {
    transform: translateZ(20px);
    transition: transform 0.2s ease;
  }
}

/* ─── FEATURE PILLS — SCROLL-SNAP ON MOBILE ────────────── */
@media (max-width: 640px) {
  .fz-features-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: var(--space-sm, 0.75rem);
    padding-bottom: var(--space-sm, 0.75rem);
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .fz-features-grid::-webkit-scrollbar {
    display: none;
  }

  .fz-feature-card {
    flex: 0 0 140px;
    min-width: 140px;
    scroll-snap-align: start;
  }
}

/* ─── TOP PERFORMANCE CARD ──────────────────────────────── */
.fz-top-perf-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fz-top-perf-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--card-accent, #f2b705),
    rgba(242, 183, 5, 0.3),
    var(--card-accent, #f2b705)
  );
  background-size: 200% 100%;
}

.fz-top-perf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fz-top-perf-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md, 12px);
  background: color-mix(in srgb, var(--card-accent, #f2b705) 15%, transparent);
  border: 1px solid var(--card-accent, #f2b705);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--card-accent, #f2b705);
  flex-shrink: 0;
}

.fz-top-perf-icon svg {
  width: 20px;
  height: 20px;
}

.fz-top-perf-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-text, #eef1fb);
}

.fz-top-perf-desc {
  font-size: 13px;
  color: var(--ink-muted, #9aa3c4);
  line-height: 1.4;
}

.fz-top-perf-score {
  font-family: var(--font-mono, monospace);
  font-size: 15px;
  font-weight: 700;
  color: var(--card-accent, #f2b705);
}

/* ─── RETURN-TO-CARD HIGHLIGHT ────────────────────────── */
.fz-game-card.returned {
  animation: cardReturnPulse 1.5s ease-out;
}

@keyframes cardReturnPulse {
  0% {
    border-color: var(--card-accent, var(--fwc-amber, #f2b705));
    box-shadow: 0 0 20px var(--card-accent, rgba(242, 183, 5, 0.3));
  }
  100% {
    border-color: var(--ink-line, #2a3a5c);
    box-shadow: none;
  }
}

/* ─── REDUCED MOTION ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .section--spotlight::before,
  .fz-hero-stat-value,
  .fz-top-perf-card::before {
    animation: none !important;
  }

  .fz-featured-track {
    transition: none;
  }

  .fz-game-card:hover {
    transform: translateY(-4px);
  }
}
