/* ═══════════════════════════════════════════════════════════════════════
   Ilha dos Jogos — Design System & Stylesheet
   Paleta "Oceanic Sunset": Azul Oceano · Dourado Areia · Laranja Coral
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Google Fonts already preloaded in HTML ─────────────────────────── */

/* ── Design Tokens ─────────────────────────────────────────────────── */
:root {
  /* === Tropical Candy Core (now Oceanic Sunset) === */
  --c-forest: #003B73;
  --c-forest-dark: #02254A;
  --c-forest-light: #0066CC;
  --c-forest-pale: #E6F0FA;

  --c-mango: #FFD166;
  --c-mango-deep: #FFB800;
  --c-mango-pale: #FFF6D9;

  --c-cocoa: #F46036;
  --c-cocoa-mid: #E04A22;
  --c-cocoa-light: #FF8866;
  --c-cocoa-pale: #FADACF;

  /* === UI Surface === */
  --bg-base: #041628;
  --bg-surface: #082845;
  --bg-card: #0A3157;
  --bg-card-hover: #0D3A68;
  --bg-glass: rgba(10, 49, 87, 0.72);
  --bg-glass-blur: rgba(4, 22, 40, 0.85);
  --bg-modal: rgba(2, 11, 20, 0.92);

  /* === Semantic Colors === */
  --clr-primary: var(--c-forest-light);
  --clr-accent: var(--c-mango);
  --clr-accent2: var(--c-mango-deep);
  --clr-text: #F0F8FF;
  --clr-muted: #9FB6CD;
  --clr-border: rgba(0, 102, 204, 0.28);
  --clr-glow: rgba(255, 209, 102, 0.35);
  --clr-shadow: rgba(2, 11, 20, 0.6);

  /* === Typography === */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --fs-xs: 0.72rem;
  --fs-sm: 0.85rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
  --fs-3xl: 2.75rem;
  --fs-4xl: 3.5rem;

  /* === Spacing === */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* === Border Radius === */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-2xl: 32px;
  --r-full: 9999px;

  /* === Animation === */
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 160ms;
  --dur-mid: 300ms;
  --dur-slow: 500ms;

  /* === Header === */
  --header-height: 66px;
}

/* ── Reset & Base ───────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: #bae6fd;
  /* Light Poki blue */
  background-image:
    radial-gradient(circle at center, rgba(0, 102, 204, 0.1) 1.5px, transparent 1.5px),
    linear-gradient(to right, rgba(0, 102, 204, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 102, 204, 0.05) 1px, transparent 1px);
  background-size: 24px 24px, 48px 48px, 48px 48px;
  background-attachment: fixed;
  color: var(--clr-text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ⚪ Central Container Style (OJogos style) */
.central-container {
  background: #ffffff;
  color: #1a202c;
  max-width: 1400px;
  margin: 1.5rem auto 5rem;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
  animation: fadeIn 0.8s ease-out;
}

/* Inner Text Adjustments for White BG */
.central-container .section-title,
.central-container h1,
.central-container h2,
.central-container h3,
.central-container .player-title {
  color: #1a202c !important;
}

.central-container .section-title .title-icon {
  background: rgba(0, 0, 0, 0.05);
  padding: 8px;
  border-radius: 12px;
}

.central-container .load-btn-text,
.central-container .btn-outline {
  color: #2d3748;
  border-color: #cbd5e0;
}

.central-container .card-title {
  color: #2d3748 !important;
}

.central-container .card-category {
  color: #718096 !important;
}

.central-container p {
  color: #4a5568 !important;
}

/* Overrides for items inside central container */
.central-container .hero,
.central-container .section-alt {
  background: transparent !important;
}

.central-container .section-alt {
  background: #f8fafc !important;
  /* Slight tint for variety */
}


a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

ul,
ol {
  list-style: none;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-surface);
}

