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

:root {
  --bg:       #000000;
  --surface:  #111111;
  --surface2: #1a1a1a;
  --surface3: #222222;
  --border:   #2a2a2a;
  --green:    #00c070;
  --green2:   #00e080;
  --yellow:   #ffd342;
  --red:      #f60909;
  --text:     #ffffff;
  --muted:    #888888;
  --radius:   10px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Figtree', Arial, sans-serif;
  font-size: 15px;
  min-height: 100vh;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green2); }

/* ── TICKER ──────────────────────────────────────────── */
.ticker {
  display: flex;
  align-items: center;
  background: #0b3320;
  border-bottom: 1px solid #0e4428;
  height: 42px;
  overflow: hidden;
  position: sticky;
  top: 0;
  z-index: 100;
}

.ticker-left {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  white-space: nowrap;
  flex-shrink: 0;
  border-right: 1px solid rgba(255,255,255,0.12);
  height: 100%;
}

.ticker-prize-icon {
  font-size: 22px;
  line-height: 1;
}

.ticker-prize-amount {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
}

.ticker-label {
  font-size: 11px;
  font-weight: 800;
  color: #5dba7a;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.ticker-scroll {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  align-items: center;
  animation: scroll-left 50s linear infinite;
  white-space: nowrap;
}

.ticker-track:hover { animation-play-state: paused; }

@keyframes scroll-left {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 24px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  border-right: 1px solid rgba(255,255,255,0.1);
}

.t-amount { color: #fff; font-weight: 700; }
.t-winner { color: rgba(255,255,255,0.85); }
.t-date   { color: rgba(255,255,255,0.5); font-size: 12px; }

/* ── HEADER ──────────────────────────────────────────── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 64px;
  background: #080808;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 36px;
  z-index: 99;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.logo-icon {
  font-size: 28px;
  line-height: 1;
}

.logo > div {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-text {
  font-size: 22px;
  font-weight: 900;
  color: var(--green);
  letter-spacing: 1px;
}

.logo > div > :first-child {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: 1px;
}

.logo-sub {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 3px;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-signup {
  background: var(--green);
  color: #000;
  border: none;
  border-radius: 6px;
  padding: 8px 20px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.btn-signup:hover { background: var(--green2); transform: translateY(-1px); }

.btn-login {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.btn-login:hover { border-color: var(--green); color: var(--green); }

.btn-icon {
  background: transparent;
  color: var(--muted);
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color .2s, background .2s;
}
.btn-icon:hover { color: var(--text); background: var(--surface3); }

/* ── CATEGORY NAV ────────────────────────────────────── */
.category-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 14px;
  background: #0a0a0a;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: 100px;
  z-index: 98;
}
.category-nav::-webkit-scrollbar { display: none; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav-item:hover { color: var(--text); }
.nav-item.active {
  color: var(--green);
  border-bottom-color: var(--green);
}

.nav-icon { font-size: 16px; }

/* ── MAIN / LOBBY ────────────────────────────────────── */
main {
  padding: 20px 16px 40px;
  max-width: 1600px;
  margin: 0 auto;
}

/* ── GAME SECTIONS ───────────────────────────────────── */
.games-section {
  margin-bottom: 32px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 2px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.section-title a {
  color: var(--green);
  font-size: 20px;
  line-height: 1;
}

.s-icon { font-size: 20px; }

.scroll-btns {
  display: flex;
  gap: 6px;
}

.scroll-btn {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 32px; height: 32px;
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, border-color .2s;
}
.scroll-btn:hover { background: var(--surface3); border-color: var(--green); }

/* ── GAMES ROW ───────────────────────────────────────── */
.games-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 6px;
}
.games-row::-webkit-scrollbar { display: none; }

/* ── GAME CARD ───────────────────────────────────────── */
.game-card {
  flex: 0 0 160px;
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform .2s;
}
.game-card:hover { transform: translateY(-4px); }

.game-thumb {
  position: relative;
  width: 160px;
  height: 160px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.game-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}

.game-overlay-hover {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s;
  z-index: 2;
}
.game-card:hover .game-overlay-hover { opacity: 1; }

.play-now-btn {
  background: var(--green);
  color: #000;
  font-weight: 800;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.game-jackpot {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  color: var(--yellow);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  padding: 20px 6px 6px;
  z-index: 1;
}

.game-name {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

/* ── FOOTER ──────────────────────────────────────────── */
.site-footer {
  background: #080808;
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 36px 20px 24px;
}

.footer-logo {
  font-size: 20px;
  font-weight: 900;
  color: var(--green);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.footer-tagline {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-bottom: 16px;
}

.footer-links a {
  color: var(--muted);
  font-size: 13px;
  transition: color .2s;
}
.footer-links a:hover { color: var(--green); }

.footer-copy {
  color: #444;
  font-size: 12px;
}

/* ── TOASTS ──────────────────────────────────────────── */
.toasts {
  position: fixed;
  bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 9999;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  min-width: 220px;
  animation: slide-in .25s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

@keyframes slide-in {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.toast-info    { background: #1a2a3a; border: 1px solid #225; color: #7af; }
.toast-success { background: #0a2a1a; border: 1px solid #0c4; color: var(--green); }
.toast-error   { background: #2a0a0a; border: 1px solid #c00; color: #f66; }

/* ── SETUP PAGE ──────────────────────────────────────── */
.setup-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.setup-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
}

.setup-title {
  font-size: 24px;
  font-weight: 900;
  text-align: center;
  margin-bottom: 6px;
  color: var(--green);
}

.setup-sub {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.setup-alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}
.setup-alert.ok  { background: #0a2a1a; border: 1px solid var(--green); color: var(--green); }
.setup-alert.err { background: #2a0a0a; border: 1px solid var(--red);   color: #f88; }

.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }

.form-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}
.form-input:focus { border-color: var(--green); }

.btn-submit {
  width: 100%;
  background: var(--green);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 13px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s;
  margin-top: 8px;
}
.btn-submit:hover { background: var(--green2); }

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 600px) {
  header { padding: 0 12px; }
  .logo-text { font-size: 18px; }
  .btn-signup, .btn-login { padding: 7px 14px; font-size: 13px; }
  .game-card  { flex: 0 0 130px; }
  .game-thumb { width: 130px; height: 130px; }
  main { padding: 14px 10px 30px; }
  .section-title { font-size: 14px; }
}
