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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: #1a1a2e;
  color: #e0e0e0;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== Container ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Hero / Header ===== */
.hero {
  text-align: center;
  padding: 3rem 0 2.5rem;
}

.title {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #e2e2e2 0%, #a78bfa 50%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.title-emoji {
  -webkit-text-fill-color: initial;
  font-size: 2.6rem;
}

.subtitle {
  margin-top: 0.75rem;
  font-size: 1.2rem;
  font-weight: 400;
  color: #8888a8;
  letter-spacing: 0.02em;
}

/* ===== Games Grid ===== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 1rem 0 3rem;
  flex: 1;
}

/* ===== Game Card ===== */
.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem 1.8rem;
  background: linear-gradient(160deg, #16213e 0%, #0f3460 100%);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  color: #e0e0e0;
  transition: transform 0.25s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  cursor: pointer;
  overflow: hidden;
}

.game-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.game-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 8px 30px rgba(99, 102, 241, 0.25),
    0 0 60px rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.3);
}

.game-card:hover::before {
  opacity: 1;
}

.game-card:active {
  transform: translateY(-2px);
}

/* ===== Card Internals ===== */
.card-emoji {
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 1rem;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.game-card:hover .card-emoji {
  transform: scale(1.15);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}

.card-desc {
  font-size: 0.9rem;
  color: #8888a8;
  margin-bottom: 1.25rem;
  font-weight: 400;
}

.card-btn {
  display: inline-block;
  padding: 0.5rem 2rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 2rem;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.game-card:hover .card-btn {
  background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* ===== Per-card color accents on hover ===== */
.game-card[data-color="green"]:hover {
  box-shadow:
    0 8px 30px rgba(34, 197, 94, 0.2),
    0 0 60px rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.3);
}
.game-card[data-color="green"]:hover .card-btn {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.35);
}

.game-card[data-color="red"]:hover {
  box-shadow:
    0 8px 30px rgba(239, 68, 68, 0.2),
    0 0 60px rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.3);
}
.game-card[data-color="red"]:hover .card-btn {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}

.game-card[data-color="orange"]:hover {
  box-shadow:
    0 8px 30px rgba(249, 115, 22, 0.2),
    0 0 60px rgba(249, 115, 22, 0.08);
  border-color: rgba(249, 115, 22, 0.3);
}
.game-card[data-color="orange"]:hover .card-btn {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  box-shadow: 0 4px 15px rgba(249, 115, 22, 0.35);
}

.game-card[data-color="purple"]:hover {
  box-shadow:
    0 8px 30px rgba(168, 85, 247, 0.25),
    0 0 60px rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.3);
}
.game-card[data-color="purple"]:hover .card-btn {
  background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.35);
}

.game-card[data-color="gold"]:hover {
  box-shadow:
    0 8px 30px rgba(234, 179, 8, 0.2),
    0 0 60px rgba(234, 179, 8, 0.08);
  border-color: rgba(234, 179, 8, 0.3);
}
.game-card[data-color="gold"]:hover .card-btn {
  background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
  box-shadow: 0 4px 15px rgba(234, 179, 8, 0.35);
}

.game-card[data-color="cyan"]:hover {
  box-shadow:
    0 8px 30px rgba(6, 182, 212, 0.2),
    0 0 60px rgba(6, 182, 212, 0.08);
  border-color: rgba(6, 182, 212, 0.3);
}
.game-card[data-color="cyan"]:hover .card-btn {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.35);
}

.game-card[data-color="blue"]:hover {
  box-shadow:
    0 8px 30px rgba(59, 130, 246, 0.25),
    0 0 60px rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
}
.game-card[data-color="blue"]:hover .card-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 1.5rem 0;
  color: #555570;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

/* ===== Responsive: Tablet ===== */
@media (max-width: 900px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .title {
    font-size: 2.2rem;
  }

  .title-emoji {
    font-size: 2rem;
  }

  .hero {
    padding: 2rem 0 2rem;
  }
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 560px) {
  .container {
    padding: 1.25rem 1rem;
  }

  .games-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .title {
    font-size: 1.7rem;
  }

  .title-emoji {
    font-size: 1.5rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .hero {
    padding: 1.5rem 0 1.5rem;
  }

  .game-card {
    padding: 1.5rem 1.25rem 1.4rem;
  }

  .card-emoji {
    font-size: 2.8rem;
    margin-bottom: 0.75rem;
  }

  .card-title {
    font-size: 1.1rem;
  }
}
