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

:root {
  --bg: #0c0c0f;
  --fg: #e8e4de;
  --muted: #5e5a64;
  --accent: #e8572a;
  --accent-glow: rgba(232, 87, 42, 0.25);
  --border: rgba(255,255,255,0.06);
  --card-bg: rgba(255,255,255,0.03);
  --bar-bg: rgba(20,20,26,0.85);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--fg);
  overflow-x: hidden;
}

/* ── Ambient Glow ── */
body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
}
body::before {
  width: 520px; height: 520px;
  background: var(--accent);
  top: -180px; right: -100px;
  opacity: 0.1;
}
body::after {
  width: 400px; height: 400px;
  background: #1a6b5a;
  bottom: 5%; left: -100px;
  opacity: 0.08;
}

/* ── Grid Overlay ── */
body > .grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
}

/* ═══════════════════════════════════════
   Navbar
   ═══════════════════════════════════════ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 22px 40px 0;
  transition: padding-top 0.5s cubic-bezier(0.22,1,0.36,1);
}
.navbar.scrolled { padding-top: 14px; }

.navbar-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  box-shadow: none; transform-origin: center top;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.navbar.scrolled .navbar-bar {
  background: var(--bar-bg); border-color: var(--border);
  backdrop-filter: blur(28px) saturate(1.4); -webkit-backdrop-filter: blur(28px) saturate(1.4);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 1px 0 rgba(255,255,255,0.04) inset;
  animation: barIn 0.5s cubic-bezier(0.22,1,0.36,1) forwards;
}
.navbar.unscrolling .navbar-bar {
  animation: barOut 0.32s cubic-bezier(0.55,0,1,0.45) forwards;
}
@keyframes barIn {
  0%   { opacity: 0; transform: scale(0.88); filter: blur(8px); }
  100% { opacity: 1; transform: scale(1);    filter: blur(0); }
}
@keyframes barOut {
  0%   { opacity: 1; transform: scale(1);    filter: blur(0); }
  100% { opacity: 0; transform: scale(0.88); filter: blur(8px); }
}

.nav-logo {
  font-weight: 800; font-size: 1.15rem; letter-spacing: -0.04em;
  color: var(--fg); text-decoration: none; display: flex; align-items: center;
  gap: 8px; flex-shrink: 0;
}
.nav-logo .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50%     { transform: scale(1.4); opacity: 0.5; }
}

.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 0.86rem; font-weight: 500;
  padding: 10px 18px; border-radius: 999px; transition: color 0.25s, background 0.25s;
}
.nav-links a:hover { color: var(--fg); background: rgba(255,255,255,0.07); }
.nav-links a.active { color: var(--fg); background: rgba(255,255,255,0.1); }

/* ═══════════════════════════════════════
   Hero (Main Page)
   ═══════════════════════════════════════ */
.hero {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}
.hero-title {
  font-size: clamp(3.2rem, 10vw, 7rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  position: relative; z-index: 2;
}
.hero-title .accent-char {
  color: var(--accent);
  text-shadow: 0 0 60px var(--accent-glow);
}
.hero-sub {
  margin-top: 20px;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--muted);
  font-weight: 400;
  max-width: 420px;
  line-height: 1.6;
  position: relative; z-index: 2;
}
.hero-cta {
  margin-top: 36px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 32px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.22,1,0.36,1),
              box-shadow 0.25s, background 0.25s;
  box-shadow: 0 4px 24px rgba(232,87,42,0.3);
  position: relative; z-index: 2;
}
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 36px rgba(232,87,42,0.45);
  background: #d44d22;
}
.hero-cta:active { transform: translateY(0); }
.hero-cta i { font-size: 0.8rem; transition: transform 0.25s; }
.hero-cta:hover i { transform: translateX(2px); }

.hero-game-count {
  margin-top: 18px;
  font-size: 0.78rem;
  color: var(--muted);
  opacity: 0.6;
  position: relative; z-index: 2;
}