::-webkit-scrollbar-thumb {
  background: var(--c-forest);
  border-radius: var(--r-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--c-forest-light);
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--c-mango);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ── Container ────────────────────────────────────────────────────── */
.container {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* ── Utility ────────────────────────────────────────────────────── */
.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ═══════════════════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════════════════ */
.glass-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  /* Higher z-index */
  background: var(--bg-glass-blur);
  /* More solid background */
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--clr-border);
  box-shadow: 0 4px 20px var(--clr-shadow);
  /* Permanent shadow */
  transition: background var(--dur-mid) var(--ease-smooth),
    box-shadow var(--dur-mid) var(--ease-smooth);
}

.glass-nav.scrolled {
  background: var(--bg-glass-blur);
  box-shadow: 0 4px 32px var(--clr-shadow);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  height: 66px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.logo-icon {
  font-size: 1.5rem;
  animation: spin-slow 8s linear infinite;
}

.logo-text {
  color: var(--clr-text);
}

.logo-text em {
  color: var(--c-mango);
  font-style: normal;
}

@keyframes spin-slow {
  to {
    transform: rotate(360deg);
  }
}

/* Search */
.search-wrap {
  flex: 1;
  position: relative;
  max-width: 380px;
}

.search-wrap input {
  width: 100%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-full);
  padding: var(--space-2) var(--space-5) var(--space-2) var(--space-10);
  color: var(--clr-text);
  font-size: var(--fs-sm);
  transition: border-color var(--dur-fast), background var(--dur-fast), box-shadow var(--dur-fast);
}

.search-wrap input::placeholder {
  color: var(--clr-muted);
}

.search-wrap input:focus {
  border-color: var(--c-forest-light);
  background: rgba(255, 255, 255, 0.11);
  box-shadow: 0 0 0 3px rgba(64, 145, 108, 0.25);
  outline: none;
}

.search-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--fs-sm);
  pointer-events: none;
  opacity: 0.7;
}

/* Nav links & Mega Menu Dropdown */
.nav-links {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
  align-items: center;
}

.nav-link {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--clr-muted);
  transition: color var(--dur-fast), background var(--dur-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--clr-text);
  background: rgba(0, 102, 204, 0.2);
}

.nav-link.active {
  color: var(--c-mango);
}

.nav-dropdown-wrapper {
  position: relative;
}

.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 900px;
  max-width: 90vw;
  background: var(--bg-glass-blur);
  backdrop-filter: blur(20px);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-xl);
  box-shadow: 0 24px 64px var(--clr-shadow);
  display: flex;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-mid), transform var(--dur-mid), visibility var(--dur-mid);
  padding-top: 15px;
  /* Bridge for hover */
  margin-top: -15px;
  /* Offset bridge */
  z-index: 9999;
}

.nav-dropdown-wrapper:hover .mega-menu,
.nav-dropdown-wrapper:focus-within .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.mega-sidebar {
  width: 250px;
  background: var(--bg-surface);
  border-right: 1px solid var(--clr-border);
  padding: var(--space-4) 0;
  display: flex;
  flex-direction: column;
}

.mega-sidebar-link {
  padding: var(--space-3) var(--space-5);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--clr-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--dur-fast);
  cursor: pointer;
}

.mega-sidebar-link:hover,
.mega-sidebar-link.active {
  background: rgba(0, 102, 204, 0.15);
  color: var(--c-mango);
  border-right: 3px solid var(--c-mango);
}

.mega-content {
  flex: 1;
  padding: var(--space-6);
  background: var(--bg-base);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  /* 5 columns for 10 games */
  gap: var(--space-3);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  margin-left: auto;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: transform var(--dur-fast), opacity var(--dur-fast);
}

/* ═══════════════════════════════════════════════════════════════════
   HERO 3-COL REDESIGN
   ═══════════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  padding-top: 100px;
  /* spacing for fixed header */
  padding-bottom: var(--space-10);
  background:
    radial-gradient(ellipse 70% 60% at 50% 100%, rgba(0, 102, 204, 0.15) 0%, transparent 70%),
    var(--bg-base);
}

.hero-3col-grid {
  display: grid;
  grid-template-columns: 240px 1fr 240px;
  gap: var(--space-5);
}

@media (max-width: 1024px) {
  .hero-3col-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-pop {
    display: none;
  }

  /* Hide right col on smaller screens */
}

