/* ═══════════════════════════════════════════
   WEELGAMES — DESIGN SYSTEM (LIGHT)
   ═══════════════════════════════════════════ */

/* ── Tokens ── */
:root {
  --bg:           #f0f2f8;
  --surface:      #ffffff;
  --surface-2:    #f5f7fc;
  --surface-3:    #eef1f8;
  --border:       rgba(0,0,0,0.07);
  --border-2:     rgba(0,0,0,0.12);

  --accent:       #6366f1;
  --accent-glow:  rgba(99,102,241,0.18);
  --accent-cyan:  #0891b2;
  --accent-gold:  #d97706;

  --text:         #0f172a;
  --text-2:       #475569;
  --text-3:       #94a3b8;

  --sidebar-w:    252px;
  --radius:       14px;
  --radius-lg:    20px;
  --radius-sm:    8px;

  --ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:     cubic-bezier(0.4, 0, 0.2, 1);
  --t:            0.25s var(--ease-out);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* ── Subtle dot grid ── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(0,0,0,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
}


/* ═══════════════════════════════════════════
   HEADER — icon only
   ═══════════════════════════════════════════ */
header {
  position: fixed;
  top: 16px; left: 20px;
  z-index: 1000;
}

.logo {
  display: flex; align-items: center;
  text-decoration: none;
  transition: var(--t);
}
.logo img {
  width: 160px; height: auto;
  object-fit: contain;
  transition: transform 0.3s var(--ease-spring);
}
.logo:hover img { transform: scale(1.08); }


/* ═══════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════ */
.main-wrapper {
  display: flex;
  padding-top: 24px;
  position: relative; z-index: 1;
}


/* ═══════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════ */
main {
  flex: 1;
  padding: 0 32px 80px;
  min-width: 0;
}

.content-section { max-width: 1440px; margin: 0 auto; padding: 20px 0 40px; }

/* ── Section headers ── */
.section-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 20px; gap: 12px;
}
.section-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 26px; font-weight: 700; letter-spacing: 0.3px;
  color: var(--text); line-height: 1.1;
}
.section-sub {
  font-size: 13px; color: var(--text-3); margin-top: 3px;
}
.section-badge {
  display: inline-flex; align-items: center;
  padding: 5px 12px; border-radius: 100px;
  background: rgba(99,102,241,0.12);
  color: var(--accent); font-size: 12px; font-weight: 700;
  letter-spacing: 0.5px; border: 1px solid rgba(99,102,241,0.2);
  flex-shrink: 0; margin-top: 2px;
}

.section-spacer { height: 48px; }


/* ═══════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════ */
.hero-card {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-2);
  min-height: 360px;
  display: flex; align-items: flex-end;
  margin-bottom: 48px;
  text-decoration: none;
  transition: transform 0.4s var(--ease-spring);
}
.hero-card:hover {
  transform: translateY(-4px);
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
}
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-icon-wrap {
  position: absolute; right: 80px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.4s var(--ease-spring);
}
.hero-card:hover .hero-icon-wrap { transform: translateY(-50%) scale(1.08) rotate(-3deg); }
.hero-icon-wrap span { font-size: 180px; line-height: 1; filter: drop-shadow(0 0 40px rgba(0,0,0,0.15)); }
.hero-icon-wrap svg { width: 160px; height: 160px; filter: drop-shadow(0 0 40px currentColor); opacity: 0.9; }
.hero-gradient {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to right, rgba(240,242,248,0.95) 0%, rgba(240,242,248,0.6) 40%, transparent 100%),
              linear-gradient(to top, rgba(240,242,248,0.8) 0%, transparent 50%);
}
.hero-content {
  position: relative; z-index: 2;
  padding: 48px 56px;
  max-width: 560px;
}
.hero-cat {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--accent-cyan); margin-bottom: 12px;
}
.hero-cat::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}
.hero-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 52px; font-weight: 700; line-height: 1;
  color: var(--text); letter-spacing: 0.5px; margin-bottom: 12px;
}
.hero-desc {
  font-size: 15px; color: var(--text-2);
  line-height: 1.6; margin-bottom: 28px;
}
.hero-actions { display: flex; align-items: center; gap: 14px; }
.hero-play-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 28px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 100px;
  font-size: 15px; font-weight: 700; font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: var(--t);
  box-shadow: 0 8px 24px var(--accent-glow);
}
.hero-play-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 32px var(--accent-glow); }


/* ═══════════════════════════════════════════
   GAME CARDS GRID
   ═══════════════════════════════════════════ */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}
.featured-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

/* ── Individual Card ── */
.game-card {
  --c: var(--accent);
  position: relative; overflow: hidden;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-decoration: none;
  display: block;
  aspect-ratio: 1/1;
  transition: transform 0.3s var(--ease-spring), border-color 0.3s, box-shadow 0.3s;
}
.game-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--c);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
  z-index: 2;
}
.game-card.card-wide { grid-column: span 2; aspect-ratio: auto; }

/* Thumbnail */
.card-thumb {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.card-thumb-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}
.game-card:hover .card-thumb-img { transform: scale(1.08); }

