@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Fredoka+One&display=swap');

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

:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface2: #1a1a1a;
  --surface3: #222222;
  --border: #2a2a2a;
  --border2: #333333;
  --text: #e5e5e5;
  --muted: #888888;
  --muted2: #555555;
  --white: #ffffff;
  --acc: #ffffff;
  --acc-dim: rgba(255,255,255,0.08);
}

[data-theme="light"] {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --surface2: #eeeeee;
  --surface3: #e5e5e5;
  --border: #d4d4d4;
  --border2: #c0c0c0;
  --text: #111111;
  --muted: #666666;
  --muted2: #999999;
  --white: #111111;
  --acc: #111111;
  --acc-dim: rgba(0,0,0,0.06);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

/* ── NOISE OVERLAY ── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  opacity: 0.4;
}

/* ── NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
[data-theme="light"] .nav { background: rgba(245,245,245,0.85); }

.nav-logo {
  font-family: 'Fredoka One', sans-serif;
  font-size: 22px; color: var(--white);
  letter-spacing: 0.5px; text-decoration: none;
  display: flex; align-items: center; gap: 8px;
}
.nav-logo .dot { color: var(--muted); }

.nav-right { display: flex; align-items: center; gap: 12px; }

.theme-btn {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--surface2); border: 1px solid var(--border);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: all 0.15s; color: var(--text);
}
.theme-btn:hover { background: var(--surface3); border-color: var(--border2); }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 100px 24px 60px;
  position: relative; overflow: hidden;
}

.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}
[data-theme="light"] .hero-grid {
  background-image:
    linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px);
}

.hero-eyebrow {
  font-size: 10px; letter-spacing: 5px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 20px;
  animation: fadeUp 0.6s 0.1s both;
}

.hero-title {
  font-family: 'Fredoka One', sans-serif;
  font-size: clamp(64px, 14vw, 120px);
  color: var(--white); letter-spacing: -2px; line-height: 0.95;
  margin-bottom: 8px;
  animation: fadeUp 0.6s 0.18s both;
}

.hero-title-sub {
  font-family: 'Fredoka One', sans-serif;
  font-size: clamp(20px, 4vw, 36px);
  color: var(--muted); letter-spacing: 4px; text-transform: uppercase;
  margin-bottom: 40px;
  animation: fadeUp 0.6s 0.26s both;
}

.hero-desc {
  max-width: 480px; font-size: 15px; color: var(--muted);
  line-height: 1.8; margin-bottom: 48px;
  animation: fadeUp 0.6s 0.34s both;
}

.hero-actions {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
  animation: fadeUp 0.6s 0.42s both;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all 0.15s;
  border: none; text-decoration: none; letter-spacing: 0.3px;
}
.btn-white {
  background: var(--white); color: var(--bg);
}
.btn-white:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-outline {
  background: none; border: 1px solid var(--border2); color: var(--text);
}
.btn-outline:hover { border-color: var(--white); color: var(--white); }
[data-theme="light"] .btn-outline:hover { border-color: var(--text); color: var(--text); }

.hero-scroll {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: var(--muted);
  animation: fadeUp 0.6s 0.6s both;
}
.scroll-line {
  width: 1px; height: 40px; background: var(--border2);
  animation: scrollPulse 2s infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ── SECTION ── */
.section {
  padding: 80px 24px;
  max-width: 1200px; margin: 0 auto;
}

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 40px; flex-wrap: wrap; gap: 16px;
}
.section-title {
  font-family: 'Fredoka One', sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  color: var(--white); letter-spacing: -1px;
}
.section-title span { color: var(--muted); }

/* CATEGORY TABS */
.cat-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 24px 0; max-width: 1200px; margin: 0 auto;
  padding-left: 24px; padding-right: 24px;
}
.cat-tab {
  padding: 8px 18px; border-radius: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.5px;
  cursor: pointer; transition: all 0.15s;
  border: 1px solid var(--border2); color: var(--muted);
  background: none; font-family: 'Inter', sans-serif;
}
.cat-tab:hover { border-color: var(--white); color: var(--white); }
[data-theme="light"] .cat-tab:hover { border-color: var(--text); color: var(--text); }
.cat-tab.active { background: var(--white); color: var(--bg); border-color: var(--white); }
[data-theme="light"] .cat-tab.active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* GAMES GRID */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  text-decoration: none; color: inherit;
  display: block;
}
.game-card:hover {
  transform: translateY(-6px);
  border-color: var(--border2);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
[data-theme="light"] .game-card:hover {
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

.game-thumb {
  position: relative; padding-bottom: 56.25%; overflow: hidden;
  background: var(--surface2);
}
.game-thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform 0.4s;
}
.game-card:hover .game-thumb img { transform: scale(1.06); }

.game-thumb-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.25s;
  display: flex; align-items: center; justify-content: center;
}
.game-card:hover .game-thumb-overlay { opacity: 1; }