@media (max-width: 768px) {
  .hero-3col-grid {
    grid-template-columns: 1fr;
  }

  .hero-new {
    display: none;
  }
}

.hero-col h3 {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  color: var(--clr-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--clr-border);
}

/* Side Grids */
.hero-side-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

/* Small square card */
.mini-card {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  aspect-ratio: 1/1;
  background: var(--bg-card);
  cursor: pointer;
  border: 1px solid var(--clr-border);
  transition: transform var(--dur-fast), border-color var(--dur-fast);
}

.mini-card:hover {
  transform: translateY(-2px);
  border-color: var(--c-mango);
}

.mini-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-card-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.8), transparent);
  padding: var(--space-2);
  font-size: 0.65rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Featured Center Card */
.feat-banner {
  border-radius: var(--r-xl);
  overflow: hidden;
  position: relative;
  aspect-ratio: 16/9;
  box-shadow: 0 16px 48px var(--clr-shadow);
  border: 1px solid var(--clr-border);
  cursor: pointer;
  transition: transform var(--dur-mid), box-shadow var(--dur-mid);
}

.feat-banner:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 64px rgba(0, 102, 204, 0.4);
}

.feat-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feat-banner-content {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(4, 22, 40, 0.9) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: var(--space-6);
  text-align: center;
}

.feat-banner-logo {
  max-width: 60%;
  margin-bottom: var(--space-4);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.8));
}

.btn-play-hero {
  background: linear-gradient(135deg, var(--c-mango) 0%, var(--c-mango-deep) 100%);
  color: var(--bg-base);
  padding: var(--space-3) var(--space-8);
  border-radius: var(--r-full);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-md);
  box-shadow: 0 4px 16px rgba(255, 209, 102, 0.4);
  transition: transform var(--dur-bounce);
  text-transform: uppercase;
}

.feat-banner:hover .btn-play-hero {
  transform: scale(1.05);
}

/* ═══════════════════════════════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════════════════════════════ */
.section {
  padding: var(--space-16) 0;
}

.section-alt {
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-base) 100%);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
  gap: var(--space-4);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(var(--fs-xl), 3vw, var(--fs-2xl));
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.title-icon {
  font-size: 1.3em;
}

.see-all-link {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-mango);
  opacity: 0.85;
  transition: opacity var(--dur-fast);
}

.see-all-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ── Game Count Badge ─────────────────────────── */
.game-count-badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-4);
  background: rgba(249, 199, 79, 0.12);
  border: 1px solid rgba(249, 199, 79, 0.25);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--c-mango);
}

/* ── Search Banner ────────────────────────────── */
.search-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-5);
  background: rgba(249, 199, 79, 0.08);
  border: 1px solid rgba(249, 199, 79, 0.2);
  border-radius: var(--r-md);
  margin-bottom: var(--space-6);
  font-size: var(--fs-sm);
  color: var(--clr-muted);
}

.clear-search-btn {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--r-full);
  border: 1px solid rgba(249, 199, 79, 0.35);
  color: var(--c-mango);
  font-size: var(--fs-xs);
  font-weight: 600;
  transition: background var(--dur-fast);
}

.clear-search-btn:hover {
  background: rgba(249, 199, 79, 0.15);
}

/* ═══════════════════════════════════════════════════════════════════
   CATEGORY PILLS
   ═══════════════════════════════════════════════════════════════════ */
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--r-full);
  border: 1.5px solid var(--clr-border);
  font-size: var(--fs-sm);
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--clr-muted);
  background: rgba(255, 255, 255, 0.04);
  transition:
    color var(--dur-fast),
    background var(--dur-fast),
    border-color var(--dur-fast),
    transform var(--dur-fast) var(--ease-bounce),
    box-shadow var(--dur-fast);
}

.pill:hover {
  color: var(--clr-text);
  border-color: var(--c-forest-light);
  background: rgba(64, 145, 108, 0.12);
  transform: translateY(-2px);
}

