/* Premium Aviator — dark glassmorphism casino theme */
.avi-wrap {
  max-width: 100%;
  min-height: calc(100dvh - var(--bh) - 12px);
  background: radial-gradient(ellipse at 50% 0%, #1a0a2e 0%, #0a0612 45%, #050308 100%);
  color: #f0f4ff;
  font-family: 'Inter', system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: calc(var(--bh) + 8px);
  box-sizing: border-box;
}
.avi-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: rgba(10,8,20,0.85); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,0.06); z-index: 10; flex-shrink: 0; }
.avi-head h2 { font-size: 16px; font-weight: 800; background: linear-gradient(90deg, #ff6b6b, #ffd93d); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin: 0; }
.avi-bal { font-size: 12px; font-weight: 700; color: #7ee787; }
.avi-toolbar { display: flex; gap: 8px; align-items: center; }
.avi-icon-btn { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); color: #aab; border-radius: 8px; padding: 6px 10px; font-size: 11px; cursor: pointer; }
.avi-icon-btn.on { color: #7ee787; border-color: #7ee78755; }
.avi-history { display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto; background: rgba(0,0,0,0.25); flex-shrink: 0; }
.avi-pill { flex-shrink: 0; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; background: rgba(255,255,255,0.08); color: #8b949e; }
.avi-pill.mid { color: #58a6ff; background: rgba(88,166,255,0.15); }
.avi-pill.high { color: #ffd93d; background: rgba(255,217,61,0.15); }
.avi-pill.hot { animation: avi-pulse 1s infinite; }
@keyframes avi-pulse { 50% { box-shadow: 0 0 12px #ffd93d55; } }
.avi-main { display: grid; grid-template-columns: 1fr 200px; gap: 0; flex: 1 1 auto; min-height: 220px; }
@media (max-width: 768px) {
  .avi-main { grid-template-columns: 1fr; }
  .avi-side { display: none; }
  .avi-side.mob-on { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0.92); padding: 16px; overflow-y: auto; }
  .mob-only { display: inline-block; }
}
@media (min-width: 769px) { .mob-only { display: none; } }
.avi-stage-wrap { position: relative; min-height: 220px; height: clamp(220px, 38vh, 340px); }
.avi-stage { position: relative; width: 100%; height: 100%; min-height: 220px; overflow: hidden; }
#avi-canvas { width: 100%; height: 100%; display: block; min-height: 220px; }
.avi-mult-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 2; }
.avi-mult { font-size: clamp(42px, 12vw, 72px); font-weight: 900; letter-spacing: -2px; text-shadow: 0 0 40px rgba(255,107,107,0.5); transition: color 0.2s; }
.avi-mult.flying { color: #fff; }
.avi-mult.crashed { color: #ff6b6b; font-size: clamp(20px, 5vw, 32px); }
.avi-mult.betting { font-size: 18px; color: #8b949e; text-shadow: none; }
.avi-countdown { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 48px; font-weight: 800; color: #ffd93d; z-index: 3; text-shadow: 0 0 30px #ffd93d66; }
.avi-hot { position: absolute; top: 12px; left: 12px; font-size: 10px; padding: 4px 10px; border-radius: 20px; background: linear-gradient(90deg,#ff6b6b,#ffd93d); color: #000; font-weight: 800; z-index: 4; display: none; }
.avi-hot.on { display: block; }
.avi-side { background: rgba(10,8,20,0.6); border-left: 1px solid rgba(255,255,255,0.06); padding: 10px; overflow-y: auto; max-height: 340px; }
.avi-side h4 { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: #6e7681; margin: 0 0 8px; }
.avi-feed-row { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; font-size: 10px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.04); align-items: center; }
.avi-feed-row.you { color: #7ee787; }
.avi-feed-row .won { color: #ffd93d; }
.avi-bets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 12px 16px;
  background: rgba(0,0,0,0.3);
  flex-shrink: 0;
  margin-top: auto;
}
@media (max-width: 480px) { .avi-bets { grid-template-columns: 1fr; } }
.avi-panel { background: rgba(255,255,255,0.04); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 12px; }
.avi-panel label { font-size: 10px; color: #8b949e; text-transform: uppercase; letter-spacing: 0.05em; display: block; margin-bottom: 4px; }
.avi-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
.avi-chips button { flex: 1; min-width: 42px; padding: 6px 4px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); color: #c9d1d9; font-size: 10px; font-weight: 600; cursor: pointer; }
.avi-chips button:hover { border-color: #ff6b6b66; color: #fff; }
.avi-stake-inp { width: 100%; box-sizing: border-box; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 10px; color: #fff; font-size: 14px; font-weight: 700; margin: 6px 0; }
.avi-auto-row { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #8b949e; margin: 6px 0; flex-wrap: wrap; }
.avi-auto-row input[type=number] { width: 56px; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; padding: 4px 6px; color: #fff; }
.avi-profit-preview { font-size: 10px; color: #7ee787; min-height: 14px; margin-bottom: 6px; }
.avi-btn-main { width: 100%; padding: 14px; border: none; border-radius: 12px; font-size: 14px; font-weight: 800; cursor: pointer; transition: transform 0.1s, box-shadow 0.2s; box-sizing: border-box; }
.avi-btn-main.bet { background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; box-shadow: 0 4px 20px rgba(34,197,94,0.35); }
.avi-btn-main.cashout { background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; animation: avi-co-pulse 0.8s infinite; }
@keyframes avi-co-pulse { 50% { box-shadow: 0 0 24px rgba(245,158,11,0.5); } }
.avi-btn-main.cancel { background: rgba(255,255,255,0.1); color: #ff6b6b; }
.avi-btn-main.off { background: rgba(255,255,255,0.05); color: #6e7681; cursor: default; }
.avi-btn-main:active:not(.off) { transform: scale(0.98); }
.avi-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; }
.avi-modal-box { background: #16122a; border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 20px; max-width: 400px; width: 100%; max-height: 80vh; overflow-y: auto; }
.avi-modal-box h3 { margin: 0 0 12px; font-size: 16px; }
.avi-fair-row { font-size: 11px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.06); word-break: break-all; }
.avi-fair-row span { color: #8b949e; display: block; font-size: 9px; text-transform: uppercase; }
