:root {
  --bg: #08111f;
  --bg-alt: #0d1a2f;
  --panel: rgba(10, 20, 37, 0.72);
  --panel-strong: rgba(12, 24, 43, 0.9);
  --line: rgba(153, 179, 215, 0.1);
  --text: #edf4ff;
  --muted: #94a8c9;
  --gold: #f0b90b;
  --silver: #9aa7bd;
  --doge: #c2a633;
  --green: #3dd598;
  --red: #ff6b7a;
  --cyan: #54c6eb;
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(84, 198, 235, 0.12), transparent 32%),
    radial-gradient(circle at bottom right, rgba(240, 185, 11, 0.1), transparent 28%),
    linear-gradient(135deg, #07101d 0%, #08182c 52%, #0d1322 100%);
  color: var(--text);
  overflow-x: hidden;
  overflow-y: auto;
  font-size: 14px;
}

button,
input,
select {
  font: inherit;
}

textarea {
  font: inherit;
}

.bg-orb {
  position: fixed;
  inset: auto;
  width: 22rem;
  height: 22rem;
  filter: blur(50px);
  opacity: 0.23;
  pointer-events: none;
}

.toast-stack {
  position: fixed;
  top: 0.85rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: grid;
  gap: 0.5rem;
  pointer-events: none;
  justify-items: center;
}

.toast {
  min-width: 320px;
  max-width: 460px;
  padding: 0.9rem 1.05rem;
  border-radius: 16px;
  border: 1px solid rgba(61, 213, 152, 0.3);
  background: rgba(8, 24, 18, 0.94);
  color: #8df0b9;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
  font-size: 0.94rem;
  line-height: 1.35;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.26s ease, transform 0.26s ease;
}

.toast-title {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.28rem;
  color: #c7ffdc;
}

.toast-detail {
  color: #8df0b9;
  font-size: 0.86rem;
}

.toast-hide {
  opacity: 0;
  transform: translateY(-8px);
}

.orb-a {
  top: -4rem;
  right: -5rem;
  background: #2dd4bf;
}

.orb-b {
  bottom: -6rem;
  left: -4rem;
  background: #f0b90b;
}

.grid-shell {
  position: relative;
  z-index: 1;
  width: 100vw;
  min-height: 100vh;
  margin: 0;
  padding: 0.65rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0.7rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.brand-panel,
.play-panel {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.brand-panel {
  padding: 0.9rem;
  min-height: calc(100vh - 1.5rem);
  position: sticky;
  top: 0.65rem;
  align-self: start;
}

.play-panel {
  min-height: calc(100vh - 1.5rem);
  min-width: 0;
}

.brand-lockup h1,
.hero-strip h2 {
  margin: 0;
  line-height: 1;
}

.brand-lockup h1 {
  font-size: clamp(1.9rem, 4.8vw, 2.8rem);
  letter-spacing: -0.05em;
  font-weight: 700;
}

.lede {
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.95rem;
}

.eyebrow,
.mini-label,
.stat-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.66rem;
  color: var(--muted);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.section-head h2,
.verify-box h3 {
  margin: 0;
}

.wallet-card,
.metric,
.hero-strip,
.inset-card,
.result-card,
.verify-box,
.history-panel,
.game-card,
.fairness-card,
.auth-card,
.chat-panel {
  padding: 0.75rem;
}

.hidden {
  display: none !important;
}

.wallet-card {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 0.12rem;
}

.wallet-card strong {
  font-size: 1rem;
  font-weight: 600;
}

.wallet-card .ticker {
  font-family: "IBM Plex Mono", monospace;
  color: var(--muted);
}

.inset-card {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.03);
}

.auth-card {
  background: rgba(255, 255, 255, 0.035);
}

.auth-forms,
.auth-form,
.session-panel {
  display: grid;
  gap: 0.7rem;
}

.otp-actions {
  display: grid;
  gap: 0.5rem;
}

.auth-toggle {
  display: flex;
  gap: 0.65rem;
}

.auth-toggle .currency-tab {
  flex: 1;
}

.session-panel {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.session-user strong {
  display: block;
  font-size: 1rem;
  margin-top: 0.25rem;
  font-weight: 600;
}

.session-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin-top: 0.15rem;
  margin-bottom: 0.8rem;
}

.session-chip {
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(84, 198, 235, 0.24);
  background: rgba(84, 198, 235, 0.09);
  color: #d7ebff;
  font-size: 0.76rem;
  line-height: 1;
}

.account-form {
  max-width: 460px;
}

.compact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.steps {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.9rem;
}

.hero-strip {
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 0.42rem 0.7rem;
}

.hero-stats {
  display: flex;
  gap: 0.6rem;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.top-stat-card {
  padding: 0.48rem 0.72rem 0.44rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.top-stat-lines {
  display: grid;
  gap: 0.16rem;
}

.top-stat-lines div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: baseline;
}

.top-stat-lines span {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.top-stat-lines strong {
  text-align: right;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.25;
  word-break: break-word;
}

.top-stat-footer {
  align-self: center;
  padding: 0.22rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(84, 198, 235, 0.22);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.74rem;
  color: var(--text);
}

.hero-stats strong {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1.2fr) minmax(280px, 0.9fr);
  gap: 0.7rem;
  min-width: 0;
}

.currency-switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.currency-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-width: 0;
}

.selected-balance-inline {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  padding: 0.2rem 0;
  flex-shrink: 0;
  text-align: right;
}

.selected-balance-inline strong {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92rem;
}

.balance-action-row {
  display: flex;
  gap: 0.42rem;
}

.compact-button {
  min-height: 0;
  padding: 0.38rem 0.72rem;
  font-size: 0.78rem;
}

.direction-toggle,
.tab-strip {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.currency-tab,
.ghost-button,
.primary-button,
.secondary-button,
.seed-fill-button {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0.52rem 0.8rem;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
  font-size: 0.9rem;
  font-weight: 500;
}

.currency-tab:hover,
.ghost-button:hover,
.primary-button:hover,
.secondary-button:hover,
.seed-fill-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.28);
}