.pill.active {
  background: linear-gradient(135deg, var(--c-mango) 0%, var(--c-mango-deep) 100%);
  border-color: transparent;
  color: var(--c-cocoa);
  box-shadow: 0 4px 16px rgba(249, 199, 79, 0.35);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════════
   GAME GRIDS
   ═══════════════════════════════════════════════════════════════════ */

/* Featured (horizontal scroll on mobile) */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-5);
}

/* Main grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-5);
}

/* ── Game Card ──────────────────────────────────────────────────── */
.game-card {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition:
    transform var(--dur-mid) var(--ease-bounce),
    box-shadow var(--dur-mid) var(--ease-smooth),
    border-color var(--dur-mid);
}

.game-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(249, 199, 79, 0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--dur-mid);
  pointer-events: none;
  border-radius: inherit;
}

.game-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 18px 48px rgba(13, 31, 20, 0.7), 0 0 0 1px rgba(249, 199, 79, 0.2);
  border-color: rgba(249, 199, 79, 0.3);
}

.game-card:hover::after {
  opacity: 1;
}

/* Thumbnail container / lazy loading */
.card-thumb-wrap {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--bg-surface);
  overflow: hidden;
}

.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-smooth), opacity 0.4s;
  opacity: 0;
}

.card-thumb.loaded {
  opacity: 1;
}

.card-thumb.errored {
  opacity: 0;
}

.game-card:hover .card-thumb {
  transform: scale(1.06);
}

/* Play overlay */
.card-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 31, 20, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--dur-mid);
}

.game-card:hover .card-play-overlay {
  opacity: 1;
}

.play-btn-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-mango) 0%, var(--c-mango-deep) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 20px rgba(249, 199, 79, 0.45);
  transform: scale(0.8);
  transition: transform var(--dur-mid) var(--ease-bounce);
  line-height: 1;
}

.game-card:hover .play-btn-circle {
  transform: scale(1);
}

/* Featured badge */
.card-featured-badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  background: linear-gradient(135deg, var(--c-mango) 0%, var(--c-mango-deep) 100%);
  color: var(--c-cocoa);
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 2px var(--space-3);
  border-radius: var(--r-full);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Thumb placeholder (lazy loading fallback icon) */
.thumb-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--clr-border);
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-surface) 100%);
}

/* Card body */
.card-body {
  padding: var(--space-4) var(--space-4) var(--space-5);
}

.card-category {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--c-forest-light);
  margin-bottom: var(--space-1);
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1.3;
  color: var(--clr-text);
  margin-bottom: var(--space-3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-clamp: 3;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-rating {
  font-size: var(--fs-xs);
  color: var(--c-mango);
  font-weight: 600;
}

.card-plays {
  font-size: var(--fs-xs);
  color: var(--clr-muted);
}

/* ── Skeleton Loader ────────────────────────────────────────────── */
.skeleton-card {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--clr-border);
}

.skeleton-thumb {
  aspect-ratio: 4/3;
  background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-card) 50%, var(--bg-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.skeleton-line {
  height: 12px;
  border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-card) 50%, var(--bg-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-line.short {
  width: 55%;
}

.skeleton-line.long {
  width: 90%;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ── Featured Card (larger) ─────────────────────────────────────── */
.featured-card .card-thumb-wrap {
  aspect-ratio: 16/9;
}

.featured-card .card-title {
  font-size: var(--fs-base);
}

/* ── Empty State ────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-6);
  animation: fadeIn 0.4s var(--ease-smooth);
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: var(--space-4);
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  margin-bottom: var(--space-3);
}

.empty-state p {
  color: var(--clr-muted);
  margin-bottom: var(--space-8);
}

/* ── Load More ──────────────────────────────────────────────────── */
.load-more-wrap {
  display: flex;
  justify-content: center;
  padding-top: var(--space-10);
}

.load-btn-spinner {
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ═══════════════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--bg-modal);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: fadeIn var(--dur-mid) var(--ease-smooth);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-container {
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  background: var(--bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp var(--dur-mid) var(--ease-bounce);
  box-shadow: 0 32px 80px rgba(13, 31, 20, 0.8), 0 0 0 1px rgba(249, 199, 79, 0.1);
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Modal header */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--clr-border);
  background: var(--bg-surface);
  gap: var(--space-4);
}

.modal-meta {
  flex: 1;
  min-width: 0;
}

.modal-badge {
  display: inline-block;
  padding: 2px var(--space-3);
  background: rgba(64, 145, 108, 0.2);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--c-forest-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-2);
}

.modal-game-title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-stats {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-1);
}

.modal-rating,
.modal-plays {
  font-size: var(--fs-xs);
  color: var(--clr-muted);
}

.modal-rating {
  color: var(--c-mango);
}

.modal-controls {
  display: flex;
  gap: var(--space-3);
  flex-shrink: 0;
}

.modal-ctrl-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--clr-border);
  color: var(--clr-muted);
  font-size: var(--fs-base);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-fast), color var(--dur-fast);
}

