* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0a0e1a;
  --surface: #111827;
  --card: #1a2235;
  --border: #1e3a5f;
  --text: #e8eaf0;
  --text-dim: #64748b;
  --accent: #00e676;
  --accent-hover: #33ff99;
  --green: #00e676;
  --gold: #ffd740;
  --radius: 4px;
}

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

body {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(30, 0, 80, 0.3) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(0, 40, 80, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(20, 0, 60, 0.2) 0%, transparent 50%);
  color: var(--text);
  font-family: 'Segoe UI', -apple-system, sans-serif;
  min-height: 100vh;
}

/* Nav */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  background: #060a14;
  border-bottom: 3px solid #00e676;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 3px 15px rgba(0, 230, 118, 0.1);
}

.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.nav-logo {
  height: 40px;
  width: auto;
}

.hero-logo {
  width: 280px;
  height: auto;
  margin-bottom: 16px;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-family: 'Silkscreen', monospace;
  border-radius: var(--radius);
  transition: background 0.15s, transform 0.1s;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.1);
  border-bottom: 4px solid rgba(0,0,0,0.3);
  text-shadow: 1px 1px 0 rgba(0,0,0,0.4);
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn:active {
  border-bottom: 2px solid rgba(0,0,0,0.3);
  transform: translateY(1px);
}

.btn-sm {
  padding: 6px 16px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 40px;
  font-size: 16px;
}

/* Hero */
.hero {
  text-align: center;
  padding: 100px 24px 80px;
  background: linear-gradient(180deg, #060a14 0%, var(--bg) 100%);
}

.hero h1 {
  font-family: 'Silkscreen', monospace;
  font-size: 52px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 2px;
  color: var(--green);
  text-shadow: 3px 3px 0 #000, -1px -1px 0 #000;
}

.hero p {
  font-size: 18px;
  color: var(--text-dim);
  margin-bottom: 32px;
}

.version {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-dim);
}

/* Features */
.features {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 0 24px 80px;
  max-width: 900px;
  margin: 0 auto;
}

.feature {
  flex: 1;
  text-align: center;
  padding: 32px 20px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  border-bottom: 4px solid rgba(0,0,0,0.3);
}

.feature-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.feature h3 {
  font-family: 'Silkscreen', monospace;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--gold);
}

.feature p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* Footer */
footer {
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: var(--text-dim);
  border-bottom: 3px solid #00e676;
  background: #060a14;
}

/* Games page */
.page-header {
  padding: 40px 24px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-header h1 {
  font-family: 'Silkscreen', monospace;
  font-size: 24px;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 2px 2px 0 #000;
}

.catalog-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.search-input {
  flex: 1;
  padding: 8px 14px;
  background: #060a14;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.search-input:focus {
  border-color: var(--accent);
}

.filter-select {
  padding: 8px 14px;
  background: #060a14;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

/* Tag dropdown */
.tag-dropdown-wrap {
  position: relative;
}

.tag-toggle-btn {
  cursor: pointer;
}

.tag-toggle-btn.has-tags {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.tag-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 360px;
  padding: 12px;
  background: #060a14;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  border-bottom: 4px solid rgba(0,0,0,0.3);
  z-index: 50;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

/* Tag filter bar */
.tag-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-clear-btn {
  margin-top: 8px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 11px;
  cursor: pointer;
}

.tag-clear-btn:hover {
  color: var(--text);
}

.tag-filter-btn {
  padding: 4px 12px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  border-bottom: 3px solid rgba(0,0,0,0.2);
}

.tag-filter-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.tag-filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding: 0 24px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.game-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  border-bottom: 4px solid rgba(0,0,0,0.3);
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
  cursor: pointer;
}

.game-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.game-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #0a1628 0%, #0f1f3a 50%, #061020 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.3);
  font-size: 36px;
  font-family: 'Silkscreen', monospace;
  position: relative;
}

.game-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    repeating-linear-gradient(0deg, transparent, transparent 7px, rgba(0,0,0,0.05) 7px, rgba(0,0,0,0.05) 8px),
    repeating-linear-gradient(90deg, transparent, transparent 7px, rgba(0,0,0,0.05) 7px, rgba(0,0,0,0.05) 8px);
  pointer-events: none;
}

.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-info {
  padding: 12px;
}

.game-info h3 {
  font-family: 'Silkscreen', monospace;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-dim);
}

.game-meta .players {
  color: var(--green);
}

.featured {
  padding: 0 24px 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.featured h2 {
  font-family: 'Silkscreen', monospace;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--gold);
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-dim);
}

.empty-state p {
  font-size: 14px;
}

/* Responsive */
@media (max-width: 640px) {
  .hero h1 { font-size: 36px; }
  .features { flex-direction: column; }
  .nav-links { display: none; }
}
