:root {
  --bg: #07130d;
  --bg-alt: #0d1d15;
  --card: #11281d;
  --card-hover: #16372a;
  --border: #234d3a;
  --text: #ecfff2;
  --text-muted: #a7c9b2;
  --green: #4ade80;
  --green-dark: #15803d;
  --radius: 14px;
  --header-h: 72px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  touch-action: pan-x pan-y;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  touch-action: pan-x pan-y;
}

.mobile-unavailable {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.announcement-banner {
  position: fixed;
  top: var(--header-h);
  left: 240px;
  right: 0;
  z-index: 49;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto;
  padding-top: 12px;
  padding-bottom: 12px;
  border: 1px solid #eab308;
  border-radius: 0 0 12px 12px;
  background: #facc15;
  color: #352700;
}

.announcement-banner[hidden] {
  display: none;
}

.announcement-message {
  margin: 0;
  overflow-wrap: anywhere;
}

.announcement-close {
  flex: 0 0 auto;
  padding: 2px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #5b4500;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.announcement-close:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #241b00;
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(700px circle at 15% 0%, rgba(74, 222, 128, 0.18), transparent 60%),
    radial-gradient(700px circle at 85% 10%, rgba(34, 197, 94, 0.12), transparent 60%),
    var(--bg);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.btn[hidden] {
  display: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #06210f;
}

.btn-primary:hover {
  opacity: 0.9;
}

#withdraw-nav-btn {
  background: linear-gradient(135deg, #facc15, #d97706);
  border-color: #facc15;
  color: #261700;
}

#withdraw-nav-btn:hover {
  background: linear-gradient(135deg, #fde047, #f59e0b);
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.28);
}

.pending-withdrawals-nav-btn {
  width: 40px;
  height: 40px;
  padding: 8px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.pending-withdrawals-nav-btn:hover {
  border-color: var(--green);
  color: var(--text);
}

.pending-withdrawals-nav-btn svg {
  width: 20px;
  height: 20px;
}

.admin-page-btn {
  background: linear-gradient(135deg, #f43f5e, #be123c);
  border-color: #f43f5e;
  color: #fff;
}

.admin-page-btn:hover {
  opacity: 0.9;
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.35);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--card-hover);
}

.btn-lg {
  padding: 14px 26px;
  font-size: 15px;
}

#hero-register {
  padding: 18px 34px;
  font-size: 17px;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: auto;
  height: var(--header-h);
  z-index: 50;
  background: rgba(10, 11, 15, 0.85);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  position: relative;
}

body {
  padding-left: 240px;
  padding-top: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: var(--header-h);
  padding: 0 24px;
  background: var(--bg-alt);
  border-right: 1px solid var(--border);
  z-index: 51;
}

.brand-icon {
  display: block;
  width: auto;
  height: 32px;
  max-width: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.accent {
  color: var(--green);
}

.main-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  position: fixed;
  top: var(--header-h);
  bottom: 0;
  left: 0;
  width: 240px;
  padding: 24px 16px;
  background: var(--bg-alt);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  margin-left: 0;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.nav-game-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(78%) sepia(52%) saturate(536%) hue-rotate(83deg) brightness(104%) contrast(96%);
}

.nav-link:hover {
  color: var(--text);
  background: var(--card);
}

.nav-link.active {
  color: var(--green);
  background: rgba(34, 197, 94, 0.14);
  border-left: 3px solid var(--green);
  padding-left: 11px;
}

.nav-section-label {
  padding: 12px 14px 4px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-divider {
  height: 1px;
  margin: 14px 14px 8px;
  background: var(--border);
}

.fairness-link {
  color: var(--text-muted);
}

.dropdown-menu {
  position: absolute;
  top: 0;
  left: 100%;
  min-width: 200px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.dropdown:hover .dropdown-menu {
  display: flex;
}

.dropdown-menu a {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.dropdown-menu a:hover {
  background: var(--card-hover);
  color: var(--text);
}

.header-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  position: absolute;
  right: 24px;
}

.header-actions .btn {
  width: auto;
}

.account-actions {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
}

.account-actions[hidden] {
  display: none;
}

.account-balance {
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.account-balance strong {
  color: var(--text);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.burger span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 12px 24px 20px;
  border-top: 1px solid var(--border);
  background: rgba(10, 11, 15, 0.98);
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav.open {
  display: flex;
}

body.nav-open {
  overflow: hidden;
}

.mobile-nav a {
  padding: 12px 4px;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-nav a.active {
  color: var(--green);
  font-weight: 800;
}

.mobile-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 80px 24px 60px;
}

.hero-content {
  flex: 1 1 50%;
}

.hero-kicker {
  color: var(--green);
  font-weight: 700;
  margin: 0 0 8px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  margin: 0 0 16px;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.gradient-text {
  background: linear-gradient(110deg, var(--green), #22d3ee, #facc15, #fb7185, #facc15, #22d3ee, var(--green));
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(74, 222, 128, 0.25));
  animation: affiliate-claim-shine 4s ease-in-out infinite alternate;
}

.hero-sub {
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 0 32px;
}

.hero-sub a {
  color: #fff;
}

.hero-sub a:hover {
  color: var(--green);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-discord {
  flex: 1 1 50%;
  max-width: 50%;
}

/* ---------- Section heading ---------- */
.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  font-size: 1.8rem;
  margin: 0 0 4px;
}

.section-heading p {
  color: var(--text-muted);
  margin: 0;
}

/* ---------- Games grid ---------- */
.games-section {
  padding: 40px 24px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.game-card {
  position: relative;
  aspect-ratio: 1 / 1;
  background-color: var(--card);
  background-image: linear-gradient(180deg, rgba(7, 14, 10, 0.16) 15%, rgba(7, 14, 10, 0.88) 100%), var(--game-image);
  background-position: center;
  background-size: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--game-color, var(--green));
}

.game-card-name {
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  z-index: 1;
}

.game-card-glow {
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle, var(--game-color, var(--green)) 0%, transparent 70%);
  opacity: 0.15;
  pointer-events: none;
}

/* ---------- Live plays ---------- */
.live-plays-section {
  padding: 40px 24px 80px;
}

.live-plays-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.play-card {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) repeat(3, minmax(0, 0.8fr));
  align-items: center;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
}

.play-card.win {
  border-color: rgba(34, 197, 94, 0.4);
}

.play-card.loss {
  background: #151b18;
  border-color: rgba(248, 113, 113, 0.6);
}

.play-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
}

.play-card-user {
  color: var(--text-muted);
}

.play-card-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.play-card-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.play-card-value {
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.play-card-multi {
  font-weight: 700;
}

.play-card.win .play-card-multi {
  color: var(--green);
}

@media (max-width: 700px) {
  .play-card {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
}

.loading {
  color: var(--text-muted);
  padding: 20px;
}

/* ---------- Discord banner ---------- */
.discord-banner {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.discord-banner:hover {
  transform: translateY(-4px);
  border-color: var(--green);
}

.discord-banner video {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.discord-banner-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(10, 11, 15, 0.15), rgba(10, 11, 15, 0.55));
  pointer-events: none;
}

.discord-banner-title {
  margin: 0;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.discord-banner-sub {
  margin: 0;
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  color: var(--text-muted);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 50px 0 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 30px;
}

.footer-brand {
  max-width: 420px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 16px 0;
}

.age-badge {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 60px;
}

.footer-col h4 {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.footer-col a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* ---------- Legal pages ---------- */
.legal-page {
  max-width: 900px;
  padding: 78px 24px 100px;
}

.legal-header {
  padding-bottom: 34px;
  border-bottom: 1px solid var(--border);
}

.legal-kicker {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-header h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.05;
}

.legal-intro,
.legal-updated {
  color: var(--text-muted);
}

.legal-intro {
  max-width: 700px;
  margin: 0;
  font-size: 16px;
}

.legal-updated {
  margin: 18px 0 0;
  font-size: 13px;
}

.legal-content {
  padding-top: 34px;
}

.legal-content section {
  margin-bottom: 34px;
}

.legal-content h2 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 21px;
}

.legal-content p,
.legal-content li {
  color: var(--text-muted);
  font-size: 15px;
}

.legal-content p {
  margin: 0 0 12px;
}

.legal-content ul {
  margin: 0;
  padding-left: 22px;
}

.legal-content li + li {
  margin-top: 8px;
}

.legal-content a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-note {
  padding: 16px 18px;
  border-left: 3px solid var(--green);
  background: rgba(34, 197, 94, 0.1);
  color: var(--text-muted);
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  padding: 20px;
  background: rgba(2, 10, 6, 0.78);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  position: relative;
  background: linear-gradient(145deg, #173526, #0d2117 78%);
  border: 1px solid rgba(126, 221, 158, 0.24);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.58), 0 0 36px rgba(74, 222, 128, 0.08);
  padding: 32px;
  width: min(100%, 420px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 32px;
  right: 32px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  opacity: 0.8;
}

.modal h3 {
  margin: 0 32px 8px 0;
  font-size: 23px;
  line-height: 1.2;
}

.modal h3.modal-title-centered {
  margin-right: 0;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 23px;
  line-height: 1;
  padding: 4px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.modal-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.1);
}

.modal-close:focus-visible,
.modal-submit:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.modal-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 20px;
}

.withdraw-pending-section {
  margin: 0 0 22px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(3, 15, 9, 0.35);
}

.withdraw-pending-status {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
}

.withdraw-pending-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.withdraw-pending-list[hidden] {
  display: none;
}

.withdraw-pending-list li {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--green-dark);
  border-radius: 9px;
  background: linear-gradient(110deg, rgba(34, 197, 94, 0.08), rgba(3, 15, 9, 0.28));
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}

.withdraw-pending-list li > span:first-child {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.withdraw-pending-badge {
  justify-self: start;
  padding: 3px 8px;
  border: 1px solid rgba(167, 201, 178, 0.2);
  border-radius: 999px;
  background: rgba(167, 201, 178, 0.08);
  color: var(--text-muted);
  font-size: 12px;
}

.withdraw-pending-badge.is-approved {
  border-color: rgba(74, 222, 128, 0.28);
  background: rgba(74, 222, 128, 0.1);
  color: var(--green);
}

#pending-withdrawals-modal-overlay .modal {
  width: min(100%, 640px);
  height: min(66.67dvh, 720px);
  max-height: calc(100dvh - 40px);
  padding: 26px 24px 20px;
  display: flex;
  flex-direction: column;
}

#pending-withdrawals-modal-overlay .modal > section {
  min-height: 0;
}

#pending-withdrawals-modal-overlay .modal > section:first-of-type {
  display: flex;
  flex-direction: column;
  flex: 1;
}

#pending-withdrawals-modal-overlay .withdraw-pending-section {
  display: flex;
  flex-direction: column;
  flex: 1;
  margin-bottom: 0;
  min-height: 0;
}