.modal-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--clr-text);
}

.modal-close:hover {
  background: rgba(255, 60, 60, 0.15);
  color: #ff6060;
}

/* Modal iframe */
.modal-iframe-wrap {
  position: relative;
  flex: 1;
  min-height: 360px;
  max-height: 60vh;
  background: #000;
}

.game-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Modal loading spinner */
.modal-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  background: var(--bg-surface);
  z-index: 1;
  font-size: var(--fs-sm);
  color: var(--clr-muted);
}

.loader-candy {
  display: flex;
  gap: var(--space-2);
  font-size: 1.8rem;
}

.loader-candy span {
  animation: bounce-loader 0.9s ease-in-out infinite;
}

.loader-candy span:nth-child(2) {
  animation-delay: 0.15s;
}

.loader-candy span:nth-child(3) {
  animation-delay: 0.30s;
}

@keyframes bounce-loader {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

.modal-desc {
  padding: var(--space-4) var(--space-6);
  font-size: var(--fs-sm);
  color: var(--clr-muted);
  border-top: 1px solid var(--clr-border);
  line-height: 1.7;
}

/* ═══════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════ */
#toast-container {
  position: fixed;
  top: 80px;
  right: var(--space-6);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}

.toast {
  padding: var(--space-3) var(--space-5);
  background: var(--bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-lg);
  font-size: var(--fs-sm);
  color: var(--clr-text);
  box-shadow: 0 8px 24px var(--clr-shadow);
  pointer-events: all;
  min-width: 220px;
  animation: toastIn 0.3s var(--ease-bounce);
}

.toast.removing {
  animation: toastOut 0.3s var(--ease-smooth) forwards;
}

.toast.info {
  border-left: 3px solid var(--c-forest-light);
}

.toast.warning {
  border-left: 3px solid var(--c-mango);
}

.toast.error {
  border-left: 3px solid #ff6060;
}

@keyframes toastIn {
  from {
    transform: translateX(110%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastOut {
  to {
    transform: translateX(110%);
    opacity: 0;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--clr-border);
  padding-top: var(--space-12);
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-12);
  flex-wrap: wrap;
  padding-bottom: var(--space-8);
}

.footer-brand .logo-icon {
  font-size: 2rem;
  margin-bottom: var(--space-2);
  display: inline-block;
}

.footer-brand .logo-text {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 800;
}

.footer-brand .logo-text em {
  color: var(--c-mango);
  font-style: normal;
}

.footer-brand p {
  margin-top: var(--space-3);
  color: var(--clr-muted);
  font-size: var(--fs-sm);
}

.footer-links {
  display: flex;
  gap: var(--space-12);
  flex-wrap: wrap;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-col h3 {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--clr-muted);
  margin-bottom: var(--space-2);
}

.footer-col a,
.footer-link {
  font-size: var(--fs-sm);
  color: var(--clr-muted);
  transition: color var(--dur-fast);
  cursor: pointer;
}

.footer-col a:hover,
.footer-link:hover {
  color: var(--c-mango);
}

.footer-bottom {
  border-top: 1px solid var(--clr-border);
  padding: var(--space-5) 0;
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--clr-muted);
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero-stats {
    gap: var(--space-6);
  }

  .stat-divider {
    height: 28px;
  }

  .featured-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

@media (max-width: 640px) {
  :root {
    --space-6: 1rem;
  }

  .search-wrap {
    display: none;
  }

  .hero {
    min-height: 90vh;
  }

  .hero-title {
    letter-spacing: -1px;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-stats {
    gap: var(--space-4);
  }

  .stat-num {
    font-size: var(--fs-lg);
  }

  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }

  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-container {
    max-height: 95vh;
    border-radius: var(--r-lg);
    margin: 0;
    align-self: flex-end;
  }

  .modal-header {
    padding: var(--space-3) var(--space-4);
  }

  .modal-game-title {
    font-size: var(--fs-base);
  }

  .modal-iframe-wrap {
    max-height: 50vh;
  }

  .footer-inner {
    flex-direction: column;
    gap: var(--space-8);
  }

  .footer-links {
    gap: var(--space-8);
  }
}

@media (max-width: 400px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2);
  }
}