.play-btn {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,0.95); color: #000;
  display: flex; align-items: center; justify-content: center;
  transform: scale(0.8); transition: transform 0.25s;
}
.game-card:hover .play-btn { transform: scale(1); }

.game-cat-badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff; font-size: 10px; font-weight: 700;
  padding: 4px 10px; border-radius: 6px; letter-spacing: 0.5px;
  text-transform: uppercase;
}

.game-info { padding: 16px; }
.game-name {
  font-weight: 800; font-size: 15px; color: var(--white);
  margin-bottom: 6px; line-height: 1.3;
}
.game-meta {
  font-size: 12px; color: var(--muted);
  display: flex; align-items: center; gap: 8px;
}
.game-meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted2); }

/* ── COMMUNITY ── */
.community-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 80px 24px;
}
.community-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
  align-items: center;
}
.community-left {}
.community-eyebrow {
  font-size: 10px; letter-spacing: 4px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 16px;
}
.community-title {
  font-family: 'Fredoka One', sans-serif;
  font-size: clamp(32px, 4vw, 52px);
  color: var(--white); letter-spacing: -1.5px; line-height: 1.1;
  margin-bottom: 16px;
}
.community-desc { font-size: 14px; color: var(--muted); line-height: 1.8; margin-bottom: 32px; }

.community-links { display: flex; flex-direction: column; gap: 12px; }
.community-link {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; border-radius: 14px;
  background: var(--surface2); border: 1px solid var(--border);
  text-decoration: none; color: var(--text);
  transition: all 0.2s;
}
.community-link:hover {
  border-color: var(--border2); background: var(--surface3);
  transform: translateX(4px);
}
.community-link-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
  background: var(--surface3);
}
.community-link-info { flex: 1; }
.community-link-name { font-weight: 700; font-size: 14px; color: var(--white); }
.community-link-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.community-link-arrow { color: var(--muted2); }

.community-right {
  position: relative;
}
.community-profile-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 20px; padding: 28px;
  text-align: center;
}
.profile-avatar {
  width: 88px; height: 88px; border-radius: 50%;
  margin: 0 auto 16px;
  background: var(--surface3);
  border: 2px solid var(--border2);
  overflow: hidden;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name {
  font-family: 'Fredoka One', sans-serif;
  font-size: 22px; color: var(--white); margin-bottom: 4px;
}
.profile-tag { font-size: 12px; color: var(--muted); margin-bottom: 20px; }
.profile-stats {
  display: flex; gap: 20px; justify-content: center;
  padding-top: 20px; border-top: 1px solid var(--border);
}
.profile-stat { text-align: center; }
.profile-stat-n { font-weight: 800; font-size: 18px; color: var(--white); }
.profile-stat-l { font-size: 10px; color: var(--muted); margin-top: 2px; letter-spacing: 0.5px; }
.profile-roblox-btn {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 20px; padding: 10px 20px; border-radius: 10px;
  background: var(--surface3); border: 1px solid var(--border2);
  color: var(--text); text-decoration: none; font-size: 13px; font-weight: 600;
  transition: all 0.15s;
}
.profile-roblox-btn:hover { border-color: var(--white); color: var(--white); }
[data-theme="light"] .profile-roblox-btn:hover { border-color: var(--text); }

/* ── FOOTER ── */
.footer {
  padding: 40px 24px;
  text-align: center; color: var(--muted);
  font-size: 12px; border-top: 1px solid var(--border);
}
.footer-logo {
  font-family: 'Fredoka One', sans-serif;
  font-size: 20px; color: var(--white); margin-bottom: 8px;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0; transform: translateY(32px);
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .community-inner { grid-template-columns: 1fr; gap: 40px; }
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

@media (max-width: 480px) {
  .games-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .game-info { padding: 12px; }
  .game-name { font-size: 13px; }
}

