:root {
  --bg: #0b0b12;
  --panel: #151723;
  --panel-2: #1b1f33;
  --panel-3: #222842;
  --accent: #7c5cff;
  --accent-2: #ff6b3d;
  --text: #eef1f7;
  --muted: #9aa3b2;
  --green: #38d996;
  --yellow: #f4c26b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", sans-serif;
  background: radial-gradient(circle at top, #1a1e33 0%, #0b0b12 60%);
  color: var(--text);
}

.app {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #0a0c16;
  padding: 22px 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  font-weight: 700;
}

.brand-name {
  font-weight: 700;
  font-size: 16px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-item {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  background: transparent;
}

.nav-item.active,
.nav-item:hover {
  background: var(--panel);
  color: var(--text);
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--panel-2);
  font-size: 12px;
  color: var(--muted);
}

.content {
  padding: 20px 26px 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.search {
  flex: 1;
}

.search input {
  width: 100%;
  background: var(--panel-2);
  border: none;
  color: var(--text);
  padding: 12px 16px;
  border-radius: 999px;
  font-size: 14px;
}

.top-actions {
  display: flex;
  gap: 10px;
}

.primary,
.ghost {
  border: none;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  background: linear-gradient(135deg, #1a1e33 0%, #262b45 100%);
  border-radius: 20px;
  padding: 26px;
  margin-bottom: 26px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(124, 92, 255, 0.25), transparent 50%);
  pointer-events: none;
}

.hero-text h1 {
  margin: 0 0 8px;
  font-size: 30px;
}

.hero-text p {
  margin: 0 0 18px;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 10px;
}

.hero-card {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-card-title {
  font-size: 18px;
  font-weight: 700;
}

.hero-card-sub {
  color: var(--muted);
  font-size: 13px;
}

.hero-card-btn {
  align-self: flex-start;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--accent-2);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.section {
  margin-bottom: 26px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.grid.small {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.game-card {
  background: var(--panel);
  border-radius: 14px;
  padding: 16px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  color: var(--text);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.game-card.featured {
  grid-column: span 2;
  min-height: 220px;
  background: linear-gradient(135deg, #2a3361, #171b2a);
}

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.badge.hot { color: var(--accent-2); }
.badge.new { color: var(--green); }
.badge.updated { color: var(--yellow); }

.game-title {
  font-weight: 700;
  font-size: 16px;
}

.game-meta {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 980px) {
  .app {
    grid-template-columns: 1fr;
  }
  .sidebar {
    flex-direction: row;
    overflow-x: auto;
  }
  .nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .hero {
    grid-template-columns: 1fr;
  }
  .grid,
  .grid.small {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }
  .grid,
  .grid.small {
    grid-template-columns: 1fr;
  }
  .game-card.featured {
    grid-column: span 1;
  }
}
