:root {
  /* Cosmic Geometry Palette - sophisticated and Deep */
  --bg-primary: #0b0e14;
  /* Deep Space Navy */
  --bg-secondary: rgba(255, 255, 255, 0.03);
  /* Faint Glass */
  --header-bg: rgba(11, 14, 20, 0.85);
  --text-main: #e0e0e0;
  /* Starlight Silver */
  --text-muted: rgba(224, 224, 224, 0.4);
  --primary: #00f2ff;
  /* Cyan Accents */
  --secondary: #00a8ff;
  /* Nebula Blue */
  --accent: #e0e0e0;
  --border: rgba(255, 255, 255, 0.05);
  --hot-badge: #00f2ff;
  --star-badge: #e0e0e0;

  --font-header: 'Orbitron', sans-serif;
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --radius-sm: 8px;
  --radius-md: 20px;
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
  --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(0, 242, 255, 0.05), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(0, 168, 255, 0.05), transparent 40%);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
}

/* Header Redesign */
header {
  height: 70px;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.logo {
  font-family: var(--font-header);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-main);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav {
  display: flex;
  gap: 24px;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

nav a:hover {
  color: var(--primary);
  text-shadow: 0 0 8px rgba(0, 242, 255, 0.5);
}

.search-container {
  position: relative;
  width: 300px;
}

.search-bar {
  width: 100%;
  padding: 10px 20px;
  padding-right: 40px;
  border-radius: 30px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.search-bar:focus {
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

/* Grid Layout */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 24px;
}

.section-title {
  font-family: var(--font-header);
  font-size: 1.75rem;
  margin-bottom: 30px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--primary);
  border-radius: 2px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

/* Featured Card (Spans 2 columns) */
.game-card.featured {
  grid-column: span 2;
  grid-row: span 2;
}

.game-card {
  position: relative;
  background: var(--bg-secondary);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}

.game-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 242, 255, 0.2);
  z-index: 10;
}

.game-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 242, 255, 0.2), transparent);
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
}

.game-card:hover::after {
  opacity: 1;
}

.thumb-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
}

.game-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.game-card:hover img {
  transform: scale(1.1);
}

.game-title-bar {
  padding: 15px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  color: white;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: capitalize;
  border-top: 1px solid var(--border);
}

.game-card:hover .game-title-bar {
  color: var(--primary);
}

/* Badges */
.badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.badge-hot {
  background: var(--hot-badge);
  color: white;
}

.badge-star {
  background: var(--star-badge);
  color: white;
}

/* Responsive */
@media (max-width: 1024px) {
  .game-card.featured {
    grid-column: span 1;
    grid-row: span 1;
  }
}

@media (max-width: 640px) {
  header {
    padding: 0 16px;
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
  }

  .logo {
    margin-bottom: 8px;
  }

  nav {
    order: 3;
    width: 100%;
    justify-content: center;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }

  .search-container {
    width: 100%;
    margin-top: 8px;
  }
}