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

:root {
  --bg: #0b1120;
  --panel: #111827;
  --border: #1f2937;
  --primary: #0ea5e9;
  --accent: #10b981;
  --text: #f3f4f6;
  --muted: #9ca3af;
  --radius: 12px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  background-image:
    radial-gradient(ellipse 80% 50% at 20% -20%, rgba(14,165,233,0.15), transparent),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(16,185,129,0.1), transparent);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* Header */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,17,32,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo-wrap { display: flex; align-items: center; gap: 10px; }
.logo { height: 32px; width: auto; }
.logo-text { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; }
.header-actions { display: flex; gap: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 18px; font-size: 0.875rem; font-weight: 600;
  border-radius: 8px; text-decoration: none; cursor: pointer;
  transition: all 0.2s; border: none;
}
.btn-outline {
  background: transparent; color: var(--text);
  border: 1px solid #4b5563;
}
.btn-outline:hover { background: #1f2937; }
.btn-primary {
  background: var(--primary); color: #000;
  box-shadow: 0 0 12px rgba(14,165,233,0.35);
}
.btn-primary:hover { background: #38bdf8; }
.btn-generate {
  width: 100%; padding: 14px; font-size: 1rem; font-weight: 700;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff; border-radius: 12px;
  box-shadow: 0 4px 20px rgba(14,165,233,0.4);
}
.btn-generate:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(14,165,233,0.5); }

/* Hero */
.hero { padding: 40px 0 20px; }
.hero-grid {
  display: grid; gap: 32px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.2fr 0.8fr; align-items: start; }
}
.badge-live {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px; border-radius: 999px; font-size: 0.75rem; font-weight: 600;
  color: var(--accent); background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.35); margin-bottom: 16px;
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 8px var(--accent); animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}
.hero-title { font-size: 2.25rem; font-weight: 700; line-height: 1.15; margin-bottom: 12px; }
@media (min-width: 768px) { .hero-title { font-size: 3rem; } }
.gradient-text {
  background: linear-gradient(90deg, #0ea5e9, #10b981, #38bdf8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-desc { color: var(--muted); margin-bottom: 12px; max-width: 480px; }
.hero-cta-text { color: var(--primary); font-weight: 700; margin-bottom: 16px; }

.hero-form {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px; max-width: 420px;
}
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.75rem; color: var(--muted); margin-bottom: 6px; }
.req { color: #f87171; }
.form-group input {
  width: 100%; padding: 10px 12px; background: #0b1120;
  border: 1px solid #374151; border-radius: 8px; color: var(--text);
  font-size: 0.9rem; outline: none;
}
.form-group input:focus { border-color: var(--primary); }
.input-prefix { position: relative; }
.input-prefix svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--muted);
}
.input-prefix input { padding-left: 40px; }
.update-time { font-size: 0.7rem; color: var(--accent); margin-top: 12px; opacity: 0.85; }

.trust-box {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; padding: 24px; text-align: center;
}
.trust-title { font-size: 0.95rem; margin-bottom: 12px; }
.trust-title span { color: #fbbf24; font-weight: 700; }
.trust-pill {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; background: rgba(14,165,233,0.15);
  color: var(--primary); border: 1px solid rgba(14,165,233,0.3);
}

/* Providers */
.providers-section { padding: 16px 0; }
.provider-panel {
  position: relative; background: var(--panel);
  border: 1px solid var(--border); border-radius: 16px; padding: 20px 12px 16px;
}
.provider-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: #1e3a5f; color: #7dd3fc; font-size: 0.7rem; font-weight: 700;
  padding: 4px 14px; border-radius: 999px; letter-spacing: 0.04em;
}
.provider-scroll {
  display: flex; gap: 10px; overflow-x: auto; padding: 8px 4px;
  scrollbar-width: none;
}
.provider-scroll::-webkit-scrollbar { display: none; }
.provider-item {
  flex-shrink: 0; min-width: 90px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid #374151; border-radius: 12px;
  background: #0b1120; color: var(--muted); font-size: 0.8rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; padding: 0 14px; text-decoration: none;
}
.provider-item:hover, .provider-item.active {
  border-color: var(--primary); color: var(--primary);
  box-shadow: 0 0 16px rgba(14,165,233,0.25);
}

/* Filter */
.filter-section { padding: 12px 0 8px; }
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px;
}
.search-box { position: relative; flex: 1; min-width: 180px; }
.search-box svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--muted);
}
.search-box input {
  width: 100%; padding: 10px 12px 10px 38px;
  background: #0b1120; border: 1px solid #374151; border-radius: 8px;
  color: var(--text); font-size: 0.875rem; outline: none;
}
.search-box input:focus { border-color: var(--primary); }
.filter-bar select {
  padding: 10px 12px; background: #0b1120; border: 1px solid #374151;
  border-radius: 8px; color: var(--text); font-size: 0.875rem; outline: none;
  min-width: 160px;
}

/* Games Grid */
.games-section { padding: 20px 0 60px; }
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (min-width: 640px) { .games-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; } }
@media (min-width: 900px) { .games-grid { grid-template-columns: repeat(5, 1fr); gap: 14px; } }
@media (min-width: 1100px) { .games-grid { grid-template-columns: repeat(6, 1fr); } }

.game-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; transition: all 0.2s;
  cursor: pointer;
}
.game-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(14,165,233,0.2);
}
.game-img-wrap {
  aspect-ratio: 1; background: #0b1120; position: relative; overflow: hidden;
}
.game-img-wrap img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.game-rtp {
  position: absolute; bottom: 6px; left: 6px;
  background: rgba(0,0,0,0.75); color: var(--accent);
  font-size: 0.7rem; font-weight: 700; padding: 2px 7px; border-radius: 6px;
}
.game-info { padding: 8px 10px 10px; }
.game-name {
  font-size: 0.75rem; font-weight: 600; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px;
}
.game-provider { font-size: 0.65rem; color: var(--muted); }

.games-empty, .games-loading {
  text-align: center; padding: 60px 20px; color: var(--muted);
}
.hidden { display: none !important; }

/* Back to top */
.back-to-top {
  position: fixed; bottom: 24px; right: 24px; z-index: 40;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--panel); border: 1px solid rgba(14,165,233,0.4);
  color: var(--primary); font-size: 1.2rem; cursor: pointer;
  opacity: 0; pointer-events: none; transition: all 0.25s;
}
.back-to-top.show { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: var(--primary); color: #000; }
