:root {
  --bg: #0f0f1a;
  --card: #1a1a2e;
  --accent: #7c3aed;
  --accent2: #06b6d4;
  --gold: #f59e0b;
  --text: #e2e8f0;
  --muted: #64748b;
  --radius: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: -apple-system, sans-serif;
       min-height: 100vh; padding-bottom: 70px; }

/* Nav */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: var(--card);
  display: flex; border-top: 1px solid #2d2d4e; z-index: 100; }
.nav-btn { flex: 1; background: none; border: none; color: var(--muted); padding: 10px 0;
  display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 20px;
  cursor: pointer; transition: color .2s; }
.nav-btn span { font-size: 11px; }
.nav-btn.active { color: var(--accent); }

/* Tabs */
.tab { display: none; padding: 16px; }
.tab.active { display: block; }
.tab-title { font-size: 20px; font-weight: 700; margin-bottom: 16px; }

/* Profile */
.profile-card { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.avatar { font-size: 64px; }
.profile-card h2 { font-size: 22px; font-weight: 700; }
.balances { display: flex; gap: 16px; }
.balance-item { background: var(--card); border-radius: var(--radius); padding: 12px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bal-icon { font-size: 24px; }
.balance-item span:nth-child(2) { font-size: 22px; font-weight: 700; }
.bal-label { font-size: 12px; color: var(--muted); }

/* Deposit */
.deposit-section { width: 100%; }
.deposit-section h3, .gifts-section h3 { font-size: 16px; color: var(--muted); margin-bottom: 10px; }
.deposit-btns { display: flex; flex-direction: column; gap: 8px; }
.deposit-form { display: flex; gap: 8px; margin-top: 10px; }
.deposit-form input { flex: 1; background: var(--card); border: 1px solid #2d2d4e;
  border-radius: 10px; padding: 10px; color: var(--text); font-size: 15px; }
.hidden { display: none !important; }

/* Buttons */
.btn { border: none; border-radius: 12px; padding: 12px 16px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: opacity .2s; width: 100%; }
.btn:active { opacity: .7; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-ton { background: linear-gradient(135deg, #0098ea, #006bb3); color: #fff; }
.btn-stars { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }
.btn-gift { background: linear-gradient(135deg, #10b981, #059669); color: #fff; }
.btn-upgrade { background: linear-gradient(135deg, var(--accent), #9333ea); color: #fff;
  font-size: 18px; padding: 16px; margin-top: 16px; }
.btn-upgrade:disabled { opacity: .4; cursor: not-allowed; }

/* Cases */
.cases-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.case-card { background: var(--card); border-radius: var(--radius); padding: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid #2d2d4e; transition: border-color .2s; }
.case-card:hover { border-color: var(--accent); }
.case-icon { font-size: 48px; }
.case-name { font-weight: 700; font-size: 15px; text-align: center; }
.case-price { font-size: 13px; color: var(--muted); }
.case-open-btn { background: var(--accent); color: #fff; border: none; border-radius: 8px;
  padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; width: 100%; }

/* Gifts grid */
.gifts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.gift-card { background: var(--card); border-radius: 12px; padding: 10px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 2px solid transparent; cursor: pointer; transition: border-color .2s; }
.gift-card.selected { border-color: var(--accent); }
.gift-card .gift-icon { font-size: 32px; }
.gift-card .gift-name { font-size: 11px; text-align: center; color: var(--muted); }
.gift-card .gift-rarity { font-size: 10px; color: var(--gold); }

/* Upgrade */
.upgrade-container { display: flex; flex-direction: column; gap: 20px; }
.multiplier-selector { display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.multiplier-selector input { width: 100%; accent-color: var(--accent); }
.win-chance { font-size: 13px; color: var(--muted); }
.wheel-section { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.wheel-wrapper { position: relative; display: flex; flex-direction: column; align-items: center; }
.wheel-arrow { font-size: 28px; color: var(--accent); margin-bottom: -4px; z-index: 2; }
#wheel { border-radius: 50%; box-shadow: 0 0 30px rgba(124,58,237,.4); }
.result-msg { font-size: 18px; font-weight: 700; text-align: center; padding: 12px;
  border-radius: 12px; }
.result-msg.win { background: rgba(16,185,129,.2); color: #10b981; }
.result-msg.lose { background: rgba(239,68,68,.2); color: #ef4444; }
.hint { font-size: 13px; color: var(--muted); margin-bottom: 8px; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex;
  align-items: center; justify-content: center; z-index: 200; padding: 20px; }
.modal-content { background: var(--card); border-radius: var(--radius); padding: 24px;
  width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 16px; }
#modal-body { font-size: 16px; text-align: center; }