/* ═══════════════════════════════════════════════════════════════════
   PLAYER PAGE (GAME.HTML) - OJOGOS STYLE
   ═══════════════════════════════════════════════════════════════════ */
.player-page-body {
  background: var(--bg-base);
  padding-top: 120px;
  /* Fixed robust padding */
}

.player-layout-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.player-layout-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
  align-items: start;
}

@media (max-width: 1024px) {
  .player-layout-grid {
    grid-template-columns: 1fr;
  }
}

/* Main Col (Player + Desc) */
.player-main-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.player-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.game-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
  position: relative;
  z-index: 2;
}

.game-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 1;
}

/* Meta Bar under Player */
.central-container .player-meta-bar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.central-container .player-description-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #4a5568 !important;
}

.player-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface);
  padding: var(--space-4);
  border-radius: var(--r-lg);
  border: 1px solid var(--clr-border);
  gap: var(--space-4);
  flex-wrap: wrap;
}

.player-title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  color: var(--clr-text);
  margin: var(--space-2) 0;
}

.player-stats {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--clr-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
}

.online-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  margin-right: -4px;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.player-meta-actions {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

/* Like/Dislike */
.vote-widget {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 160px;
}

.vote-buttons {
  display: flex;
  gap: var(--space-2);
}

.vote-btn {
  flex: 1;
  background: var(--bg-base);
  border: 1px solid var(--clr-border);
  color: var(--clr-text);
  padding: 0.5rem;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1.2rem;
}

.vote-btn:hover {
  background: var(--bg-surface-hover);
}

.like-btn.voted {
  background: rgba(34, 197, 94, 0.2);
  border-color: #22c55e;
}

.dislike-btn.voted {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
}

.vote-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(239, 68, 68, 0.5);
  /* Red background for dislike */
  border-radius: 3px;
  overflow: hidden;
}

.vote-bar-fill {
  height: 100%;
  background: #22c55e;
  /* Green foreground for like */
  transition: width 0.3s ease;
}

.vote-labels {
  font-size: var(--fs-xs);
  color: var(--clr-muted);
  text-align: center;
  font-weight: 500;
}

.player-description-box {
  background: var(--bg-surface);
  padding: var(--space-6);
  border-radius: var(--r-lg);
  border: 1px solid var(--clr-border);
}

.player-description-box h1 {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  margin-bottom: 1rem;
  color: var(--clr-text);
}

.player-description-box p {
  margin-bottom: 1rem;
  color: var(--clr-muted);
  line-height: 1.6;
}

.player-description-box ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--clr-muted);
}

.player-description-box li {
  margin-bottom: 0.5rem;
}

/* Side Column (Ad + Games) */
.player-side-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.ad-container {
  background: var(--bg-surface);
  border: 1px dashed var(--clr-border);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  color: var(--clr-muted);
}

.ad-label {
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: 10px;
  color: var(--clr-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ad-sidebar {
  width: 100%;
  height: 250px;
  /* Std banner size */
}

.ad-bottom {
  width: 100%;
  height: 90px;
  /* Leaderboard size */
  margin-bottom: var(--space-6);
}

.side-title,
.bottom-title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  color: var(--clr-text);
  margin-bottom: var(--space-2);
}

.side-games-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.player-bottom-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}