/* ========= RESET & BASE ========= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f0d1a;
  --surface: #1a1628;
  --surface2: #221e35;
  --border: #2e2848;
  --accent: #c9a84c;
  --accent2: #ffd679;
  --accent-glow: rgba(201,168,76,.35);
  --pink: #e4406e;
  --text: #e8e2f5;
  --text-muted: #9690b0;
  --radius: 12px;
  --font: 'Inter', 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ========= SCROLLBAR ========= */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ========= HEADER ========= */
.site-header {
  position: relative;
  background: url('header-bg.webp') center/cover no-repeat;
  overflow: hidden;
}
.site-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,13,26,.55) 0%, rgba(15,13,26,.9) 100%);
  pointer-events: none;
}

/* ---- top bar ---- */
.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.topbar-left { display: flex; align-items: center; gap: 20px; }
.logo-link img { height: 34px; width: auto; }

.topbar-nav { display: flex; gap: 4px; }
.topbar-nav a {
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: background .2s, color .2s;
}
.topbar-nav a:hover,
.topbar-nav a.active {
  background: var(--surface2);
  color: var(--text);
}

.topbar-right { display: flex; align-items: center; gap: 10px; }
.btn-login {
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  transition: border-color .2s, background .2s;
}
.btn-login:hover { border-color: var(--accent); background: rgba(201,168,76,.08); }

.btn-register {
  padding: 8px 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, #c9a84c, #ffd679);
  color: #1a1000;
  font-size: 13px;
  font-weight: 700;
  transition: opacity .2s, transform .15s;
}
.btn-register:hover { opacity: .9; transform: translateY(-1px); }

/* ---- hero ---- */
.hero {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 40px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.5px;
  color: #fff;
}
.hero h1 span {
  background: linear-gradient(135deg, #c9a84c, #ffd679);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  margin-top: 12px;
  font-size: 15px;
  color: var(--text-muted);
  max-width: 460px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}
.hero-actions .btn-primary {
  padding: 13px 36px;
  border-radius: 24px;
  background: linear-gradient(135deg, #c9a84c, #ffd679);
  color: #1a1000;
  font-size: 15px;
  font-weight: 700;
  transition: opacity .2s, transform .15s;
}
.hero-actions .btn-primary:hover { opacity: .9; transform: translateY(-2px); }
.hero-actions .btn-secondary {
  padding: 13px 36px;
  border-radius: 24px;
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  transition: border-color .2s, background .2s;
}
.hero-actions .btn-secondary:hover { border-color: var(--accent); background: rgba(201,168,76,.08); }

/* ---- features strip ---- */
.features-strip {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 24px 32px;
  flex-wrap: wrap;
}
.feature-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 24px;
  font-size: 13px;
  font-weight: 500;
  backdrop-filter: blur(8px);
  transition: background .2s, border-color .2s;
}
.feature-pill:hover { background: rgba(201,168,76,.12); border-color: var(--accent); }
.feature-pill .icon { font-size: 18px; }

/* ========= NAV CATEGORIES ========= */
.cat-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.cat-nav-inner {
  display: flex;
  gap: 4px;
  padding: 10px 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-nav-inner::-webkit-scrollbar { display: none; }
.cat-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.cat-btn:hover { background: var(--surface2); color: var(--text); }
.cat-btn.active { background: linear-gradient(135deg, rgba(201,168,76,.25), rgba(255,214,121,.15)); color: var(--accent2); border: 1px solid rgba(201,168,76,.35); }
.cat-btn .cat-icon { font-size: 17px; }

/* ========= MAIN LAYOUT ========= */
.page-body { max-width: 1280px; margin: 0 auto; padding: 32px 20px 64px; }

/* ========= WINS TICKER ========= */
.wins-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 32px;
  overflow: hidden;
}
.wins-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.wins-header .dot {
  width: 8px; height: 8px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 6px #4ade80;
  animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(1.3); }
}
.wins-header span { font-size: 13px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }

.wins-list {
  display: flex;
  gap: 12px;
  overflow: hidden;
}
.win-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 220px;
  flex-shrink: 0;
  animation: slideIn .4s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}