#pending-withdrawals-modal-overlay .withdraw-pending-list {
  flex: 1;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

#pending-withdrawals-modal-overlay .modal,
#pending-withdrawals-modal-overlay .withdraw-pending-list {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#pending-withdrawals-modal-overlay .modal::-webkit-scrollbar,
#pending-withdrawals-modal-overlay .withdraw-pending-list::-webkit-scrollbar {
  display: none;
}

#pending-withdrawals-modal-overlay .withdraw-pending-section.has-more .withdraw-pending-list {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent);
}

#pending-withdrawals-modal-overlay .withdraw-pending-section.has-more::after {
  content: "Scroll for more \2193";
  align-self: center;
  margin-top: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.12);
  color: var(--green);
  font-size: 11px;
  font-weight: 600;
  animation: scroll-hint-bounce 1.4s ease-in-out infinite;
}

@keyframes scroll-hint-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

.withdraw-pending-list li.is-deposit {
  border-left-color: #4ade80;
  background: linear-gradient(110deg, rgba(74, 222, 128, 0.14), rgba(3, 15, 9, 0.28));
}

.withdraw-pending-list li.is-withdrawal {
  border-left-color: #f59e0b;
  background: linear-gradient(110deg, rgba(245, 158, 11, 0.14), rgba(3, 15, 9, 0.28));
}

.withdraw-pending-badge.is-deposit {
  border-color: rgba(74, 222, 128, 0.35);
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
}

.withdraw-pending-badge.is-withdrawal {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}

@media (min-width: 480px) {
  .withdraw-pending-list li {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .withdraw-pending-badge {
    justify-self: end;
    text-align: right;
  }
}

@media (max-width: 600px) {
  .withdraw-pending-list {
    gap: 8px;
  }

  .withdraw-pending-list li {
    gap: 6px;
    padding: 8px 10px;
    font-size: 12px;
  }

  .withdraw-pending-badge {
    padding: 2px 7px;
    font-size: 11px;
  }
}

@media (min-width: 640px) {
  .withdraw-pending-list li > span:first-child {
    white-space: nowrap;
  }
}

.edition-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.edition-option {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.edition-option.active {
  border-color: var(--green);
  background: rgba(34, 197, 94, 0.14);
  color: var(--text);
}

.edition-help {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
  margin: -4px 0 16px;
}

.modal-input {
  width: 100%;
  padding: 14px 15px;
  border-radius: 10px;
  border: 1px solid rgba(126, 221, 158, 0.22);
  background: rgba(3, 15, 9, 0.62);
  color: var(--text);
  margin-bottom: 16px;
  font-size: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.modal-input::placeholder {
  color: #789b84;
}

.modal-input:focus {
  outline: none;
  border-color: var(--green);
  background: rgba(3, 15, 9, 0.82);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.14);
}

.modal-input:disabled,
.edition-option:disabled,
.modal-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.modal-error {
  color: #f87171;
  font-size: 13px;
  line-height: 1.4;
  margin: -8px 0 16px;
}

.modal-success {
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  margin: -8px 0 16px;
}

.money-bot-status {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  padding: 8px 12px;
  border-radius: 8px;
  margin: -8px 0 16px;
}

.money-bot-status.online {
  color: var(--green);
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.money-bot-status.offline {
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.3);
}

#modal-auth-step {
  text-align: center;
}

.modal-auth-username {
  color: var(--text);
  font-weight: 600;
  text-align: center;
  margin: 0 0 4px;
}

.modal-pay-command {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--green);
  font-size: 15px;
  text-align: center;
  cursor: pointer;
  user-select: all;
  margin-bottom: 8px;
}

