* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--grad-hero);
  color: var(--text-100);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: inline-block; }
.app { min-height: 100vh; }
.container { width: min(1200px, 92vw); margin: 0 auto; padding: var(--space-32) 0; }
h1, h2, h3 { font-family: var(--font-display); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; cursor: pointer; border-radius: var(--r-24); padding: 14px 24px; font-weight: 700; transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease; text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--sol-cyan); outline-offset: 2px; }
.btn-primary { background: var(--grad-cta); color: #061014; box-shadow: var(--shadow-neon); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 18px rgba(153,69,255,.8), 0 0 42px rgba(20,241,149,.5), 0 0 64px rgba(0,255,255,.35); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary { background: rgba(255,255,255,0.06); color: var(--text-100); border: 1px solid rgba(0,255,255,.3); backdrop-filter: var(--blur-soft); }
.btn-secondary:hover { border-color: rgba(153,69,255,.5); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

.input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(153,69,255,.35); background: rgba(255,255,255,.06); color: var(--text-100); }
.input::placeholder { color: var(--text-700); }

.card { background: var(--bg-glass); border-radius: var(--r-24); border: 1px solid rgba(0,255,255,.18); box-shadow: var(--shadow-neon); backdrop-filter: var(--blur-strong); }
.section-title { font-size: clamp(20px, 2.5vw, 28px); font-weight: 800; letter-spacing: .5px; margin: var(--space-24) 0; }

.hero { position: relative; display: grid; grid-template-columns: 1fr; align-items: center; padding: var(--space-64) 0; }
.hero-content { text-align: center; }
.hero-title { font-size: clamp(36px, 6vw, 64px); line-height: 1.05; margin: 0 0 var(--space-16); letter-spacing: .5px; }
.hero-sub { font-size: clamp(16px, 2.2vw, 20px); color: var(--text-300); margin: 0 0 var(--space-24); }
.hero-actions { display: inline-flex; gap: 16px; }
.hero-decor { position: absolute; inset: 0; pointer-events: none; }
.orb { position: absolute; border-radius: 999px; filter: blur(40px); opacity: .45; }
.orb-a { width: clamp(160px, 30vw, 280px); height: clamp(160px, 30vw, 280px); left: 5%; top: 10%; background: radial-gradient(circle, rgba(153,69,255,.8), rgba(0,0,0,0)); }
.orb-b { width: clamp(140px, 24vw, 220px); height: clamp(140px, 24vw, 220px); right: 8%; top: 18%; background: radial-gradient(circle, rgba(0,255,255,.8), rgba(0,0,0,0)); }

.slot { display: grid; place-items: center; padding: var(--space-48) 0; }
.slot-card { width: min(980px, 96vw); padding: var(--space-24); border-radius: var(--r-24); background: linear-gradient(180deg, rgba(16,24,32,.65), rgba(10,14,20,.65)); border: 1px solid rgba(153,69,255,.25); box-shadow: var(--shadow-neon); backdrop-filter: blur(14px) saturate(115%); }
.cabinet { position: relative; perspective: 1000px; transform-style: preserve-3d; }
.cabinet:hover { transform: rotateX(1deg) rotateY(-1deg); }
.cabinet-top { position: absolute; left: 50%; transform: translateX(-50%); top: -22px; width: 50%; height: 18px; border-radius: 12px; background: linear-gradient(90deg, rgba(153,69,255,.9), rgba(0,255,255,.9)); box-shadow: 0 0 16px rgba(153,69,255,.8), 0 0 28px rgba(0,255,255,.5); }
.slot-header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: var(--space-16); }
.slot-counter { font-weight: 700; }
.slot-note { color: var(--sol-teal); opacity: .9; }
.reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: center; padding: var(--space-16); border-radius: var(--r-16); background: rgba(255,255,255,.05); border: 1px solid rgba(0,255,255,.18); }
.reel { position: relative; height: 300px; overflow: hidden; border-radius: var(--r-8); background: radial-gradient(120px 180px at 50% 50%, rgba(255,255,255,.06), rgba(0,0,0,0)); box-shadow: var(--shadow-inner), 0 12px 24px rgba(0,0,0,.45); transform: translateZ(20px); }
.reel::before { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 1px solid rgba(153,69,255,.25); box-shadow: inset 0 30px 40px rgba(0,0,0,.35), inset 0 -30px 40px rgba(0,0,0,.35); pointer-events: none; }
.reel-track { list-style: none; padding: 0; margin: 0; display: grid; grid-auto-rows: 84px; row-gap: 10px; align-content: start; transform: translateY(0); }
.symbol { display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: .5px; color: var(--text-100); text-shadow: 0 1px 0 rgba(0,0,0,.5); }
.reel-reflection { position: absolute; inset: 0; background: var(--grad-reel-glow); pointer-events: none; mix-blend-mode: screen; opacity: .25; }
.slot-actions { display: grid; place-items: center; padding-top: var(--space-16); }
.btn-spin { min-width: 180px; }
.slot-announce { text-align: center; margin-top: var(--space-12); min-height: 28px; font-weight: 700; color: var(--sol-teal); }
.slot-announce.loss { color: #ff6b81; }

.wallet-bar { display: flex; gap: 12px; align-items: center; }
.wallet-status { color: var(--text-300); }

.lever { position: absolute; right: -40px; top: 50%; transform: translateY(-50%) rotateZ(-6deg); width: 22px; height: 140px; background: linear-gradient(180deg, #c969ff, #7f2dff); border-radius: 12px; box-shadow: 0 12px 24px rgba(153,69,255,.6); }
.lever .knob { position: absolute; bottom: -16px; left: 50%; transform: translateX(-50%); width: 38px; height: 38px; background: radial-gradient(circle at 30% 30%, #ffcf5a, #ff8a00); border-radius: 999px; box-shadow: 0 8px 16px rgba(255,138,0,.6); }
.lever.lever-pull { transform: translateY(-50%) rotateZ(10deg); transition: transform .25s cubic-bezier(.2,.7,.4,1); }

.rewards { padding: var(--space-48) 0; display: grid; place-items: center; }
.rewards-card { display: grid; grid-template-columns: 1.3fr .7fr; gap: 16px; padding: var(--space-24); }
.rewards-copy h2 { margin: 0 0 var(--space-12); }
.wallet-icons { display: flex; align-items: center; justify-content: center; gap: 18px; }
.wallet-icon { width: clamp(36px, 10vw, 48px); height: clamp(36px, 10vw, 48px); filter: drop-shadow(0 0 8px rgba(0,255,255,.35)); }

.leaderboard { padding: var(--space-48) 0; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; border: 1px solid rgba(153,69,255,.3); background: rgba(255,255,255,.04); }
.table th, .table td { padding: 14px 16px; text-align: left; }
.table thead th { color: var(--text-300); font-weight: 700; border-bottom: 1px solid rgba(0,255,255,.25); }
.table tbody tr { border-bottom: 1px solid rgba(153,69,255,.16); }
.table tbody tr:hover { background: rgba(153,69,255,.08); }

.footer { display: grid; place-items: center; padding: var(--space-32) 0 var(--space-48); color: var(--text-700); }
.footer-nav { display: flex; gap: 18px; margin-bottom: var(--space-12); }
.footer-nav a { color: var(--text-300); text-decoration: none; border-bottom: 1px dashed transparent; }
.footer-nav a:hover { color: var(--sol-cyan); border-bottom-color: rgba(0,255,255,.5); }

.modal-overlay { position: fixed; inset: 0; background: rgba(8,12,18,0.6); backdrop-filter: blur(8px) saturate(140%); opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 30; }
.modal { position: fixed; inset: 0; display: grid; place-items: center; opacity: 0; pointer-events: none; z-index: 40; }
.modal .modal-content { width: min(420px, 92vw); padding: 22px; border-radius: 16px; background: var(--bg-glass); border: 1px solid rgba(0,255,255,.2); box-shadow: var(--shadow-neon); text-align: center; }
.modal .modal-sub { color: var(--text-300); margin: 6px 0 12px; }
.modal .win-amount { font-size: 28px; font-weight: 800; color: var(--sol-teal); margin: 10px 0 18px; }
.modal .modal-actions { display: flex; gap: 12px; justify-content: center; }
.hidden { display: none !important; }
.btn-sm { padding: 10px 16px; font-size: 14px; border-radius: 12px; }
.auth-form .input { margin-bottom: 10px; }
.auth-form .modal-sub { font-size: 14px; min-height: 20px; }
.auth-switch { display: flex; gap: 10px; justify-content: center; margin: 6px 0 10px; }
.auth-actions { margin-top: 8px; }
.status-error { color: #ff6b81; }
.status-success { color: var(--sol-teal); }
.show-overlay { opacity: 1; pointer-events: auto; }
.modal-open .container { filter: blur(10px) saturate(140%); }

.deposit { padding: var(--space-32) 0 var(--space-48); display: grid; place-items: center; }
.deposit-card { width: min(980px, 96vw); padding: var(--space-24); display: grid; gap: 12px; }
.deposit-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.deposit-status { color: var(--sol-teal); min-height: 24px; }

.wallet-display { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid rgba(153,69,255,.35); border-radius: 12px; background: rgba(255,255,255,.06); }
.wallet-display span { word-break: break-all; overflow-wrap: anywhere; }
.wallet-display .btn { flex: 0 0 auto; }

@media (max-width: 840px) {
  .reels { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .rewards-card { grid-template-columns: 1fr; }
  .lever { display: none; }
}

@media (max-width: 560px) {
  .container { padding: var(--space-16) 0; }
  .hero { padding: var(--space-32) 0; }
  .hero-content { padding: 0 var(--space-16); }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .slot-card { padding: var(--space-16); border-radius: var(--r-16); }
  .slot-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .wallet-bar { width: 100%; flex-wrap: wrap; }
  .wallet-bar .btn { flex: 1 1 100%; }
  .reels { gap: 10px; padding: var(--space-12); grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .reel { height: 224px; }
  .reel-track { grid-auto-rows: 64px; row-gap: 8px; }
  .btn-spin { width: 100%; min-width: unset; }
  .table { border: 0; background: transparent; }
  .table thead { display: none; }
  .table tbody tr { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 12px; margin-bottom: 12px; border: 1px solid rgba(153,69,255,.25); border-radius: 12px; background: rgba(255,255,255,.06); }
  .table tbody td { display: flex; justify-content: space-between; align-items: center; }
  .table tbody td:nth-child(1)::before { content: "IP"; color: var(--text-700); margin-right: 8px; }
  .table tbody td:nth-child(2)::before { content: "Name"; color: var(--text-700); margin-right: 8px; }
  .table tbody td:nth-child(3)::before { content: "Actions"; color: var(--text-700); margin-right: 8px; }
  .wallet-display { flex-wrap: wrap; }
  .wallet-display .btn { width: 100%; }
  .symbol { font-size: 18px; }
  .slot-actions { padding-top: var(--space-12); }
  .modal .modal-content { max-height: 80vh; overflow: auto; }
  .auth-actions .btn { width: auto; }
}
  .wallet-display { flex-direction: column; align-items: stretch; }
  .wallet-display span { font-size: 12px; }
}

@media (max-width: 380px) {
  .hero-title { font-size: clamp(28px, 8vw, 40px); }
  .reel { height: 200px; }
  .reel-track { grid-auto-rows: 64px; row-gap: 8px; }
}
@media (max-width: 340px) {
  .container { padding: var(--space-12) 0; }
  .hero { padding: var(--space-24) 0; }
  .hero-actions { gap: 10px; }
  .reels { gap: 8px; }
  .reel { height: 180px; }
  .reel-track { grid-auto-rows: 56px; row-gap: 6px; }
  .symbol { font-size: 16px; }
  .slot-card { padding: var(--space-12); }
  .auth-switch { gap: 8px; }
  .btn-sm { padding: 8px 12px; font-size: 13px; }
}
.wallet-display { display: flex; gap: 10px; align-items: center; justify-content: center; margin: 8px 0 12px; }
.wallet-display span { font-family: var(--font-display); font-weight: 700; color: var(--text-300); }

.account { padding: var(--space-32) 0 var(--space-48); display: grid; place-items: center; }
.account-card { width: min(980px, 96vw); padding: var(--space-24); display: grid; gap: 12px; }
.account-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.account-actions { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.balance { font-weight: 800; }