/* ── Vortex Animation ── */
.vortex-container {
  position: absolute;
  width: 520px; height: 520px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
}
.vortex-ring {
  position: absolute;
  top: 50%; left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.vortex-ring-1 {
  width: 480px; height: 480px;
  border: 1px solid transparent;
  border-top-color: rgba(232, 87, 42, 0.08);
  border-right-color: rgba(232, 87, 42, 0.04);
  animation: vortex-cw 28s linear infinite;
}
.vortex-ring-2 {
  width: 380px; height: 380px;
  border: 1px solid transparent;
  border-bottom-color: rgba(232, 87, 42, 0.1);
  border-left-color: rgba(232, 87, 42, 0.05);
  animation: vortex-ccw 22s linear infinite;
}
.vortex-ring-3 {
  width: 280px; height: 280px;
  border: 1px solid transparent;
  border-top-color: rgba(232, 87, 42, 0.12);
  border-right-color: rgba(232, 87, 42, 0.06);
  animation: vortex-cw 16s linear infinite;
}
.vortex-ring-4 {
  width: 180px; height: 180px;
  border: 1px solid transparent;
  border-bottom-color: rgba(232, 87, 42, 0.15);
  border-left-color: rgba(232, 87, 42, 0.08);
  animation: vortex-ccw 11s linear infinite;
}
.vortex-ring-5 {
  width: 90px; height: 90px;
  border: 1px solid rgba(232, 87, 42, 0.18);
  animation: vortex-cw 7s linear infinite;
}
.vortex-glow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,87,42,0.2) 0%, transparent 70%);
  filter: blur(30px);
  animation: glow-pulse 4s ease-in-out infinite;
}
@keyframes vortex-cw  { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes vortex-ccw { to { transform: translate(-50%, -50%) rotate(-360deg); } }
@keyframes glow-pulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 1;   transform: translate(-50%, -50%) scale(1.15); }
}

/* ═══════════════════════════════════════
   Page Hero (Sub-Pages)
   ═══════════════════════════════════════ */
.page-hero {
  position: relative; z-index: 1;
  padding: 160px 32px 40px;
  max-width: 960px;
  margin: 0 auto;
}
.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.page-hero h1::after {
  content: ''; display: block; width: 28px; height: 2px;
  background: var(--accent); margin-top: 14px; border-radius: 1px;
}
.page-hero p {
  color: var(--muted);
  margin-top: 12px;
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 520px;
}

/* ═══════════════════════════════════════
   Content Sections
   ═══════════════════════════════════════ */
.content-section {
  position: relative; z-index: 1;
  max-width: 960px; margin: 0 auto;
  padding: 40px 32px 80px;
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1),
              transform 0.7s cubic-bezier(0.22,1,0.36,1);
}
.content-section.visible { opacity: 1; transform: translateY(0); }

.section-heading {
  font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 12px;
}
.section-heading::after {
  content: ''; display: block; width: 28px; height: 2px;
  background: var(--accent); margin-top: 10px; border-radius: 1px;
}
.section-desc {
  color: var(--muted); font-size: 0.92rem; line-height: 1.6;
  margin-bottom: 40px; max-width: 520px;
}

/* ═══════════════════════════════════════
   Game Cards Grid
   ═══════════════════════════════════════ */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.game-card {
  max-width: 400px;
  justify-self: center;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1),
              border-color 0.35s, box-shadow 0.35s;
  position: relative;
}
.game-card::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.025), transparent);
  transition: left 0.6s ease;
  z-index: 10;
  pointer-events: none;
}
.game-card:hover::before { left: 150%; }
.game-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4), 0 0 0 1px rgba(232,87,42,0.06);
}
.game-card:active {
  transform: translateY(-2px);
  transition-duration: 0.1s;
}

