:root {
  --bg-dark: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a25;
  --purple: #a855f7;
  --purple-light: #c084fc;
  --purple-dark: #7e22ce;
  --purple-glow: rgba(168, 85, 247, 0.4);
  --text: #f1f1f5;
  --text-muted: #a1a1b5;
  --success: #22c55e;
  --success-glow: rgba(34, 197, 94, 0.5);
  --border: rgba(168, 85, 247, 0.15);
  --radius: 12px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  background-image: 
    radial-gradient(ellipse at 20% 0%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(126, 34, 206, 0.06) 0%, transparent 50%);
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1.5rem;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 0 20px var(--purple-glow);
}

.logo span {
  background: linear-gradient(90deg, #fff, var(--purple-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.lang-switcher {
  display: flex;
  gap: 0.4rem;
  background: var(--bg-card);
  padding: 0.3rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.lang-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  opacity: 0.6;
}

.lang-btn:hover,
.lang-btn.active {
  opacity: 1;
  background: rgba(168, 85, 247, 0.2);
}

.build-id {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.build-id strong {
  color: var(--purple-light);
}

/* Main */
.main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.hero {
  text-align: center;
  margin-bottom: 3rem;
  padding: 1.5rem 0;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.hero h1 span {
  color: var(--purple-light);
}

.hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto;
}

/* Section title */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-title h2 {
  font-size: 1.35rem;
  font-weight: 700;
}

.section-title .count {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
}

/* Games grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 12px 40px -10px var(--purple-glow);
  background: var(--bg-card-hover);
}

.game-card .thumb {
  height: 120px;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  position: relative;
  overflow: hidden;
}

.game-card .thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-card), transparent 60%);
}

.game-card .info {
  padding: 1rem 1.1rem 1.2rem;
}

.game-card .name {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.game-card .meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success-glow), 0 0 16px var(--success-glow);
  animation: pulse-glow 2s ease-in-out infinite;
}

.status-dot.undetected {
  background: var(--success);
}

.status-dot.updating {
  background: #eab308;
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.5);
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.15); }
}

/* Product page */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--purple-light);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s;
}

.product-card:hover {
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 16px 48px -12px var(--purple-glow);
}

.product-image {
  position: relative;
  background: #0d0d12;
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-image img {
  max-width: 92%;
  max-height: 92%;
  object-fit: contain;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,0.5));
  transition: transform 0.3s;
}

.product-card:hover .product-image img {
  transform: scale(1.03);
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(8px);
  padding: 0.35rem 0.7rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.product-badge .status-dot {
  width: 7px;
  height: 7px;
}

.product-body {
  padding: 1.25rem;
}

.product-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.product-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.45;
}

.product-features {
  list-style: none;
  margin-bottom: 1.25rem;
}

.product-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.product-features li::before {
  content: '✓';
  color: var(--purple-light);
  font-weight: 700;
  font-size: 0.8rem;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--purple-light);
}

.price small {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: white;
  box-shadow: 0 4px 20px var(--purple-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px var(--purple-glow);
  filter: brightness(1.1);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--purple);
  color: var(--purple-light);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer a {
  color: var(--purple-light);
}

.footer .brand {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text);
}

/* Product detail full */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

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

.product-detail .box-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
}

.product-detail .box-wrap img {
  max-width: 100%;
  border-radius: 8px;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.4));
}

.product-detail .info-side h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-pill .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px var(--success-glow), 0 0 20px var(--success-glow);
  animation: pulse-glow 2s ease-in-out infinite;
}

.feature-list {
  margin: 1.5rem 0;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 0.7rem;
  color: var(--text-muted);
}

.feature-list li svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--purple-light);
}

.buy-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.buy-box .price-big {
  font-size: 2rem;
  font-weight: 800;
  color: var(--purple-light);
  margin-bottom: 0.25rem;
}

.buy-box .price-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Utils */
.hidden { display: none !important; }

@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
  }
  .build-id {
    font-size: 0.7rem;
  }
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}