.modal-copy-hint {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.modal-submit {
  width: 100%;
}

.modal-submit + .modal-submit {
  margin-top: 12px;
}

.password-setup-prompt-modal {
  max-width: 440px;
}

.password-setup-prompt-dismiss {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
}

.password-setup-prompt-dismiss:hover {
  background: var(--card-hover);
}

.modal-payment-note {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

/* ---------- Game detail page ---------- */
.game-detail {
  padding: 100px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.game-detail-icon {
  width: 144px;
  height: 144px;
  filter: drop-shadow(0 0 24px var(--game-color, var(--green)));
}

.game-detail-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---------- Game shell (playable games) ---------- */
.game-shell {
  padding: 120px 24px 100px;
}

.game-shell-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}

.game-shell-header h1 {
  margin: 0 0 4px;
}

.game-shell-sub {
  color: var(--text-muted);
  margin: 0;
}

.game-detail-icon-sm {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.dice-game {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
}

.keno-game {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
}

.keno-selection-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 12px;
}

.keno-selection-summary .dice-label {
  margin: 0;
}

.keno-selection-summary strong {
  color: var(--green);
}

.keno-max-payout {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.keno-clear-btn {
  width: 100%;
  margin-top: 12px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.keno-clear-btn:hover {
  border-color: #06b6d4;
  color: var(--text);
}

.keno-board-wrap {
  gap: 18px;
}

.keno-status {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.keno-status.is-win,
.keno-status.is-loss {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 800;
}

.keno-status.is-win {
  border: 1px solid rgba(74, 222, 128, 0.45);
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
}

.keno-status.is-loss {
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
}

.keno-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 9px;
  width: 100%;
  max-width: 520px;
}

.keno-number {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  color: var(--text-muted);
  font: inherit;
  font-size: clamp(13px, 2vw, 17px);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.keno-number:hover:not(:disabled) {
  border-color: #06b6d4;
  color: var(--text);
  transform: translateY(-2px);
}

.keno-number:disabled {
  cursor: not-allowed;
}

.keno-number.selected {
  border-color: #06b6d4;
  background: rgba(6, 182, 212, 0.18);
  color: #a5f3fc;
}

.keno-number.drawn {
  border-color: #facc15;
  background: rgba(250, 204, 21, 0.16);
  color: #fef08a;
}

.keno-number.matched {
  border-color: var(--green);
  background: rgba(34, 197, 94, 0.24);
  color: #86efac;
  box-shadow: 0 0 14px rgba(74, 222, 128, 0.2);
}

.keno-history {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.case-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.case-image-placeholder,
.case-reward-image-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #173b29, #0d2016);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.case-image-placeholder {
  min-height: 150px;
  border-bottom: 1px solid var(--border);
}

.case-image-placeholder img {
  width: 100%;
  height: 150px;
  object-fit: contain;
}

.case-card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
}

.case-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.case-card-heading h2 {
  margin: 0;
  font-size: 18px;
}

.case-price {
  flex-shrink: 0;
  color: var(--green);
  font-weight: 800;
}

.case-reward-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 46px;
}

.reward-preview {
  align-self: flex-start;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

.reward-common { color: var(--text-muted); }
.reward-uncommon { color: #67e8f9; }
.reward-rare { color: #60a5fa; }
.reward-epic { color: #c084fc; }
.reward-legendary { color: #facc15; }

.cases-buy-btn {
  width: 100%;
  margin-top: auto;
}

.cases-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 10, 6, 0.82);
}

.cases-modal-overlay[hidden] {
  display: none;
}

.cases-modal {
  position: relative;
  width: min(760px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.cases-modal h2 {
  margin: 0 0 6px;
}

.cases-modal-sub {
  margin: 0 0 24px;
  color: var(--text-muted);
}

.cases-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.cases-reel-window {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 160px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}

.cases-reel-window::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--green);
  box-shadow: 0 0 18px rgba(74, 222, 128, 0.8);
  content: "";
}

.cases-reel {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 12px;
  padding: 0 12px;
  transform: translateX(0);
  transition: transform 4.2s cubic-bezier(0.12, 0.78, 0.16, 1);
}

.cases-reel-item {
  display: grid;
  flex: 0 0 100px;
  place-items: center;
  gap: 6px;
  height: 106px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.cases-reel-item.reward-common { border: 3px solid #94a3b8; }
.cases-reel-item.reward-uncommon { border: 3px solid #67e8f9; }
.cases-reel-item.reward-rare { border: 3px solid #60a5fa; }
.cases-reel-item.reward-epic { border: 3px solid #c084fc; }
.cases-reel-item.reward-legendary { border: 3px solid #facc15; }

.case-reward-image-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  font-size: 9px;
  object-fit: contain;
}

.cases-result {
  margin-bottom: 18px;
  color: var(--green);
  font-size: 18px;
  font-weight: 800;
}

.cases-modal .modal-error {
  margin: 0 0 16px;
}

.dice-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  align-self: start;
}

.dice-label {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.dice-bet-input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.dice-bet-input {
  margin-bottom: 0;
  flex: 1;
}

.dice-bet-quick {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  align-items: center;
}

.dice-bet-quick .btn-sm {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding-right: 0;
  padding-left: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.btn-sm {
  padding: 8px 10px;
  font-size: 12px;
}

.dice-slider {
  width: 100%;
  margin: 8px 0 20px;
  accent-color: var(--green);
}

.dice-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.dice-stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dice-stat-label {
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dice-stat-value {
  font-weight: 700;
  font-size: 15px;
}

.dice-roll-btn {
  width: 100%;
}

.dice-board {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 320px;
}

.dice-board-heading {
  display: flex;
  width: 100%;
  max-width: 560px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: -8px;
}

.dice-board-kicker {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dice-board-hint {
  color: var(--text-muted);
  font-size: 12px;
}

.dice-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.dice-result-number {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1;
}

.dice-result-number.is-ready {
  color: var(--green);
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.12em;
}

.dice-result-badge {
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.dice-result-badge.win {
  background: rgba(34, 197, 94, 0.16);
  color: var(--green);
}

.dice-result-badge.lose {
  background: rgba(248, 113, 113, 0.16);
  color: #f87171;
}

.dice-track {
  position: relative;
  width: 100%;
  max-width: 560px;
  height: 24px;
  padding: 4px;
  border-radius: 999px;
  background: #07130d;
  border: 1px solid var(--border);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45), 0 0 0 5px rgba(74, 222, 128, 0.04);
  overflow: visible;
}

.dice-track::before {
  position: absolute;
  inset: 4px;
  z-index: 1;
  border-radius: 999px;
  background: repeating-linear-gradient(to right, transparent 0, transparent calc(10% - 1px), rgba(255, 255, 255, 0.22) 10%);
  content: "";
  pointer-events: none;
}

.dice-track-fill {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(to right, #b84b62 0%, #ef6b67 51%, #4ade80 51%, #2fbf71 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), 0 0 18px rgba(74, 222, 128, 0.16);
}

.dice-track-prediction {
  position: absolute;
  top: -38px;
  left: 50%;
  min-width: 28px;
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--text);
  color: var(--bg);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  transform: translateX(-50%);
  transition: left 0.12s ease;
  z-index: 3;
}

.dice-track-marker {
  position: absolute;
  top: 50%;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--text);
  border: 3px solid var(--bg);
  transform: translate(-50%, -50%);
  transition: left 0.3s ease;
  box-shadow: 0 0 0 4px rgba(236, 255, 242, 0.12), 0 0 16px rgba(236, 255, 242, 0.65);
  z-index: 4;
}

.dice-track-labels,
.dice-zone-labels {
  display: flex;
  width: 100%;
  max-width: 560px;
  justify-content: space-between;
}

.dice-track-labels {
  margin-bottom: -16px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

.dice-zone-labels {
  margin-top: -14px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dice-zone-labels span:last-child {
  color: var(--green);
}

.dice-history {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.dice-history-chip {
  min-width: 32px;
  padding: 6px 8px;
  text-align: center;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  background: var(--bg);
  border: 1px solid var(--border);
}

.dice-history-chip.win {
  color: var(--green);
  border-color: rgba(34, 197, 94, 0.4);
}

.dice-history-chip.lose {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.4);
}

.coinflip-game {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
}

.blackjack-game {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
}

.blackjack-emoji {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  font-size: 40px;
  filter: drop-shadow(0 0 22px rgba(234, 179, 8, 0.45));
}

.game-emoji {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  font-size: 40px;
  filter: drop-shadow(0 0 22px rgba(74, 222, 128, 0.45));
}

.blackjack-payout-note {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  margin: 22px 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 13px;
}

.blackjack-payout-note strong {
  color: #facc15;
  font-variant-numeric: tabular-nums;
}

.blackjack-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.blackjack-actions[hidden] {
  display: none;
}

.blackjack-actions .btn {
  min-width: 0;
  padding: 12px 8px;
}

.blackjack-table {
  --felt-edge: rgba(242, 211, 126, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
  min-height: 540px;
  padding: 22px 26px;
  overflow: hidden;
  border: 1px solid var(--felt-edge);
  border-radius: 12px;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(40, 123, 74, 0.72), transparent 70%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 4px),
    #104329;
  box-shadow: inset 0 0 0 6px rgba(4, 34, 21, 0.22), inset 0 0 48px rgba(0, 0, 0, 0.26);
}

.blackjack-table-head,
.blackjack-hand-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.blackjack-table-head {
  color: rgba(240, 249, 242, 0.72);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.blackjack-table-head i {
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 5px 2px;
  border-radius: 50%;
  background: #facc15;
}

.blackjack-bet-chip {
  padding: 5px 10px;
  border: 1px solid rgba(250, 204, 21, 0.38);
  border-radius: 999px;
  background: rgba(13, 26, 18, 0.38);
  color: #fde68a;
  font-size: 11px;
  letter-spacing: 0;
  white-space: nowrap;
}

.blackjack-hand {
  min-height: 150px;
}

.blackjack-hand-heading {
  margin-bottom: 12px;
}

.blackjack-hand-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.blackjack-hand-heading h2 {
  margin: 0;
  color: rgba(240, 249, 242, 0.86);
  font-size: 13px;
  font-weight: 700;
}

.blackjack-total {
  min-width: 32px;
  padding: 2px 8px;
  border: 1px solid rgba(250, 204, 21, 0.28);
  border-radius: 6px;
  background: rgba(13, 26, 18, 0.3);
  color: #fde68a;
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.blackjack-cards {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  min-height: 126px;
}

.blackjack-card {
  position: relative;
  flex: 0 0 88px;
  width: 88px;
  aspect-ratio: 5 / 7;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 7px;
  background: #f8faf8;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.blackjack-card.is-dealing {
  animation: blackjack-deal 480ms both cubic-bezier(0.18, 0.7, 0.25, 1);
  animation-delay: calc(var(--card-order, 0) * 200ms);
}

.blackjack-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blackjack-card-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #14251a;
  font-size: 20px;
  font-weight: 800;
}

.blackjack-card-fallback[hidden] {
  display: none;
}

.blackjack-card.is-back {
  border-color: #f4dc9a;
  background: #153b31;
}

.blackjack-card.is-back .blackjack-card-fallback {
  color: #f4dc9a;
  font-size: 18px;
  letter-spacing: 0.08em;
}

.blackjack-table-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 60px;
  padding: 10px 0;
  border-top: 1px solid rgba(240, 249, 242, 0.15);
  border-bottom: 1px solid rgba(240, 249, 242, 0.15);
  text-align: center;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.blackjack-table-mark {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(250, 204, 21, 0.54);
  border-radius: 50%;
  color: #fde68a;
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 700;
}

.blackjack-table-center p {
  min-width: 0;
  flex: 0 1 auto;
  margin: 0;
  color: rgba(240, 249, 242, 0.86);
  font-size: 13px;
  font-weight: 600;
}

.blackjack-table-mark.is-result {
  flex-basis: auto;
  width: auto;
  min-width: 58px;
  height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.06em;
}

.blackjack-table-center.is-win {
  border-color: rgba(74, 222, 128, 0.55);
  background: rgba(20, 83, 45, 0.46);
}

.blackjack-table-center.is-win .blackjack-table-mark {
  border-color: #4ade80;
  background: rgba(21, 128, 61, 0.72);
  color: #f0fdf4;
}

.blackjack-table-center.is-win p {
  color: #bbf7d0;
  font-size: 15px;
  font-weight: 800;
}

.blackjack-table-center.is-bust,
.blackjack-table-center.is-loss {
  border-color: rgba(248, 113, 113, 0.62);
  background: rgba(127, 29, 29, 0.48);
}

.blackjack-table-center.is-bust .blackjack-table-mark,
.blackjack-table-center.is-loss .blackjack-table-mark {
  border-color: #fca5a5;
  background: rgba(185, 28, 28, 0.78);
  color: #fff1f2;
}

.blackjack-table-center.is-bust p,
.blackjack-table-center.is-loss p {
  color: #fecaca;
  font-size: 15px;
  font-weight: 800;
}

.blackjack-table-center.is-push {
  border-color: rgba(250, 204, 21, 0.6);
  background: rgba(120, 83, 18, 0.4);
}

.blackjack-table-center.is-push .blackjack-table-mark {
  border-color: #fde68a;
  background: rgba(161, 98, 7, 0.66);
  color: #fffbeb;
}

.blackjack-table-center.is-push p {
  color: #fef3c7;
  font-size: 15px;
  font-weight: 800;
}

@keyframes blackjack-deal {
  from { opacity: 0; transform: translateY(-24px) rotate(-8deg) scale(0.92); }
  to { opacity: 1; transform: translateY(0) rotate(0); }
}

.coinflip-choice-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 20px;
}

.coinflip-side {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.coinflip-side.active {
  background: rgba(74, 222, 128, 0.14);
  border-color: var(--green);
  color: var(--text);
}

.coinflip-emoji {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  font-size: 40px;
  filter: drop-shadow(0 0 24px rgba(74, 222, 128, 0.6));
}

.coinflip-coin {
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1;
}

.coinflip-stage {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 18px;
  min-height: 178px;
  perspective: 900px;
}

.coinflip-stage::after {
  position: absolute;
  bottom: 43px;
  left: 50%;
  width: 100px;
  height: 14px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  filter: blur(7px);
  transform: translateX(-50%);
  content: "";
}

.coinflip-token {
  position: relative;
  width: 108px;
  height: 108px;
  transform-style: preserve-3d;
}

.coinflip-token.show-tails {
  transform: rotateY(180deg);
}

.coinflip-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 7px double rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, 0.15), inset 0 0 22px rgba(255, 255, 255, 0.2), 0 10px 18px rgba(0, 0, 0, 0.3);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.coinflip-face-heads {
  background: radial-gradient(circle at 34% 28%, #c084fc, #7e22ce 62%, #4c1d95);
}

.coinflip-face-tails {
  transform: rotateY(180deg);
  background: radial-gradient(circle at 34% 28%, #fde68a, #f59e0b 62%, #b45309);
}

.coinflip-token.is-flipping {
  animation: coinflip-toss 1.3s cubic-bezier(0.2, 0.72, 0.25, 1) forwards;
}

@keyframes coinflip-toss {
  0% { transform: translateY(0) rotateY(0); }
  20% { transform: translateY(-74px) rotateY(720deg); }
  52% { transform: translateY(-44px) rotateY(1440deg); }
  78% { transform: translateY(-68px) rotateY(1800deg); }
  100% { transform: translateY(0) rotateY(var(--coinflip-end-rotation)); }
}

.coinflip-history {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

@media (max-width: 800px) {
  .dice-game,
  .cases-grid,
  .coinflip-game,
  .blackjack-game,
  .mines-game,
  .towers-game {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .header-inner {
    gap: 6px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .brand {
    font-size: 17px;
  }

  .account-actions {
    gap: 6px;
  }

  .account-balance {
    padding: 4px 6px;
    font-size: 0;
  }

  .account-balance strong {
    font-size: 12px;
  }

  .burger {
    margin-left: 0;
  }

  .blackjack-table {
    min-height: 500px;
    padding: 18px 14px;
  }

  .blackjack-card {
    flex-basis: 70px;
    width: 70px;
  }

  .blackjack-cards {
    gap: 8px;
  }

  .blackjack-table-center {
    gap: 9px;
  }
}

@media (max-width: 360px) {
  .account-balance {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blackjack-card.is-dealing {
    animation: none;
  }

  .coinflip-token.is-flipping {
    animation-duration: 0.25s;
  }

  #claim-affiliate-rewards {
    animation: none;
  }

  .gradient-text {
    animation: none;
  }
}

.mines-game {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
}

.mines-emoji {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  font-size: 40px;
  filter: drop-shadow(0 0 24px rgba(239, 68, 68, 0.6));
}

.mines-slider {
  width: 100%;
  margin: 8px 0 20px;
  accent-color: #ef4444;
}

.mines-board-wrap {
  gap: 18px;
}

.mines-status {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.mines-status.is-win,
.towers-status.is-win {
  padding: 12px 14px;
  border: 1px solid rgba(74, 222, 128, 0.45);
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
  font-size: 18px;
  font-weight: 800;
}

.mines-status.is-loss,
.towers-status.is-loss {
  padding: 12px 14px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
  font-size: 18px;
  font-weight: 800;
}

.mines-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 420px;
}

.mines-tile {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  cursor: pointer;
  transition: all 0.15s ease;
}

.mines-tile:hover:not(.revealed-diamond):not(.revealed-mine):not(:disabled) {
  border-color: #ef4444;
  transform: translateY(-2px);
}

.mines-tile:disabled {
  cursor: not-allowed;
}

.mines-tile.revealed-diamond {
  background: rgba(34, 197, 94, 0.16);
  border-color: var(--green);
}

.mines-tile.revealed-mine {
  background: rgba(248, 113, 113, 0.16);
  border-color: #f87171;
}

.mines-tile.dim {
  opacity: 0.45;
  filter: grayscale(0.3);
}

.towers-game {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
}

.towers-emoji {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  font-size: 40px;
  filter: drop-shadow(0 0 24px rgba(234, 179, 8, 0.6));
}

.towers-choice-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 20px;
}

.towers-difficulty {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.towers-difficulty.active {
  background: rgba(234, 179, 8, 0.14);
  border-color: #eab308;
  color: var(--text);
}

.towers-board-wrap {
  gap: 10px;
}

.towers-status {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.towers-grid-viewport {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 480px;
  overflow-y: auto;
  scroll-behavior: smooth;
  border-radius: 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.towers-grid-viewport::-webkit-scrollbar {
  display: none;
}

.towers-grid-fade-top {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  margin-bottom: -56px;
  background: linear-gradient(to bottom, rgba(10, 10, 16, 0.9), rgba(10, 10, 16, 0));
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  pointer-events: none;
  z-index: 2;
}

.towers-grid-viewport.towers-at-top .towers-grid-fade-top {
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.towers-grid {
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  width: 100%;
}

.towers-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  transition: opacity 0.15s ease;
}

.towers-row.towers-row-inactive {
  opacity: 0.5;
}

.towers-tile {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  cursor: pointer;
  transition: all 0.15s ease;
}

.towers-tile:hover:not(.revealed-safe):not(.revealed-bad):not(:disabled) {
  border-color: #eab308;
  transform: translateY(-2px);
}

.towers-tile:disabled {
  cursor: not-allowed;
}

@media (max-width: 800px) {
  .mines-game,
  .towers-game,
  .crash-game {
    grid-template-columns: 1fr;
  }
}

.towers-tile.revealed-safe {
  background: rgba(34, 197, 94, 0.16);
  border-color: var(--green);
}

.towers-tile.revealed-bad {
  background: rgba(248, 113, 113, 0.16);
  border-color: #f87171;
}

.towers-tile.dim {
  opacity: 0.45;
  filter: grayscale(0.3);
}

.crash-game {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
}

.crash-emoji {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  font-size: 40px;
  filter: drop-shadow(0 0 24px rgba(244, 63, 94, 0.6));
}

.crash-game .dice-stats {
  grid-template-columns: 1fr;
  margin-top: 20px;
}

.crash-game .dice-stat-value {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.crash-board-wrap {
  gap: 16px;
  overflow: hidden;
}

.crash-status {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.crash-display {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: radial-gradient(ellipse at 50% 100%, rgba(244, 63, 94, 0.14), transparent 70%), var(--bg);
}

.crash-multiplier {
  position: relative;
  z-index: 1;
  color: #fb7185;
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 28px rgba(244, 63, 94, 0.35);
}

.crash-display.is-crashed .crash-multiplier {
  color: #f87171;
  text-shadow: 0 0 28px rgba(248, 113, 113, 0.5);
}

.crash-graph {
  position: absolute;
  inset: 0;
  opacity: 0.8;
}

.crash-graph svg {
  width: 100%;
  height: 100%;
}

.crash-graph path {
  fill: none;
  stroke: #fb7185;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.crash-display.is-crashed .crash-graph path {
  stroke: #f87171;
}

.crash-fairness {
  max-width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 800px) {
  .crash-game {
    grid-template-columns: 1fr;
  }
}

/* ---------- Provably fair page ---------- */
.fairness-page {
  padding: 80px 24px 100px;
}

.fairness-hero {
  max-width: 760px;
  margin-bottom: 48px;
}

.fairness-kicker {
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.fairness-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 1;
}

.fairness-hero p {
  max-width: 620px;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.7;
  margin: 0;
}

.fairness-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.fairness-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.fairness-card-number {
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.fairness-card h2 {
  margin: 24px 0 10px;
  font-size: 1.1rem;
}

.fairness-card p {
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.fairness-verifier {
  margin-top: 16px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
}

.fairness-verifier h2 {
  margin: 0 0 8px;
}

.fairness-verifier p {
  color: var(--text-muted);
  margin: 0;
}

/* ---------- Affiliate page ---------- */
.account-summary[hidden],
.affiliate-page[hidden] {
  display: none;
}

.account-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  align-items: end;
  gap: 48px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 82px 24px 40px;
}

.account-summary-copy h1 {
  max-width: 680px;
  margin: 0 0 14px;
  font-size: clamp(2.4rem, 5vw, 4rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.account-summary-copy .hero-sub {
  max-width: 500px;
  margin: 0;
}

.account-balance-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 154px;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(74, 222, 128, 0.38);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(22, 55, 42, 0.96), rgba(13, 29, 21, 0.96));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22), 0 0 28px rgba(74, 222, 128, 0.08);
}

.account-balance-card::after {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  right: -54px;
  bottom: -68px;
  border: 1px solid rgba(134, 239, 172, 0.32);
  border-radius: 50%;
  box-shadow: 0 0 0 14px rgba(134, 239, 172, 0.04), 0 0 0 28px rgba(134, 239, 172, 0.025);
}

.account-balance-label,
.account-balance-unit {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-balance-card strong {
  position: relative;
  z-index: 1;
  color: var(--green);
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.1;
}

.account-balance-unit {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: none;
}

.affiliate-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 24px 100px;
}

.affiliate-heading {
  max-width: 660px;
  margin-bottom: 36px;
}

.affiliate-heading h1 {
  margin: 0 0 14px;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.05;
}

.affiliate-heading > p:last-child {
  max-width: 560px;
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.affiliate-signup-reward {
  display: flex;
  max-width: 660px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto 32px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  border-radius: 6px;
  background: var(--card);
}

.affiliate-signup-reward h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.affiliate-signup-reward p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

#affiliate-signup-reward {
  flex: 0 0 auto;
  color: var(--green);
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.affiliate-tool {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(17, 40, 29, 0.98), rgba(13, 29, 21, 0.98));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
}

.creator-tool {
  border: 2px solid #a78bfa;
  background:
    radial-gradient(500px circle at 100% 0%, rgba(167, 139, 250, 0.2), transparent 55%),
    linear-gradient(145deg, #211943, #15132a);
  box-shadow: 0 18px 44px rgba(88, 58, 160, 0.24);
}

.creator-tool.creator-mode-on {
  border-color: #2dd4bf;
  background:
    radial-gradient(500px circle at 100% 0%, rgba(45, 212, 191, 0.2), transparent 55%),
    linear-gradient(145deg, #103c3b, #102624);
  box-shadow: 0 18px 44px rgba(13, 148, 136, 0.24);
}

.creator-tool-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 8px;
}

.creator-tool-kicker {
  margin: 0 0 4px;
  color: #c4b5fd;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.creator-mode-on .creator-tool-kicker {
  color: #5eead4;
}

.creator-tool-heading h2 {
  margin: 0;
  font-size: 22px;
}

.creator-mode-indicator {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border: 1px solid #fda4af;
  border-radius: 999px;
  background: rgba(136, 19, 55, 0.36);
  color: #fecdd3;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.creator-mode-on .creator-mode-indicator {
  border-color: #5eead4;
  background: rgba(15, 118, 110, 0.32);
  color: #99f6e4;
}

.creator-mode-indicator-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.creator-tool #creator-status {
  max-width: 780px;
  margin: 12px 0 22px;
  padding: 14px 16px;
  border-left: 3px solid #a78bfa;
  border-radius: 0 10px 10px 0;
  background: rgba(8, 5, 24, 0.32);
  color: #e9ddff;
  font-size: 14px;
  line-height: 1.7;
}

.creator-mode-on #creator-status {
  border-left-color: #5eead4;
  background: rgba(4, 47, 46, 0.32);
  color: #ccfbf1;
}

.creator-tool #creator-toggle {
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  color: #160c2e;
}

.creator-mode-on #creator-toggle {
  background: linear-gradient(135deg, #5eead4, #14b8a6);
  color: #042f2e;
}

.affiliate-rewards {
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.affiliate-rewards h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.affiliate-rewards-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.affiliate-rewards-row button {
  min-height: 48px;
  margin-left: auto;
  padding: 12px 22px;
  font-size: 16px;
}

#claim-affiliate-rewards {
  background: linear-gradient(110deg, var(--green-dark), var(--green), #86efac, var(--green), var(--green-dark));
  background-size: 220% 100%;
  animation: affiliate-claim-shine 1.5s ease-in-out infinite alternate;
}

#claim-affiliate-rewards:disabled {
  animation: none;
}

@keyframes affiliate-claim-shine {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}

.affiliate-rewards-amount {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
}

.affiliate-claim-feedback {
  min-height: 18px;
  margin: 8px 0 0;
  color: #f87171;
  font-size: 13px;
}

.affiliate-code-form label,
.affiliate-link-field label {
  display: block;
  margin-bottom: 9px;
  font-size: 14px;
  font-weight: 700;
}

.affiliate-code-controls {
  display: flex;
  gap: 10px;
}

.affiliate-code-controls .modal-input {
  min-width: 0;
  margin: 0;
}

.affiliate-feedback {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.affiliate-feedback.error {
  color: #f87171;
}

.affiliate-link-field {
  margin-top: 26px;
}

.affiliate-link-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.affiliate-link-button:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}

.affiliate-link-button:not(:disabled):hover {
  border-color: var(--green);
}

.affiliate-link-button > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.affiliate-copy-label {
  flex: 0 0 auto;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

/* ---------- Rewards page ---------- */
.rewards-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 82px 24px 100px;
}

.rewards-heading {
  max-width: 660px;
  margin-bottom: 36px;
}

.rewards-heading h1 {
  margin: 0 0 14px;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.05;
}

.rewards-heading > p:last-child {
  max-width: 560px;
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.daily-reward-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding: 28px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(17, 40, 29, 0.98), rgba(13, 29, 21, 0.98));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
}

.daily-reward-info h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.daily-reward-amount {
  margin: 0;
  color: var(--green);
  font-size: 32px;
  font-weight: 800;
}

.daily-reward-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

#claim-daily-reward {
  background: linear-gradient(110deg, var(--green-dark), var(--green), #86efac, var(--green), var(--green-dark));
  background-size: 220% 100%;
  animation: affiliate-claim-shine 1.5s ease-in-out infinite alternate;
}

#claim-daily-reward:disabled {
  animation: none;
}

.daily-reward-countdown {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.daily-reward-feedback {
  min-height: 18px;
  margin: 14px 0 0;
  color: #f87171;
  font-size: 13px;
}

.daily-reward-modal {
  text-align: center;
}

.daily-reward-modal-icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 12px;
}

.daily-reward-modal .modal-submit {
  width: 100%;
  margin-top: 8px;
}

.daily-reward-success {
  margin: 0 0 20px;
  color: var(--green);
  font-size: 20px;
  font-weight: 800;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  body {
    padding-left: 0;
    padding-top: 0;
  }

  .announcement-banner {
    left: 0;
  }

  .site-header {
    position: sticky;
    bottom: auto;
    left: auto;
    width: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .header-inner {
    height: var(--header-h);
    flex-direction: row;
    align-items: center;
    gap: 24px;
    padding-top: 0;
    padding-bottom: 0;
  }

  .brand {
    display: none;
  }

  .main-nav,
  .header-actions {
    display: none;
  }

  .account-actions {
    position: static;
    transform: none;
    margin-left: auto;
  }

  .burger {
    display: flex;
    margin-left: auto;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 50px;
  }

  .hero-content,
  .hero-discord {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .discord-banner video {
    height: 192px;
  }

  .hero-actions {
    justify-content: center;
  }

  .footer-inner {
    flex-direction: column;
  }

  .fairness-page {
    padding-top: 50px;
  }

  .affiliate-page {
    padding: 50px 24px 72px;
  }

  .rewards-page {
    padding: 50px 24px 72px;
  }

  .daily-reward-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .daily-reward-action {
    align-items: flex-start;
    width: 100%;
  }

  #claim-daily-reward {
    width: 100%;
  }

  .account-summary {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 28px;
    padding-top: 50px;
  }

  .fairness-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .account-summary {
    gap: 22px;
    padding: 38px 16px 26px;
  }

  .account-summary-copy h1 {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .account-balance-card {
    min-height: 136px;
    padding: 20px;
  }

  .affiliate-signup-reward {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
  }

  #affiliate-signup-reward {
    font-size: 32px;
  }

  .affiliate-tool {
    padding: 20px 16px;
  }

  .affiliate-code-controls {
    flex-direction: column;
  }
}

/* ---------- Roulette game ---------- */
.roulette-shell {
  padding: 76px 24px 24px;
}

.roulette-shell .game-shell-header {
  margin-bottom: 16px;
}

.roulette-shell .game-detail-icon-sm {
  width: 48px;
  height: 48px;
}

.roulette-shell .roulette-emoji {
  width: 48px;
  height: 48px;
  font-size: 30px;
}

.roulette-game {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
}

.roulette-panel {
  padding: 16px;
}

.roulette-panel .roulette-choice-row {
  margin: 6px 0 12px;
}

.roulette-panel .dice-stats {
  gap: 8px;
  margin-bottom: 12px;
}

.roulette-panel .dice-stat {
  padding: 8px;
}

.roulette-shell .dice-board {
  min-height: 0;
  padding: 16px;
  gap: 12px;
}

.roulette-shell .dice-result {
  gap: 6px;
  margin-bottom: 0;
}

.roulette-emoji {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  font-size: 40px;
  filter: drop-shadow(0 0 24px rgba(249, 115, 22, 0.6));
}

.roulette-choice-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 20px;
}

.roulette-choice {
  padding: 12px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.roulette-choice:hover {
  transform: translateY(-2px);
}

.roulette-choice-red.active {
  background: linear-gradient(145deg, rgba(255, 77, 109, 0.34), rgba(185, 28, 64, 0.22));
  border-color: #ff4d6d;
  color: var(--text);
  box-shadow: 0 0 18px rgba(255, 77, 109, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.roulette-choice-black.active {
  background: linear-gradient(145deg, rgba(31, 41, 55, 0.95), rgba(3, 7, 18, 0.9));
  border-color: #d1d5db;
  color: var(--text);
  box-shadow: 0 0 18px rgba(209, 213, 219, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.roulette-choice-green.active {
  background: linear-gradient(145deg, rgba(52, 211, 153, 0.36), rgba(5, 150, 105, 0.24));
  border-color: #86efac;
  color: var(--text);
  box-shadow: 0 0 18px rgba(52, 211, 153, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.roulette-track-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 8px 0;
  overflow: hidden;
}

.roulette-wheel {
  position: relative;
  container-type: size;
  width: min(400px, 46vh);
  height: min(400px, 46vh);
  flex-shrink: 0;
}

.roulette-pointer {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 16px solid var(--green);
  filter: drop-shadow(0 0 6px rgba(74, 222, 128, 0.6));
  z-index: 3;
}

.roulette-track {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.03), transparent 70%);
  transform: rotate(0deg);
  transition: transform 4.2s cubic-bezier(0.12, 0.66, 0.1, 1);
}

.roulette-pocket {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(54px, 9.5cqw);
  height: min(54px, 9.5cqw);
  margin: max(-27px, -4.75cqw) 0 0 max(-27px, -4.75cqw);
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text);
  transform: rotate(var(--angle)) translate(var(--radius), 0) rotate(calc(var(--angle) * -1));
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.roulette-pocket-number {
  display: block;
  font-size: clamp(9px, 2.8cqw, 15px);
  font-weight: 700;
  transform: rotate(0deg);
  transition: transform 4.2s cubic-bezier(0.12, 0.66, 0.1, 1);
}

.roulette-pocket.red {
  background: linear-gradient(145deg, #ff4d6d, #b91c40);
  border-color: #ff8097;
  box-shadow: 0 5px 14px rgba(185, 28, 64, 0.3);
}

.roulette-pocket.black {
  background: linear-gradient(145deg, #1f2937, #030712);
  border-color: #6b7280;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.roulette-pocket.green {
  background: linear-gradient(145deg, #34d399, #059669);
  border-color: #a7f3d0;
  box-shadow: 0 5px 18px rgba(5, 150, 105, 0.34);
}

.roulette-pocket.active {
  outline: 2px solid var(--text);
  z-index: 2;
  transform: rotate(var(--angle)) translate(var(--radius), 0) rotate(calc(var(--angle) * -1)) scale(1.25);
}

.roulette-history {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.roulette-history-chip.red {
  color: #ff5c7a;
}

.roulette-history-chip.black {
  color: #d1d5db;
}

.roulette-history-chip.green {
  color: #6ee7b7;
}

@media (max-width: 800px) {
  .roulette-game {
    grid-template-columns: 1fr;
  }

  .roulette-wheel {
    width: min(340px, 40vh, calc(100vw - 64px));
    height: min(340px, 40vh, calc(100vw - 64px));
  }
}

@media (max-width: 520px) {
  .roulette-shell {
    padding: 48px 16px 16px;
  }

  .roulette-shell .game-shell-header {
    gap: 12px;
    margin-bottom: 12px;
  }

  .roulette-shell .game-shell-sub {
    font-size: 13px;
  }

  .roulette-panel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 12px;
  }

  .roulette-panel > :nth-child(1),
  .roulette-panel > :nth-child(3) {
    margin: 0;
  }

  .roulette-panel > :nth-child(5),
  .roulette-panel > :nth-child(6),
  .roulette-panel > :nth-child(7) {
    grid-column: 1 / -1;
  }

  .roulette-panel .roulette-choice-row {
    margin: 0;
    gap: 6px;
  }

  .roulette-choice {
    padding: 9px 6px;
  }

  .roulette-panel .dice-stats {
    margin: 0;
  }

  .roulette-shell .dice-board {
    padding: 12px;
    gap: 8px;
  }

  .roulette-wheel {
    width: min(280px, 28vh, calc(100vw - 56px));
    height: min(280px, 28vh, calc(100vw - 56px));
  }

}

@media (max-width: 520px) and (max-height: 700px) {
  .roulette-shell {
    padding-top: 24px;
  }

  .roulette-shell .game-shell-sub {
    display: none;
  }

  .roulette-panel {
    gap: 4px;
    padding: 8px;
  }

  .roulette-shell .dice-board {
    gap: 4px;
    padding: 8px;
  }

  .roulette-track-wrap {
    padding: 4px 0;
  }

}

.plinko-game {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
}

.plinko-emoji {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  font-size: 40px;
  filter: drop-shadow(0 0 24px rgba(20, 184, 166, 0.6));
}

.plinko-choice-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 20px;
}

.plinko-risk {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.plinko-risk.active {
  background: rgba(20, 184, 166, 0.14);
  border-color: #14b8a6;
  color: var(--text);
}

.plinko-board-wrap {
  gap: 10px;
  padding: 24px 16px 16px;
}

.plinko-board {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 4 / 3;
}

.plinko-pegs {
  position: absolute;
  inset: 0;
}

.plinko-peg {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.6;
  transform: translate(-50%, -50%);
}

.plinko-balls {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.plinko-ball {
  position: absolute;
  top: 0;
  left: 50%;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fef3c7, #eab308 65%, #a16207);
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.7);
}

.plinko-slots {
  display: flex;
  gap: 4px;
  width: 100%;
  max-width: 560px;
}

.plinko-slot {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 8px 2px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: clamp(10px, 1.8vw, 12px);
  font-weight: 800;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.plinko-slot.landed {
  color: var(--bg);
  background: #eab308;
  border-color: #eab308;
  transform: translateY(-4px) scale(1.08);
}

.plinko-history {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.plinko-history-chip {
  min-width: 48px;
  padding: 6px 8px;
  text-align: center;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  background: var(--bg);
  border: 1px solid var(--border);
}

.plinko-history-chip.win {
  color: var(--green);
  border-color: rgba(34, 197, 94, 0.4);
}

.plinko-history-chip.lose {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.4);
}

@media (max-width: 800px) {
  .plinko-game {
    grid-template-columns: 1fr;
  }
}

/* Chat panel */
#chat-toggle {
  position: fixed; right: 16px; bottom: 16px; z-index: 1001;
  display: flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; border: 1px solid rgba(74, 222, 128, 0.5);
  background: linear-gradient(135deg, var(--green-dark), #166534); color: var(--text);
  font-weight: 700; cursor: pointer; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), 0 0 14px rgba(74, 222, 128, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#chat-toggle:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(74, 222, 128, 0.45); }
#chat-panel.open ~ #chat-toggle { bottom: auto; top: calc(var(--header-h) + 10px); right: 312px; padding: 8px 14px; font-size: 13px; }
body.sign-in-modal-open #chat-panel,
body.sign-in-modal-open #chat-toggle { display: none; }
#chat-panel {
  position: fixed; top: var(--header-h); right: 0; bottom: 0; width: 300px; z-index: 1000;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
  border-left: 1px solid var(--border); box-shadow: -8px 0 30px rgba(0, 0, 0, 0.4);
  transform: translateX(100%); transition: transform 0.25s ease;
}
#chat-panel.open { transform: translateX(0); }
.chat-header {
  display: flex; justify-content: space-between; align-items: center; padding: 14px 16px;
  font-weight: 800; letter-spacing: 0.03em; border-bottom: 1px solid var(--border);
  background: rgba(17, 40, 29, 0.8);
}
.chat-header span::before {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 8px var(--green);
}
.chat-online { margin-left: auto; margin-right: 12px; font-size: 12px; font-weight: 600; color: var(--text-muted); display: inline-flex; align-items: center; gap: 5px; }
.chat-online i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }
.chat-online b { color: var(--green); font-variant-numeric: tabular-nums; }
.chat-rain {
  flex: none; margin: 10px 12px 0; padding: 10px 14px; border: 1px solid rgba(253, 224, 71, 0.55); border-radius: 12px; color: #fffbeb;
  background: linear-gradient(135deg, #78350f, #b45309); box-shadow: 0 4px 14px rgba(180, 83, 9, 0.35), inset 0 1px 0 rgba(255, 251, 235, 0.12);
  display: flex; flex-direction: column; gap: 6px;
}
.chat-rain-top { display: flex; justify-content: space-between; align-items: center; font-weight: 800; }
.chat-rain-timer { font-variant-numeric: tabular-nums; background: rgba(69, 26, 3, 0.55); border: 1px solid rgba(253, 224, 71, 0.3); padding: 2px 8px; border-radius: 8px; font-size: 13px; color: #fef3c7; }
.chat-rain-pool { font-size: 14px; }
.chat-rain-pool strong { font-size: 18px; color: #fde047; text-shadow: 0 0 10px rgba(253, 224, 71, 0.25); }
.chat-rain-pool small { color: #fef3c7; opacity: 0.9; }
.chat-rain-actions { display: flex; gap: 6px; }
.chat-rain-actions input { flex: 1; min-width: 0; padding: 6px 8px; border-radius: 8px; border: 1px solid rgba(253, 224, 71, 0.35); background: rgba(69, 26, 3, 0.45); color: #fffbeb; font-size: 13px; }
.chat-rain-actions input::placeholder { color: rgba(254, 243, 199, 0.7); }
.chat-rain-actions input:focus { outline: none; border-color: #fde047; box-shadow: 0 0 0 2px rgba(253, 224, 71, 0.2); }
.chat-rain-actions .btn { padding: 6px 10px; border: 1px solid rgba(253, 224, 71, 0.65); background: linear-gradient(135deg, #facc15, #d97706); color: #451a03; font-size: 13px; font-weight: 800; }
.chat-rain-actions .btn:hover:not(:disabled) { background: linear-gradient(135deg, #fde047, #f59e0b); }
.chat-close { background: none; border: 0; color: var(--text-muted); font-size: 24px; line-height: 1; cursor: pointer; transition: color 0.15s; }
.chat-close:hover { color: var(--text); }
.chat-messages { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.chat-empty { margin: auto; color: var(--text-muted); font-size: 13px; text-align: center; }
.chat-message { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--text); word-break: break-word; animation: chat-in 0.2s ease; }
.chat-avatar {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 800; color: #07130d; background: var(--chat-user-color, var(--green));
}
.chat-bubble {
  background: color-mix(in srgb, var(--chat-user-color, var(--green)) 18%, var(--card));
  border: 1px solid color-mix(in srgb, var(--chat-user-color, var(--green)) 45%, var(--border));
  border-radius: 4px 12px 12px 12px; padding: 6px 10px; min-width: 0;
}
.chat-user { display: block; font-size: 12px; font-weight: 700; color: var(--chat-user-color, var(--green)); margin-bottom: 1px; }
.chat-message.mine { flex-direction: row-reverse; }
.chat-message.mine .chat-bubble { border-radius: 12px 4px 12px 12px; }
.chat-message.mine .chat-user { text-align: right; }
@keyframes chat-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.chat-error { padding: 6px 14px; color: #fca5a5; font-size: 13px; background: rgba(239, 68, 68, 0.12); }
.chat-mod { margin-left: 8px; padding: 0 6px; font-size: 11px; border: 1px solid var(--border); border-radius: 6px; background: transparent; color: #fca5a5; cursor: pointer; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); background: rgba(17, 40, 29, 0.8); }
.chat-form input {
  flex: 1; min-width: 0; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.chat-form input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.18); }
.chat-form input:disabled { opacity: 0.6; cursor: not-allowed; }
.chat-form .btn { border-radius: 999px; padding: 8px 16px; }
@media (min-width: 901px) { body.chat-open { padding-right: 300px; } }
@media (max-width: 900px) { #chat-panel { width: 100%; } #chat-panel.open ~ #chat-toggle { right: 12px; } }

/* Mobile hardening */
@media (max-width: 800px) {
  html,
  body {
    overflow-x: hidden;
  }

  .plinko-game,
  .dice-game,
  .keno-game,
  .coinflip-game,
  .blackjack-game,
  .mines-game,
  .towers-game {
    grid-template-columns: minmax(0, 1fr);
  }

  .plinko-game > *,
  .dice-game > *,
  .keno-game > *,
  .coinflip-game > *,
  .blackjack-game > *,
  .mines-game > *,
  .towers-game > * {
    min-width: 0;
  }
}
/* Mobile header: keep logo and sign-in visible */
@media (max-width: 900px) {
  .brand {
    position: static;
    display: flex;
    width: auto;
    height: auto;
    padding: 0;
    border: 0;
    background: none;
    font-size: 18px;
  }

  .header-actions {
    display: flex;
    position: static;
    margin-left: auto;
  }

  .header-actions .btn,
  .account-actions .btn {
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
  }

  .header-actions + .account-actions,
  .account-actions {
    margin-left: auto;
  }

  body:has(#account-actions:not([hidden])) .header-actions,
  .mobile-actions {
    display: none;
  }

  .burger {
    margin-left: 0;
  }

  .header-inner {
    gap: 10px;
  }
}

@media (max-width: 520px) {
  .brand-text {
    display: none;
  }
}
@media (max-width: 520px) {
  .plinko-board-wrap {
    padding: 16px 8px 12px;
  }

  .plinko-slots {
    gap: 2px;
  }

  .plinko-slot {
    min-width: 0;
    padding: 6px 0;
    border-radius: 4px;
    font-size: 8px;
    letter-spacing: -0.04em;
  }
}.chat-modal-overlay { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.6); }
.chat-modal { width: min(420px, 92vw); padding: 20px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg); color: var(--text); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); }
.chat-modal-title { margin: 0 0 14px; font-size: 18px; }
.chat-modal-label { margin: 12px 0 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; opacity: 0.7; }
.chat-modal-options { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-modal-option { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; }
.chat-modal-option small { opacity: 0.65; font-size: 11px; }
.chat-modal-option:hover { border-color: var(--green); }
.chat-modal-option.selected { border-color: var(--green); background: rgba(74, 222, 128, 0.15); }
.chat-modal-reason { width: 100%; box-sizing: border-box; resize: vertical; padding: 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; }
.chat-modal-error { margin-top: 10px; color: #fca5a5; font-size: 13px; }
.chat-modal-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.chat-status { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 6px; font-size: 10px; font-weight: 800; letter-spacing: 0.04em; vertical-align: middle; }
.chat-status.ban { background: rgba(239, 68, 68, 0.25); color: #fca5a5; }
.chat-status.timeout { background: rgba(250, 204, 21, 0.22); color: #fde68a; }
.chat-message.restricted .chat-bubble { border-color: rgba(239, 68, 68, 0.5); }
.chat-user-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.chat-user-row .chat-user { display: inline-block; margin-bottom: 1px; }
.chat-user-row .chat-status { margin-left: 0; }
.chat-tip-hint { padding: 6px 14px; font-size: 12px; color: var(--text); opacity: 0.85; background: rgba(74, 222, 128, 0.08); border-top: 1px solid var(--border); }
.chat-tip-hint code { padding: 0 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); }
.chat-tip-notice { align-self: center; margin: 4px 0; padding: 4px 10px; border-radius: 999px; font-size: 12px; color: var(--green); background: rgba(74, 222, 128, 0.12); }
.chat-message.tippable { cursor: pointer; }
.chat-message.tippable:hover .chat-bubble { border-color: var(--green); }
.chat-modal .chat-modal-reason[data-role=amount] { margin-top: 10px; }

.chat-title { font-size: 10px; font-weight: 800; color: var(--title-color, var(--text-muted)); border: 1px solid var(--title-color, var(--border)); border-radius: 4px; padding: 0 5px; line-height: 15px; text-shadow: 0 0 6px var(--title-color); }

.level-card { margin-top: 24px; padding: 28px; border: 1px solid var(--border); border-left: 4px solid var(--green); border-radius: 8px; background: linear-gradient(145deg, rgba(17, 40, 29, 0.98), rgba(13, 29, 21, 0.98)); }
.level-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.level-head h2 { margin: 0; font-size: 24px; }
.level-title { font-weight: 800; font-size: 18px; }
.level-bar { height: 12px; margin-top: 14px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.level-bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--green-dark), var(--green)); transition: width 0.4s; }
.level-xp, .level-hint { margin: 8px 0 0; color: var(--text-muted); font-size: 13px; }
.level-milestones { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.level-milestones li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 6px; background: rgba(255, 255, 255, 0.04); opacity: 0.45; font-size: 13px; font-weight: 700; }
.level-milestones li.unlocked { opacity: 1; }

.nav-level { display: inline-flex; flex-direction: column; gap: 3px; min-width: 110px; margin-right: 12px; text-decoration: none; vertical-align: middle; }
.nav-level-text { font-size: 12px; font-weight: 800; color: var(--title-color, var(--green)); white-space: nowrap; }
.nav-level-bar { display: block; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.nav-level-fill { display: block; height: 100%; width: 0; background: var(--title-color, var(--green)); transition: width 0.4s; }
@media (max-width: 700px) { .nav-level { display: none; } }

.chat-title-animated {
  background: var(--title-gradient);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  animation: chat-title-gradient var(--title-speed, 4s) linear infinite;
}
@keyframes chat-title-gradient { from { background-position: 0% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .chat-title-animated { animation: none; } }



.nav-level-animated .nav-level-text {
  background: var(--title-gradient);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: chat-title-gradient var(--title-speed, 4s) linear infinite;
}
.nav-level-animated .nav-level-fill {
  background: var(--title-gradient);
  background-size: 200% 100%;
  animation: chat-title-gradient var(--title-speed, 4s) linear infinite;
}
@media (prefers-reduced-motion: reduce) { .nav-level-animated .nav-level-text, .nav-level-animated .nav-level-fill { animation: none; } }

.promo-card { margin-top: 24px; padding: 28px; border: 1px solid var(--border); border-left: 4px solid var(--green); border-radius: 8px; background: linear-gradient(145deg, rgba(17, 40, 29, 0.98), rgba(13, 29, 21, 0.98)); }
.promo-card h2 { margin: 0 0 8px; font-size: 18px; }
.promo-hint { margin: 0 0 16px; color: var(--text-muted); font-size: 14px; }
.promo-form { display: flex; gap: 12px; flex-wrap: wrap; }
.promo-form input { flex: 1; min-width: 200px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: rgba(0, 0, 0, 0.25); color: inherit; font: inherit; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.promo-feedback { margin: 12px 0 0; min-height: 1.2em; font-size: 14px; }
.promo-feedback.success { color: var(--green); }
.promo-feedback.error { color: #f87171; }


/* Mobile polish: header fits logged-in actions, home game grid is two columns */
@media (max-width: 520px) {
  .header-inner {
    gap: 6px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .header-inner > *,
  .account-actions > * {
    min-width: 0;
  }

  .account-actions {
    flex: 1 1 auto;
    justify-content: flex-end;
    gap: 4px;
  }

  .header-actions .btn,
  .account-actions .btn {
    padding: 7px 9px;
    font-size: 12px;
  }

  .account-balance {
    padding: 4px 6px;
  }

  .burger {
    flex: 0 0 auto;
  }

  .games-section,
  .live-plays-section {
    padding-right: 16px;
    padding-left: 16px;
  }

  .games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .game-card {
    padding: 12px 8px;
  }
}


/* Mobile polish: admin pages (inline page styles zero out the container's side padding) */
@media (max-width: 900px) {
  main.container.hs-page {
    padding-right: 16px;
    padding-left: 16px;
    overflow-wrap: anywhere;
  }

  main.container.hs-page .hs-controls > input,
  main.container.hs-page .hs-controls > select {
    flex: 1 1 140px;
    min-width: 0;
    box-sizing: border-box;
  }

  main.container.hs-page .hs-controls > .btn {
    flex: 1 1 auto;
  }

  main.container.hs-page img,
  main.container.hs-page canvas,
  main.container.hs-page pre {
    max-width: 100%;
  }

  main.container.hs-page pre,
  main.container.hs-page .details {
    overflow-x: auto;
  }

  main.container.hs-page:has(.hs-grid) .hs-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 900px) {
  main.container.hs-page .hs-controls > select {
    padding: 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: inherit;
  }

  main.container.hs-page .hs-controls > select option {
    background: #1a1d24;
    color: #fff;
  }
}

/* Admin pages on mobile: allow pinch-zoom and stop iOS auto-zooming into inputs (needs >=16px font) */
@media (max-width: 900px) {
  html:has(main.hs-page),
  body:has(main.hs-page) {
    touch-action: pan-x pan-y pinch-zoom;
  }

  body:has(main.hs-page) input:not([type="checkbox"]):not([type="radio"]),
  body:has(main.hs-page) select,
  body:has(main.hs-page) textarea {
    font-size: 16px !important;
  }
}

@media (max-width: 800px) {
  .keno-number {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    -webkit-appearance: none;
    appearance: none;
  }
}
