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

html, body {
  background: #150c18;
  color: #fff;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  /* Depth instead of flat black: two soft color blooms over a dark
     vertical gradient, so the page reads as atmosphere, not an empty
     placeholder, without competing with foreground content. */
  background:
    radial-gradient(circle at 12% 15%, rgba(130, 70, 190, 0.13), transparent 42%),
    radial-gradient(circle at 88% 70%, rgba(255, 180, 60, 0.08), transparent 46%),
    linear-gradient(180deg, #201329 0%, #170e1b 45%, #120a15 100%);
  background-attachment: fixed;
}

/* Very faint grid, sitting behind everything, for texture without noise */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
}

a { color: inherit; }

/* Hero banner — full-bleed decorative image (its own $ANSEM branding is
   baked into the artwork, no overlaid site title needed). Tall enough and
   top-biased enough that the bull's face and the $ANSEM wordmark are both
   fully in frame, fading into the page background at the bottom so
   there's no hard seam. */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 3.4 / 1;
  max-height: 42vh;
  min-height: 280px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 6, 12, 0.05) 0%, transparent 55%, #150c18 100%);
}
/* Extra darkening confined to the left ~55% — the artwork's empty region —
   so the overlaid nav/CA/tip-jar stay legible without dimming the bull or
   the $ANSEM wordmark on the right. */
.hero-overlay-left {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 5, 10, 0.72) 0%, rgba(8, 5, 10, 0.4) 38%, transparent 58%);
}

/* All functional UI overlaid on the hero's empty left side, vertically
   centered, well clear of the bull/wordmark on the right. */
.hero-ui {
  position: absolute;
  z-index: 2;
  left: 4%;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  max-width: 380px;
}

.logo {
  font-size: clamp(28px, 4.5vw, 40px);
  font-weight: 900;
  letter-spacing: 0.5px;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.65);
}

/* Auth widget */
#auth-widget { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }

#signin-btn {
  display: flex; align-items: center; gap: 10px;
  border: none; border-radius: 999px;
  padding: 13px 26px 13px 20px;
  background: #000; color: #fff;
  font-weight: 800; font-size: 17px;
  cursor: pointer;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}
#signin-btn:hover { background: #1a1a1a; }
#signin-btn:active { transform: scale(0.96); }

#user-badge {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 6px 12px;
}
.user-badge-top { display: flex; align-items: center; gap: 6px; }
#user-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  object-fit: cover;
  background: #444;
}
#user-handle {
  color: #fff; font-weight: 700; font-size: 14px;
}
#user-stats {
  font-size: 12px; font-weight: 600;
  color: #cdb8d8;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#user-stats .stat-value { color: #ffd24a; font-weight: 800; }

#sign-out-btn {
  border: none; background: none;
  color: #cdb8d8; font-size: 12px;
  cursor: pointer; text-decoration: underline;
  padding: 4px 0;
}
#sign-out-btn:hover { color: #fff; }

.hidden { display: none !important; }

.copy-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 210, 74, 0.35);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  max-width: 100%;
}

.copy-btn:hover { background: rgba(255, 255, 255, 0.09); }
.copy-btn:active { transform: scale(0.97); }

/* CA is the primary call-to-action in the top bar; tip jar stays secondary */
.copy-btn--primary {
  background: #ffd24a;
  border-color: #ffd24a;
  padding: 10px 20px;
  font-size: 14px;
  box-shadow: 0 2px 14px rgba(255, 210, 74, 0.35);
}
.copy-btn--primary:hover { background: #ffdb6e; }
.copy-btn--primary .copy-label { color: #6b4a00; }
.copy-btn--primary .copy-value { color: #3a2400; max-width: 180px; }
.copy-btn--primary .copy-icon { color: #6b4a00; }
.copy-btn--primary.copied .copy-icon { color: #145c34; }

.copy-label { color: #cdb8d8; }

.copy-value {
  color: #ffd24a;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}

/* Small copy/check icon sitting beside the address, like most crypto sites */
.copy-icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: #cdb8d8;
}
.copy-icon .icon-check { display: none; }
.copy-btn.copied .copy-icon { color: #7ee787; }
.copy-btn.copied .copy-icon .icon-copy { display: none; }
.copy-btn.copied .copy-icon .icon-check { display: inline-flex; }

main {
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

.game-grid h1 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 900;
  margin-bottom: 24px;
  text-align: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(160deg, #2a1a33, #1a0f1e);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

/* Top accent strip — a real layer (not border-top-color) so it can be
   either a solid color or a two-tone gradient per accent variant. */
.game-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent, #ffd24a);
  z-index: 1;
}

.game-card.live:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.25);
}

.game-card.soon {
  opacity: 0.6;
  cursor: default;
}

/* Per-game accent identity — each card gets its own hue so the grid reads
   as varied instead of one monotone gold page, even for "Coming Soon"
   slots. purple-amber and copper are reserved for future game cards. */
.accent-gold { --accent: #ffd24a; --accent-glow: rgba(255, 210, 74, 0.22); }
.accent-emerald { --accent: #34d399; --accent-glow: rgba(52, 211, 153, 0.22); }
.accent-redcyan { --accent: linear-gradient(90deg, #ff4d5e, #22d3ee); --accent-glow: rgba(34, 211, 238, 0.18); }
.accent-purple-amber { --accent: linear-gradient(90deg, #a855f7, #ffb020); --accent-glow: rgba(168, 85, 247, 0.18); }
.accent-copper { --accent: #c9793f; --accent-glow: rgba(201, 121, 63, 0.2); }

.card-art {
  font-size: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 140px;
  background: radial-gradient(circle, var(--accent-glow, rgba(255, 255, 255, 0.05)) 0%, rgba(255, 255, 255, 0.03) 70%);
}

.card-body {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-title {
  font-weight: 800;
  font-size: 16px;
}

.card-tag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #cdb8d8;
  white-space: nowrap;
}

.live-tag {
  background: var(--accent, #ffd24a);
  color: #241300;
}

.leaderboard {
  margin-top: 56px;
}

.leaderboard h2 {
  font-size: 22px;
  font-weight: 900;
  color: #ffd24a;
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
}

.lb-sub {
  font-size: 13px;
  font-weight: 600;
  color: #cdb8d8;
}

.lb-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lb-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 15px;
}

.lb-list .rank { width: 24px; font-weight: 800; color: #cdb8d8; }

.lb-list a {
  flex: 1;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.lb-list a:hover { text-decoration: underline; color: #ffd24a; }

.lb-list .lb-score {
  font-weight: 800;
  color: #ffd24a;
  font-variant-numeric: tabular-nums;
}

.lb-status {
  margin-top: 12px;
  color: #cdb8d8;
  font-size: 14px;
}
.lb-status.hidden { display: none; }

footer {
  padding: 20px 24px;
  text-align: center;
  font-size: 12px;
  color: #cdb8d8;
  background: rgba(0, 0, 0, 0.25);
}
