:root {
  --blue-deep: #0a1628;
  --blue-mid: #0d2444;
  --blue-bright: #1a73e8;
  --blue-electric: #00c2ff;
  --blue-glow: #3d9eff;
  --blue-light: #e8f4ff;
  --accent-cyan: #00e5ff;
  --accent-gold: #ffd700;
  --text-white: #f0f8ff;
  --text-muted: #8ab4d4;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Exo 2', sans-serif;
  background: var(--blue-deep);
  color: var(--text-white);
  overflow-x: hidden;
}

/* ===== NAVBAR ===== */
#myNavbar {
  background: transparent;
  transition: background 0.3s, box-shadow 0.3s;
}
#myNavbar.scrolled {
  background: rgba(10, 22, 40, 0.95) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 194, 255, 0.2);
}
#myNavbar a {
  font-family: 'Oswald', sans-serif;
  font-size: 15px;
  color: var(--text-white) !important;
  letter-spacing: 1px;
  transition: color 0.2s;
}
#myNavbar a:hover { color: var(--accent-cyan) !important; }

/* ===== HERO ===== */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue-mid) 60%, #0a2a5e 100%);
}

/* Animated grid background */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 194, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 194, 255, 0.07) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridDrift 20s linear infinite;
}

@keyframes gridDrift {
  from { transform: translateY(0); }
  to { transform: translateY(60px); }
}

/* Glowing orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  animation: pulse 6s ease-in-out infinite alternate;
}
.orb-1 { width: 500px; height: 500px; background: var(--blue-bright); top: -100px; left: -150px; animation-delay: 0s; }
.orb-2 { width: 400px; height: 400px; background: var(--accent-cyan); bottom: -100px; right: -100px; animation-delay: -3s; }
.orb-3 { width: 300px; height: 300px; background: #0050cc; top: 40%; left: 50%; animation-delay: -1.5s; }

@keyframes pulse {
  from { transform: scale(1); opacity: 0.2; }
  to { transform: scale(1.15); opacity: 0.35; }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
}

.hero-eyebrow {
  font-family: 'Exo 2', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.3s;
}

.hero-title {
  font-family: 'Black Ops One', cursive;
  font-size: clamp(3.5rem, 10vw, 8rem);
  line-height: 0.9;
  letter-spacing: 3px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-cyan) 70%, var(--blue-electric) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.5s;
  filter: drop-shadow(0 0 40px rgba(0, 194, 255, 0.4));
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.7s;
}

.hero-scroll-hint {
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 1s;
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 2px;
}

.scroll-arrow {
  display: block;
  margin: 0.5rem auto 0;
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--accent-cyan);
  border-bottom: 2px solid var(--accent-cyan);
  transform: rotate(45deg);
  animation: bounce 1.5s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(6px); }
}

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

/* ===== GAMES SECTION ===== */
#games-section {
  padding: 6rem 2rem;
  background: linear-gradient(180deg, var(--blue-deep) 0%, #091220 100%);
  position: relative;
}

#games-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
}

.section-label {
  text-align: center;
  margin-bottom: 4rem;
}

.section-label h2 {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--text-white);
  margin-bottom: 0.5rem;
}

.section-label h2 span {
  color: var(--accent-cyan);
}

.section-label p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ===== GAME CARDS ===== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.game-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid rgba(0, 194, 255, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.game-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 194, 255, 0.2), 0 0 0 1px rgba(0, 194, 255, 0.3);
  border-color: rgba(0, 194, 255, 0.4);
}

.game-card-banner {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  position: relative;
  overflow: hidden;
}

.game-card-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(10, 22, 40, 0.8) 100%);
}