.card-thumb-icon {
  font-size: 72px; line-height: 1;
  transition: transform 0.4s var(--ease-spring);
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
}
.card-thumb-svg {
  width: 70px; height: 70px;
  transition: transform 0.4s var(--ease-spring);
  filter: drop-shadow(0 0 20px currentColor);
  opacity: 0.85;
}
.game-card:hover .card-thumb-icon,
.game-card:hover .card-thumb-svg {
  transform: scale(1.1) rotate(-3deg);
  opacity: 1;
}

/* Bottom info overlay */
.card-info-overlay {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 3;
  padding: 32px 14px 10px;
  background: linear-gradient(to top, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.6) 60%, transparent 100%);
  display: flex; flex-direction: column; gap: 4px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
  pointer-events: none;
}
.game-card:hover .card-info-overlay { opacity: 1; }
.card-name {
  font-weight: 700; font-size: 14px; color: var(--text);
  line-height: 1.2; letter-spacing: 0.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Play button — appears on hover */
.card-play-overlay {
  position: absolute; inset: 0; z-index: 4;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.25s var(--ease-out);
  background: rgba(240,242,248,0.3);
}
.game-card:hover .card-play-overlay { opacity: 1; }
.card-play-btn {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  border: 2px solid var(--border-2);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s var(--ease-spring), background 0.2s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.card-play-btn:hover { transform: scale(1.12); background: var(--accent); border-color: var(--accent); }
.card-play-btn svg { stroke: var(--text); margin-left: 3px; }
.card-play-btn:hover svg { stroke: #fff; }


/* ── Empty state ── */
.empty-state {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 80px 20px; gap: 12px; text-align: center;
}
.empty-state p {
  font-size: 18px; font-weight: 600; color: var(--text-2);
}
.empty-state span {
  font-size: 14px; color: var(--text-3);
}


/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 40px;
}
.footer-inner {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.footer-brand {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700; font-size: 16px; color: var(--text-2);
}
.footer-brand img {
  width: 28px; height: 28px; object-fit: contain;
}
.footer-copy { font-size: 12.5px; color: var(--text-3); }


/* ═══════════════════════════════════════════
   ENTRANCE ANIMATIONS
   ═══════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.game-card {
  animation: fadeUp 0.4s var(--ease-out) both;
}
.game-card:nth-child(1)  { animation-delay: 0.04s; }
.game-card:nth-child(2)  { animation-delay: 0.08s; }
.game-card:nth-child(3)  { animation-delay: 0.12s; }
.game-card:nth-child(4)  { animation-delay: 0.16s; }
.game-card:nth-child(5)  { animation-delay: 0.20s; }
.game-card:nth-child(6)  { animation-delay: 0.24s; }
.game-card:nth-child(7)  { animation-delay: 0.28s; }
.game-card:nth-child(8)  { animation-delay: 0.32s; }
.game-card:nth-child(n+9) { animation-delay: 0.36s; }


/* ── Touch: always show card name ── */
@media (hover: none) {
  .card-info-overlay { opacity: 1; }
  .card-play-overlay { opacity: 1; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

/* ── Tablet large ── */
@media (max-width: 1200px) {
  .hero-title { font-size: 42px; }
  .hero-icon-wrap span { font-size: 140px; }
  .hero-icon-wrap svg { width: 130px; height: 130px; }
  .hero-icon-wrap { right: 50px; }
}

/* ── Tablet ── */
@media (max-width: 1024px) {
  main { padding: 0 24px 80px; }
  .hero-title { font-size: 36px; }
  .hero-content { padding: 36px 40px; }
  .hero-icon-wrap { right: 32px; }
  .hero-icon-wrap span { font-size: 110px; }
  .hero-icon-wrap svg { width: 100px; height: 100px; }
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .featured-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* ── Mobile large ── */
@media (max-width: 768px) {
  .logo img { width: 120px; }
  .main-wrapper { padding-top: 64px; }
  main { padding: 0 16px 60px; }
  .content-section { padding: 12px 0 32px; }
  .hero-card { min-height: 260px; margin-bottom: 24px; }
  .hero-title { font-size: 28px; }
  .hero-content { padding: 20px 20px; max-width: 100%; }
  .hero-desc { font-size: 13px; margin-bottom: 16px; }
  .hero-icon-wrap { display: none; }
  .hero-play-btn { padding: 10px 20px; font-size: 13px; }
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
  .featured-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .section-title { font-size: 20px; }
  .section-spacer { height: 16px; }
}

/* ── Mobile ── */
@media (max-width: 480px) {
  .logo img { width: 100px; }
  header { top: 10px; left: 12px; }
  .main-wrapper { padding-top: 56px; }
  main { padding: 0 10px 40px; }
  .content-section { padding: 8px 0 24px; }
  .hero-card { min-height: 200px; border-radius: var(--radius); margin-bottom: 20px; }
  .hero-title { font-size: 22px; }
  .hero-content { padding: 16px 16px; }
  .hero-desc { display: none; }
  .hero-cat { font-size: 10px; margin-bottom: 6px; }
  .hero-play-btn { padding: 9px 16px; font-size: 12px; gap: 6px; }
  .games-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .featured-grid { grid-template-columns: repeat(2, 1fr); }
  .section-title { font-size: 17px; }
  .section-sub { font-size: 11px; }
  .section-badge { display: none; }
  .section-spacer { display: none; }
  footer { padding: 20px 0; margin-top: 24px; }
  .footer-copy { font-size: 11px; }
}