.game-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.game-thumb-bg {
  position: absolute; inset: 0; z-index: 0;
}
.game-thumb-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(12,12,15,0.5) 100%);
}
.game-thumb-dots {
  position: absolute; inset: 0; z-index: 1; overflow: hidden;
}
.game-thumb-dots span {
  position: absolute;
  width: 2px; height: 2px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  animation: dot-float 6s ease-in-out infinite;
}
@keyframes dot-float {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
  50%      { transform: translateY(-12px) scale(1.5); opacity: 0.7; }
}
.game-thumb-icon {
  position: relative; z-index: 2;
  font-size: 3.2rem;
  opacity: 0.2;
  color: #fff;
  transition: opacity 0.3s, transform 0.5s cubic-bezier(0.22,1,0.36,1);
}
.game-card:hover .game-thumb-icon {
  opacity: 0.35;
  transform: scale(1.08) rotate(5deg);
}
.game-thumb-overlay {
  position: absolute; inset: 0; z-index: 3;
  background: rgba(12,12,15,0.45);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.game-card:hover .game-thumb-overlay { opacity: 1; }
.play-btn-circle {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 24px rgba(232,87,42,0.4);
  transform: scale(0.8);
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1);
}
.game-card:hover .play-btn-circle { transform: scale(1); }
.play-btn-circle i { color: #fff; font-size: 1.1rem; margin-left: 2px; }

.game-info { padding: 18px 20px 20px; }
.game-category {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(232,87,42,0.1);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.game-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 5px;
}
.game-info p {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ═══════════════════════════════════════
   Sub-Page Content (Info, TOS, Privacy)
   ═══════════════════════════════════════ */
.prose-content {
  max-width: 640px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.75;
}
.prose-content h2 {
  color: var(--fg);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 40px;
  margin-bottom: 12px;
}
.prose-content h2:first-child { margin-top: 0; }
.prose-content p { margin-bottom: 16px; }
.prose-content ul, .prose-content ol {
  margin-bottom: 16px;
  padding-left: 20px;
}
.prose-content li { margin-bottom: 6px; }
.prose-content strong { color: var(--fg); font-weight: 600; }
.prose-content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(232,87,42,0.3);
  transition: border-color 0.2s;
}
.prose-content a:hover { border-color: var(--accent); }
.prose-content code {
  background: rgba(255,255,255,0.04);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.85em;
  color: var(--fg);
}
.prose-content .info-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 20px 0;
}
.prose-content .info-card p:last-child { margin-bottom: 0; }

/* ═══════════════════════════════════════
   Footer
   ═══════════════════════════════════════ */
.site-footer {
  position: relative; z-index: 1;
  max-width: 960px; margin: 0 auto;
  padding: 28px 32px 52px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 20px;
  border-top: 1px solid var(--border);
}
.footer-brand { font-weight: 800; font-size: 0.95rem; letter-spacing: -0.03em; }
.footer-copy { font-size: 0.72rem; color: var(--muted); margin-top: 3px; opacity: 0.5; }
.footer-tagline { font-size: 0.78rem; color: var(--muted); opacity: 0.7; }
.footer-links { display: flex; align-items: center; gap: 8px; }
.footer-links a {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 999px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  color: var(--muted); text-decoration: none;
  font-size: 0.8rem; font-weight: 500;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}
.footer-links a:hover {
  color: var(--fg); border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06); transform: translateY(-1px);
}

/* ═══════════════════════════════════════
   Responsive
   ═══════════════════════════════════════ */
@media (max-width: 640px) {
  .navbar { padding: 14px 16px 0; }
  .navbar-bar { padding: 12px 16px; }
  .nav-links a { padding: 8px 12px; font-size: 0.8rem; }
  .content-section { padding: 30px 20px 60px; }
  .games-grid { grid-template-columns: 1fr; gap: 20px; }
  .game-card { max-width: 100%; }
  .vortex-container { width: 320px; height: 320px; }
  .vortex-ring-1 { width: 300px; height: 300px; }
  .vortex-ring-2 { width: 240px; height: 240px; }
  .vortex-ring-3 { width: 180px; height: 180px; }
  .vortex-ring-4 { width: 120px; height: 120px; }
  .vortex-ring-5 { width: 60px; height: 60px; }
  .page-hero { padding: 130px 20px 30px; }
  .site-footer { flex-direction: column; align-items: flex-start; }
  .footer-links { flex-wrap: wrap; }
}

/* ═══════════════════════════════════════
   Reduced Motion
   ═══════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .navbar.scrolled .navbar-bar,
  .navbar.unscrolling .navbar-bar { animation: none; }
  .nav-logo .dot { animation: none; }
  .content-section { transition: none; opacity: 1; transform: none; }
  .navbar { transition: none; }
  .vortex-ring, .vortex-glow { animation: none !important; }
  .game-thumb-dots span { animation: none; }
  .game-card, .hero-cta, .play-btn-circle, .game-thumb-icon,
  .game-card::before, .game-thumb-overlay { transition: none; }
}
