@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;800&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Orbitron', sans-serif; background: #02040a; color: white; overflow-x: hidden; min-height: 100vh; }

/* ── Backgrounds ── */
.nebula {
  position: fixed; inset: 0; z-index: -3;
  background:
    radial-gradient(circle at 18% 28%, rgba(0,245,255,0.09), transparent 40%),
    radial-gradient(circle at 82% 62%, rgba(255,0,200,0.08), transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(120,0,255,0.07), transparent 55%);
  filter: blur(40px);
  animation: drift 14s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: scale(1) translateY(0); }
  to   { transform: scale(1.08) translateY(-18px); }
}
canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; }
#stars { z-index: -2; }
#space { z-index: -1; }

/* ── Header ── */
.header {
  position: relative;
  text-align: center;
  padding: 52px 20px 24px;
  z-index: 10;
}
.logo {
  font-size: clamp(36px, 6vw, 54px);
  font-weight: 800;
  letter-spacing: 4px;
  color: #00f5ff;
  text-shadow: 0 0 12px rgba(0,245,255,0.8), 0 0 36px rgba(0,245,255,0.35);
  animation: logo-pulse 4s ease-in-out infinite alternate;
}
@keyframes logo-pulse {
  from { text-shadow: 0 0 12px rgba(0,245,255,0.8), 0 0 36px rgba(0,245,255,0.35); }
  to   { text-shadow: 0 0 20px rgba(0,245,255,1),   0 0 60px rgba(0,245,255,0.5); }
}
.subtitle {
  margin-top: 10px;
  font-size: 13px;
  letter-spacing: 1px;
  opacity: 0.6;
}

/* ── Search ── */
.search-box {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  position: relative;
}
.search-box::before {
  content: '🔍';
  position: absolute;
  left: calc(50% - min(325px, 45%) + 14px);
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: 0.4;
  pointer-events: none;
  z-index: 1;
}
.search-box input {
  width: min(620px, 90%);
  padding: 14px 20px 14px 42px;
  border: none;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  color: white;
  outline: none;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0,245,255,0.18);
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.search-box input::placeholder { opacity: 0.4; }
.search-box input:focus {
  border-color: rgba(0,245,255,0.5);
  box-shadow: 0 0 20px rgba(0,245,255,0.12);
}

/* ── Hero ── */
.hero {
  position: relative;
  text-align: center;
  padding: 70px 20px 36px;
  z-index: 5;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 68px);
  font-weight: 800;
  line-height: 1.1;
  text-shadow: 0 0 24px rgba(0,245,255,0.35);
}
.hero p {
  max-width: 660px;
  margin: 18px auto 0;
  opacity: 0.7;
  line-height: 1.8;
  font-size: 14px;
}
.hero-glow {
  position: absolute;
  width: 560px; height: 560px;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(0,245,255,0.1), transparent 70%);
  filter: blur(50px);
  z-index: -1;
  pointer-events: none;
}

/* ── Feature strip ── */
.feature-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 20px 48px;
  z-index: 5;
  position: relative;
}
.feature-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid rgba(0,245,255,0.18);
  border-radius: 30px;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(6px);
  font-size: 12px;
  letter-spacing: 0.5px;
  opacity: 0.8;
  transition: opacity 0.2s, border-color 0.2s;
}
.feature-pill:hover { opacity: 1; border-color: rgba(0,245,255,0.4); }
.feature-pill .icon { font-size: 16px; }

/* ── Games sections ── */
.games-section { padding: 0 40px 80px; position: relative; z-index: 5; }

.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.section-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #00f5ff;
}
.section-count {
  font-size: 11px;
  padding: 3px 10px;
  border: 1px solid rgba(0,245,255,0.25);
  border-radius: 20px;
  opacity: 0.6;
  letter-spacing: 1px;
}
.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(0,245,255,0.3), transparent);
  margin-bottom: 6px;
}

.coming-section { padding: 0 40px 100px; position: relative; z-index: 5; }

/* ── Category sub-sections ── */
.category-section {
  margin-bottom: 52px;
}
.category-section:last-child {
  margin-bottom: 0;
}
.cat-section-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(0,245,255,0.78);
}
.search-empty {
  text-align: center;
  opacity: 0.45;
  font-size: 13px;
  padding: 40px 0;
  letter-spacing: 0.5px;
}

/* ── Game grid ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 300px));
  gap: 22px;
  justify-content: center;
}
.grid-coming {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

/* ── Live game cards ── */
.card {
  position: relative;
  padding: 22px;
  border-radius: 18px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(0,245,255,0.14);
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: white;
  display: block;
}
.card::before {
  content: '';
  position: absolute;
  inset: -60%;
  background: radial-gradient(circle, rgba(0,245,255,0.08), transparent 60%);
  animation: spin 12s linear infinite;
  pointer-events: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 28px rgba(0,245,255,0.2);
  border-color: rgba(0,245,255,0.35);
}
.card-featured {
  border-color: rgba(0,245,255,0.4) !important;
  background: linear-gradient(135deg, rgba(0,245,255,0.09), rgba(120,0,255,0.06)) !important;
  box-shadow: 0 0 24px rgba(0,245,255,0.14), inset 0 0 40px rgba(0,245,255,0.03);
}
.card-featured:hover {
  box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 40px rgba(0,245,255,0.28) !important;
}