.win-card .win-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.win-card .win-info { min-width: 0; }
.win-card .win-player { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-card .win-game { font-size: 11px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-card .win-amount { margin-left: auto; text-align: right; flex-shrink: 0; }
.win-card .win-amount strong { display: block; font-size: 14px; font-weight: 700; color: #4ade80; }
.win-card .win-amount small { font-size: 10px; color: var(--text-muted); }

/* ========= SECTION TITLES ========= */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title .ico { font-size: 20px; }
.see-all {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  transition: opacity .2s;
}
.see-all:hover { opacity: .7; }

/* ========= GAME GRID ========= */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 12px;
  margin-bottom: 40px;
}
.game-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.game-card:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 12px 32px rgba(0,0,0,.45); }
.game-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.game-card:hover img { transform: scale(1.05); }
.game-card .game-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.85) 100%);
  opacity: 0;
  transition: opacity .2s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
}
.game-card:hover .game-overlay { opacity: 1; }
.game-card .game-name {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}
.game-card .play-btn {
  margin-top: 8px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #c9a84c, #ffd679);
  color: #1a1000;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  display: inline-block;
  align-self: flex-start;
}
.game-card .badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-hot { background: rgba(228,64,110,.85); color: #fff; }
.badge-new { background: rgba(79,209,145,.85); color: #fff; }
.badge-top { background: rgba(201,168,76,.85); color: #1a1000; }

/* ========= APK BANNER ========= */
.apk-banner {
  background: linear-gradient(135deg, #1a1628, #221e35);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 40px;
  overflow: hidden;
  position: relative;
}
.apk-banner::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(201,168,76,.15), transparent 70%);
  pointer-events: none;
}
.apk-info h3 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.apk-info p { font-size: 14px; color: var(--text-muted); }
.btn-apk {
  padding: 12px 28px;
  background: linear-gradient(135deg, #c9a84c, #ffd679);
  color: #1a1000;
  border-radius: 22px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: opacity .2s, transform .15s;
  display: inline-block;
}
.btn-apk:hover { opacity: .9; transform: translateY(-2px); }

/* ========= SEO TEXT ========= */
.seo-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 40px;
}
.seo-section h2 { font-size: 20px; font-weight: 700; margin-bottom: 16px; color: var(--text); }
.seo-section h3 { font-size: 15px; font-weight: 600; margin: 20px 0 8px; color: var(--accent2); }
.seo-section p { font-size: 14px; color: var(--text-muted); line-height: 1.75; margin-bottom: 12px; }
.seo-section ol, .seo-section ul { padding-left: 20px; }
.seo-section li { font-size: 14px; color: var(--text-muted); line-height: 1.75; margin-bottom: 4px; }
.seo-cta { margin-top: 24px; padding: 18px 20px; background: rgba(201,168,76,.07); border: 1px solid rgba(201,168,76,.2); border-radius: 10px; }

/* ========= FOOTER ========= */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 20px 24px;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-col h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 8px; transition: color .2s; }
.footer-col a:hover { color: var(--accent2); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 12px; color: var(--text-muted); }
.footer-logo img { height: 28px; }

/* ========= PAGE SPECIFIC ========= */
.page-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 40px 20px 32px;
  text-align: center;
}
.page-hero h1 { font-size: clamp(24px, 4vw, 40px); font-weight: 800; }
.page-hero h1 span {
  background: linear-gradient(135deg, #c9a84c, #ffd679);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-hero p { margin-top: 10px; font-size: 15px; color: var(--text-muted); max-width: 480px; margin-inline: auto; }

/* Bonus cards */
.bonus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 40px;
}
.bonus-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.bonus-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.4); }
.bonus-card-top {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  position: relative;
  overflow: hidden;
}
.bonus-card-top::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201,168,76,.15), rgba(228,64,110,.15));
}
.bonus-card-body { padding: 20px; }
.bonus-card-body h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.bonus-card-body p { font-size: 13px; color: var(--text-muted); line-height: 1.65; margin-bottom: 16px; }
.bonus-tag { display: inline-block; padding: 4px 10px; background: rgba(201,168,76,.15); border: 1px solid rgba(201,168,76,.3); border-radius: 10px; font-size: 11px; font-weight: 600; color: var(--accent2); margin-bottom: 12px; }
.btn-bonus {
  display: block;
  padding: 11px;
  text-align: center;
  background: linear-gradient(135deg, #c9a84c, #ffd679);
  color: #1a1000;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  transition: opacity .2s;
}
.btn-bonus:hover { opacity: .9; }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto 40px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color .2s;
}
.faq-item.open { border-color: rgba(201,168,76,.4); }
.faq-question {
  width: 100%;
  padding: 18px 20px;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  background: none;
}
.faq-question:hover { color: var(--accent2); }
.faq-question .arrow {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  transition: transform .25s, background .2s;
}
.faq-item.open .arrow { transform: rotate(180deg); background: rgba(201,168,76,.2); color: var(--accent2); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .2s;
}
.faq-item.open .faq-answer { max-height: 500px; }
.faq-answer-inner { padding: 0 20px 18px; font-size: 14px; color: var(--text-muted); line-height: 1.75; }

/* Live table */
.live-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 32px;
}
.live-table {
  width: 100%;
  border-collapse: collapse;
}
.live-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.live-table td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.live-table tr:last-child td { border-bottom: none; }
.live-table tr:hover td { background: rgba(255,255,255,.025); }
.td-win { font-weight: 700; color: #4ade80; }
.td-player { display: flex; align-items: center; gap: 8px; }
.td-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--pink)); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }

/* ========= RESPONSIVE ========= */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .topbar-nav { display: none; }
  .topbar { padding: 12px 16px; }
  .hero { padding: 32px 16px 28px; }
  .hero-actions { flex-direction: column; width: 100%; max-width: 280px; }
  .hero-actions a { text-align: center; }
  .page-body { padding: 20px 12px 48px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .apk-banner { flex-direction: column; text-align: center; }
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
  .wins-list { gap: 8px; }
  .win-card { min-width: 180px; }
}
@media (max-width: 400px) {
  .footer-grid { grid-template-columns: 1fr; }
}