.banner-cards    { background: linear-gradient(135deg, #1a0533, #2d0a4e, #0d1a4a); }
.banner-dice     { background: linear-gradient(135deg, #002244, #004488, #0066bb); }
.banner-puzzle   { background: linear-gradient(135deg, #003333, #006644, #004433); }
.banner-arcade   { background: linear-gradient(135deg, #330000, #550011, #220033); }
.banner-trivia   { background: linear-gradient(135deg, #1a1a00, #333300, #1a2200); }
.banner-strategy { background: linear-gradient(135deg, #001a33, #002255, #001133); }

.game-card-body {
  padding: 1.5rem;
}

.game-card-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 194, 255, 0.4);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.game-card h3 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 1px;
  color: var(--text-white);
  margin-bottom: 0.5rem;
}

.game-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.game-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 1px;
}
.badge-coming { background: rgba(255,215,0,0.15); color: var(--accent-gold); border: 1px solid rgba(255,215,0,0.3); }
.badge-live   { background: rgba(0,255,128,0.15); color: #00ff88; border: 1px solid rgba(0,255,128,0.3); }
.badge-beta   { background: rgba(0,194,255,0.15); color: var(--accent-cyan); border: 1px solid rgba(0,194,255,0.3); }

.play-btn {
  font-family: 'Oswald', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-cyan);
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s, color 0.2s;
}
.play-btn:hover { color: #fff; gap: 10px; }

/* ===== FEATURED GAME ===== */
#featured {
  padding: 5rem 2rem;
  background: var(--blue-mid);
  position: relative;
}

#featured::before,
#featured::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,194,255,0.4), transparent);
}
#featured::before { top: 0; }
#featured::after  { bottom: 0; }

.featured-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 768px) {
  .featured-inner { grid-template-columns: 1fr; gap: 2rem; }
}

.featured-preview {
  aspect-ratio: 4/3;
  border-radius: 16px;
  background: linear-gradient(135deg, #0a0a2e, #0a2a5e, #001a40);
  border: 1px solid rgba(0, 194, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0, 194, 255, 0.15) inset;
}

.featured-preview::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(0,194,255,0.1) 0%, transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(26,115,232,0.1) 0%, transparent 60%);
}

.featured-scan-line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0,194,255,0.5), transparent);
  animation: scanline 3s linear infinite;
}

@keyframes scanline {
  0%   { top: 0%; opacity: 1; }
  95%  { top: 100%; opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.featured-info h4 {
  font-family: 'Exo 2', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--accent-cyan);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.featured-info h2 {
  font-family: 'Black Ops One', cursive;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--text-white);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.featured-info p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.feature-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(26,115,232,0.2);
  color: var(--blue-glow);
  border: 1px solid rgba(26,115,232,0.4);
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blue-deep);
  background: linear-gradient(135deg, var(--accent-cyan), var(--blue-bright));
  padding: 14px 32px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  font-weight: bold;
}
.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 194, 255, 0.4);
}

/* ===== STATS BANNER ===== */
#stats {
  padding: 3rem 2rem;
  background: linear-gradient(90deg, var(--blue-deep), #0a2a5e, var(--blue-deep));
  border-top: 1px solid rgba(0,194,255,0.1);
  border-bottom: 1px solid rgba(0,194,255,0.1);
}

.stats-grid {
  display: flex;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
  max-width: 900px;
  margin: 0 auto;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: 'Black Ops One', cursive;
  font-size: 3rem;
  color: var(--accent-cyan);
  display: block;
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ===== FOOTER ===== */
footer {
  background: var(--blue-deep);
  border-top: 1px solid rgba(0,194,255,0.1);
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

footer a {
  color: var(--accent-cyan);
  text-decoration: none;
}

footer .to-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 1rem;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 2px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  padding: 8px 20px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
  text-decoration: none;
}
footer .to-top:hover { background: rgba(0,194,255,0.1); color: var(--accent-cyan); }

/* ===== COMING SOON OVERLAY ===== */
.coming-soon-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,22,40,0.7);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 5;
}
.game-card:hover .coming-soon-overlay { opacity: 1; }
.coming-soon-overlay span {
  font-family: 'Black Ops One', cursive;
  font-size: 1.2rem;
  color: var(--accent-gold);
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* ===== GAME MODAL ===== */
.game-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(5, 12, 25, 0.85);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.25s ease;
}

.game-modal-overlay.active {
  display: flex;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.game-modal-box {
  width: min(90vw, 960px);
  height: min(88vh, 720px);
  background: var(--blue-mid);
  border: 1px solid rgba(0, 194, 255, 0.3);
  border-radius: 16px;
  box-shadow: 0 0 80px rgba(0, 194, 255, 0.15), 0 30px 60px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.game-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: rgba(0, 194, 255, 0.06);
  border-bottom: 1px solid rgba(0, 194, 255, 0.15);
  flex-shrink: 0;
}

.game-modal-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-white);
}

.game-modal-close {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  line-height: 1;
}

.game-modal-close:hover {
  background: rgba(0, 194, 255, 0.15);
  border-color: rgba(0, 194, 255, 0.4);
  color: var(--accent-cyan);
}

.game-modal-body {
  flex: 1;
  overflow: hidden;
}

.game-modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}