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

/* ===== BASE ===== */
body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #0a0a14;
  color: #fff;
  min-height: 100vh;
}

/* ===== STARS CANVAS ===== */
#stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* ===== HEADER ===== */
header {
  text-align: center;
  padding: 60px 20px 30px;
  background: linear-gradient(180deg, #12122a 0%, #0a0a14 100%);
  position: relative;
  z-index: 1;
}

header h1 {
  font-size: clamp(2rem, 6vw, 3.8rem);
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(90deg, #e94560, #a855f7, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  line-height: 1.2;
}

header p {
  color: #666;
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
}

/* ===== GAMES GRID ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  padding: 40px 24px;
  max-width: 1300px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ===== GAME CARD ===== */
.card {
  background: #111127;
  border: 1px solid #ffffff0d;
  border-radius: 20px;
  padding: 30px 20px 24px;
  text-align: center;
  text-decoration: none;
  color: #fff;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--c1) 22%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 24px 48px #00000066;
  border-color: var(--c1);
}

.card:hover::after { opacity: 0.12; }

.card .icon {
  font-size: clamp(2.8rem, 5vw, 3.8rem);
  margin-bottom: 14px;
  display: block;
  position: relative;
  z-index: 1;
}

.card h2 {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.card p {
  font-size: clamp(0.75rem, 1.8vw, 0.85rem);
  color: #777;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.card .num {
  position: absolute;
  top: 14px;
  left: 16px;
  font-size: 0.7rem;
  color: #ffffff30;
  font-weight: 700;
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 30px;
  color: #333;
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  header { padding: 50px 16px 24px; }
  .grid { padding: 20px 12px; gap: 14px; grid-template-columns: repeat(2, 1fr); }
  .card { padding: 20px 12px 16px; border-radius: 14px; }
}

@media (max-width: 380px) {
  .grid { grid-template-columns: 1fr; }
}