.currency-tab.active {
  background: linear-gradient(135deg, rgba(84, 198, 235, 0.22), rgba(240, 185, 11, 0.18));
  border-color: rgba(84, 198, 235, 0.45);
}

.cashier-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.cashier-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 18, 0.76);
  backdrop-filter: blur(6px);
}

.cashier-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  padding: 0.95rem;
  display: grid;
  gap: 0.7rem;
}

.cashier-address-box {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.cashier-address-box strong {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  word-break: break-all;
  color: #eef6ff;
}

.currency-badge {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(84, 198, 235, 0.14);
  border: 1px solid rgba(84, 198, 235, 0.3);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.86rem;
}

input {
  width: 100%;
  padding: 0.62rem 0.78rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
}

select {
  width: 100%;
  padding: 0.62rem 0.78rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
}

textarea {
  width: 100%;
  padding: 0.62rem 0.78rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  resize: vertical;
  min-height: 108px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(84, 198, 235, 0.22);
  border-color: rgba(84, 198, 235, 0.42);
}

.slider-wrap {
  margin-top: 0.45rem;
}

.slider-head,
.slider-scale {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

input[type="range"] {
  padding: 0;
  accent-color: var(--cyan);
}

.metrics {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.metric {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.metric strong {
  display: block;
  margin-top: 0.22rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.bet-actions {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.primary-button {
  background: linear-gradient(135deg, #54c6eb, #f0b90b);
  color: #04101c;
  border: none;
  font-weight: 700;
}

.secondary-button {
  margin-top: 0.55rem;
  width: 100%;
}

.result-card {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.result-card strong {
  font-size: 0.95rem;
  font-weight: 600;
}

.result-card.win {
  background: rgba(61, 213, 152, 0.13);
  border-color: rgba(61, 213, 152, 0.3);
}

.result-card.lose {
  background: rgba(255, 107, 122, 0.12);
  border-color: rgba(255, 107, 122, 0.3);
}

.result-card.neutral {
  background: rgba(255, 255, 255, 0.03);
}

.seed-grid {
  display: grid;
  gap: 0.55rem;
}

.seed-grid code,
.seed-detail,
table,
.ticker {
  font-family: "IBM Plex Mono", monospace;
}

.seed-grid code,
.seed-detail {
  display: block;
  margin-top: 0.18rem;
  font-size: 0.78rem;
  color: #c6d6f0;
  word-break: break-all;
}

.verify-box {
  margin-top: 0.7rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.verify-side-panel {
  margin-top: 0.6rem;
  padding: 0.65rem;
}

.referral-box {
  margin-bottom: 0.9rem;
}

.testnet-box {
  margin-bottom: 0.9rem;
  padding: 0.8rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.testnet-box h4 {
  margin: 0;
}

.deposit-history-grid {
  margin-top: 0.85rem;
}

.bsc-rpc-box {
  margin-bottom: 0.85rem;
}

.bsc-wallet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.bsc-wallet-actions .secondary-button {
  width: auto;
  margin-top: 0;
}

.testnet-address-list {
  display: grid;
  gap: 0.55rem;
  margin: 0.75rem 0 0.85rem;
}

.testnet-address-card strong {
  font-size: 0.86rem;
  word-break: break-all;
}

.referral-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
}

.verify-result {
  margin-bottom: 0;
  color: var(--muted);
}

.history-panel {
  overflow: hidden;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-panel {
  display: grid;
  gap: 0.45rem;
  height: 100%;
  min-width: 0;
}

.chat-messages {
  min-height: 0;
  height: 228px;
  max-height: 228px;
  overflow-y: auto;
  display: grid;
  gap: 0.22rem;
  padding-right: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(84, 198, 235, 0.45) transparent;
}

.chat-messages::-webkit-scrollbar {
  width: 8px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(84, 198, 235, 0.45);
  border-radius: 999px;
}

.chat-message,
.chat-empty {
  border-radius: 14px;
  border: 1px solid rgba(84, 198, 235, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(8, 18, 34, 0.84);
  padding: 0.45rem 0.62rem;
}

.chat-message-head {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.08rem;
}

.chat-id {
  color: rgba(61, 213, 152, 0.82);
  margin-left: 0.12rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.79rem;
}

.chat-time {
  color: var(--muted);
  font-size: 0.72rem;
}

.chat-name {
  color: #3dd598;
  font-weight: 700;
}

.chat-line {
  margin: 0;
  line-height: 1.35;
  word-break: break-word;
  font-size: 0.9rem;
}

.chat-sep {
  color: #3dd598;
  margin: 0 0.32rem 0 0.2rem;
}

.chat-text-inline {
  color: #ffd84d;
  line-height: 1.35;
  word-break: break-word;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: end;
  min-width: 0;
}

.chat-form .primary-button {
  min-width: 92px;
}

.chat-form label {
  min-width: 0;
}

.chat-form input {
  min-width: 0;
}

.chat-form label span {
  color: #dbe8ff;
}

.game-card,
.fairness-card {
  padding: 0.65rem;
}

.chat-empty {
  color: var(--muted);
}

.support-copy {
  margin-top: 0;
}

.support-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.ops-content {
  display: grid;
  gap: 0.9rem;
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.master-hero-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.ops-card {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.8rem;
}

.ops-card h4 {
  margin: 0 0 0.7rem;
}

.ops-summary,
.ops-list {
  display: grid;
  gap: 0.55rem;
}

.ops-stat,
.ops-item {
  border-radius: 12px;
  border: 1px solid rgba(84, 198, 235, 0.12);
  background: rgba(8, 18, 34, 0.55);
  padding: 0.65rem;
}

.ops-stat span,
.ops-stat small {
  display: block;
  color: var(--muted);
}

.ops-stat strong {
  display: block;
  margin: 0.18rem 0;
}

.ops-item-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.35rem;
}

.ops-item p {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
}

.ops-form {
  margin-top: 0.7rem;
}

.ops-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.6rem;
}

.check-row {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.support-ticket,
.support-empty {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.72rem;
}

.support-ticket-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.35rem;
}

.support-ticket p {
  margin: 0 0 0.45rem;
  color: var(--text);
  line-height: 1.45;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.chat-head {
  margin-bottom: 0;
}

table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  padding: 0.55rem 0.5rem;
  border-top: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.profit-win {
  color: var(--green);
}

.profit-lose {
  color: var(--red);
}

.seed-cell {
  display: grid;
  gap: 0.35rem;
  min-width: 160px;
  white-space: normal;
}

.seed-fill-button {
  padding: 0.42rem 0.62rem;
}

.seed-detail {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 220px;
}

.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 1.1rem;
  font-size: 0.9rem;
}

@media (max-width: 1080px) {
  .grid-shell,
  .game-layout,
  .stats-strip {
    grid-template-columns: 1fr;
  }

  .ops-grid {
    grid-template-columns: 1fr;
  }

  .master-hero-grid {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    position: static;
    min-height: auto;
  }

  .play-panel {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .grid-shell {
    width: 100%;
    padding: 0.5rem;
  }

  .form-grid,
  .metrics,
  .result-card,
  .chat-form,
  .session-panel,
  .referral-row {
    grid-template-columns: 1fr;
  }

  .currency-switch-row {
    flex-direction: column;
    align-items: stretch;
  }

  .selected-balance-inline {
    justify-content: space-between;
  }

  .chat-form .primary-button {
    width: 100%;
    min-width: 0;
  }

  .hero-strip,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-stats {
    width: 100%;
    justify-content: space-between;
  }
}