/* Badge */
.card-badge {
  position: absolute; top: 13px; right: 13px;
  background: #00f5ff; color: #02040a;
  font-size: 8px; font-weight: 800; letter-spacing: 2px;
  padding: 3px 8px; border-radius: 4px;
  z-index: 2;
}
.card-badge.badge-hot { background: #ff4a6a; color: white; }

/* Category chip */
.card-category {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.15);
  opacity: 0.55;
  margin-bottom: 10px;
}

/* Thumb */
.card-thumb {
  font-size: 34px;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 8px rgba(0,245,255,0.45));
  line-height: 1;
}
.card-thumb-img {
  display: block;
  width: 100%; max-height: 120px;
  object-fit: cover; border-radius: 10px;
  margin-bottom: 8px;
  border: 1px solid rgba(0,245,255,0.18);
  filter: drop-shadow(0 0 10px rgba(0,245,255,0.25));
}

.card h3 {
  position: relative;
  color: #00f5ff;
  margin-bottom: 8px;
  font-size: 15px;
  letter-spacing: 0.5px;
}
.card-featured h3 { font-size: 17px; text-shadow: 0 0 12px rgba(0,245,255,0.5); }
.card p {
  position: relative;
  opacity: 0.65;
  line-height: 1.6;
  font-size: 12px;
}

/* Play arrow */
.card-play {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 11px;
  letter-spacing: 1px;
  color: #00f5ff;
  opacity: 0.7;
  transition: opacity 0.2s, gap 0.2s;
}
.card:hover .card-play { opacity: 1; gap: 10px; }

/* ── Coming soon cards ── */
.card-soon {
  position: relative;
  padding: 18px 20px;
  border-radius: 14px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.card-soon:hover { opacity: 0.9; }
.card-soon .soon-icon { font-size: 26px; flex-shrink: 0; }
.card-soon .soon-title { font-size: 13px; margin-bottom: 4px; }
.card-soon .soon-desc { font-size: 11px; opacity: 0.5; line-height: 1.5; }
.card-soon .soon-badge {
  position: absolute; top: 10px; right: 12px;
  font-size: 8px; letter-spacing: 1.5px;
  padding: 2px 7px; border-radius: 4px;
  background: rgba(255,200,0,0.15);
  border: 1px solid rgba(255,200,0,0.3);
  color: #ffd700;
}

/* ── Footer (mirrors game.css) ── */
.common-footer {
  width: 100%;
  margin-top: 0;
  border-top: 1px solid rgba(0,245,255,0.12);
  background: linear-gradient(to bottom, rgba(255,255,255,0.02), rgba(0,10,20,0.6));
  backdrop-filter: blur(6px);
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 52px 40px 40px;
}
@media (max-width: 760px) {
  .footer-inner { grid-template-columns: 1fr; padding: 36px 24px 28px; gap: 28px; }
}
.footer-logo {
  font-size: 22px; font-weight: 800; letter-spacing: 3px;
  color: #00f5ff;
  text-shadow: 0 0 14px rgba(0,245,255,0.6);
  margin-bottom: 10px;
}
.footer-tagline { font-size: 12px; opacity: 0.7; letter-spacing: 0.5px; margin-bottom: 10px; }
.footer-desc { font-size: 12px; opacity: 0.5; line-height: 1.8; margin-bottom: 16px; }
.footer-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-pills span {
  font-size: 10px; letter-spacing: 0.5px;
  padding: 4px 10px;
  border: 1px solid rgba(0,245,255,0.2);
  border-radius: 20px; opacity: 0.65;
}
.footer-col h4 {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: #00f5ff; opacity: 0.8; margin-bottom: 16px;
}
.footer-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col li { font-size: 13px; opacity: 0.6; line-height: 1.4; transition: opacity 0.2s; }
.footer-col li:hover { opacity: 0.9; }
.footer-col a { color: inherit; text-decoration: none; transition: color 0.2s, text-shadow 0.2s; }
.footer-col a:hover { color: #00f5ff; text-shadow: 0 0 8px rgba(0,245,255,0.4); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 16px 40px;
  display: flex; align-items: center; justify-content: center;
  gap: 0; flex-wrap: wrap;
  font-size: 12px; opacity: 0.45; letter-spacing: 0.5px;
}
.footer-sep { margin: 0 10px; opacity: 0.4; }
.footer-home-link { color: inherit; text-decoration: none; transition: opacity 0.2s; }
.footer-home-link:hover { opacity: 1; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .games-section, .coming-section { padding: 0 18px 60px; }
  .logo { font-size: 32px; }
  .hero { padding: 50px 18px 28px; }
  .feature-strip { padding: 0 18px 36px; }
}
