/* ═══════════════════════════════════════════════════
   BAC BO AUTO BET PRO — MAIN STYLESHEET 2026
   ═══════════════════════════════════════════════════ */

/* ── CSS VARIABLES ── */
:root {
  --bg-base:       #050810;
  --bg-surface:    #0b0f1c;
  --bg-card:       #0f1526;
  --bg-card2:      #131928;
  --bg-hover:      #1a2040;
  --border:        rgba(255,255,255,0.07);
  --border-glow:   rgba(99,102,241,0.3);

  --accent:        #6366f1;
  --accent2:       #818cf8;
  --accent-glow:   rgba(99,102,241,0.4);
  --accent-dim:    rgba(99,102,241,0.15);

  --gold:          #f59e0b;
  --gold-glow:     rgba(245,158,11,0.4);
  --gold-dim:      rgba(245,158,11,0.1);

  --green:         #10b981;
  --green-glow:    rgba(16,185,129,0.4);
  --green-dim:     rgba(16,185,129,0.1);

  --red:           #ef4444;
  --red-glow:      rgba(239,68,68,0.4);
  --red-dim:       rgba(239,68,68,0.1);

  --blue:          #3b82f6;
  --blue-glow:     rgba(59,130,246,0.4);

  --cyan:          #06b6d4;
  --cyan-glow:     rgba(6,182,212,0.4);

  --player-color:  #3b82f6;
  --banker-color:  #ef4444;
  --tie-color:     #10b981;

  --text-primary:  #f1f5f9;
  --text-sec:      #94a3b8;
  --text-muted:    #475569;

  --header-h:      64px;
  --bottom-nav-h:  64px;
  --sidebar-w:     280px;
  --sidebar-r-w:   260px;

  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     16px;
  --radius-xl:     24px;

  --transition:    all 0.2s ease;
  --transition-slow: all 0.4s cubic-bezier(0.4,0,0.2,1);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
}
input, select, textarea, button { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: none; outline: none; }
input, select, textarea { outline: none; border: none; }
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ── BACKGROUND GRID ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  top: -30%;
  left: -20%;
  width: 60%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(99,102,241,0.06), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ══════════════════════════════════════
   HEADER
══════════════════════════════════════ */
#app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(11,15,28,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
}
#app-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--gold), var(--accent), transparent);
  opacity: 0.5;
}
.header-left { display: flex; align-items: center; gap: 12px; }
.logo-wrap { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 20px var(--accent-glow);
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-main {
  font-family: 'Orbitron', monospace;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 2px;
}
.logo-accent { color: var(--gold); }
.logo-sub {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
}
.header-badge {
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.live-badge {
  background: var(--red-dim);
  border: 1px solid var(--red);
  color: var(--red);
  display: flex; align-items: center; gap: 5px;
}
.pulse-dot {
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse-dot 1.2s infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity:1; transform:scale(1); }
  50% { opacity:0.4; transform:scale(0.7); }
}
.version-badge {
  background: var(--accent-dim);
  border: 1px solid var(--border-glow);
  color: var(--accent2);
}
.header-center { display: flex; align-items: center; gap: 4px; }
.nav-btn {
  padding: 7px 14px;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-sec);
  font-size: 13px;
  font-weight: 500;
  display: flex; align-items: center; gap: 7px;
  transition: var(--transition);
}
.nav-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-btn.active {
  background: var(--accent-dim);
  color: var(--accent2);
  box-shadow: 0 0 12px var(--accent-glow);
}
.nav-btn i { font-size: 12px; }
.header-right { display: flex; align-items: center; gap: 16px; }
.balance-display { display: flex; flex-direction: column; align-items: flex-end; }
.balance-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.balance-value {
  font-family: 'Orbitron', monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 10px var(--gold-glow);
}
.connection-status {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: 99px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
}
.conn-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
}
.conn-dot.connected { background: var(--green); box-shadow: 0 0 8px var(--green-glow); }
.conn-dot.disconnected { background: var(--red); }
.conn-dot.connecting { background: var(--gold); animation: pulse-dot 1s infinite; }

/* ══════════════════════════════════════
   MAIN LAYOUT
══════════════════════════════════════ */
#app-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr var(--sidebar-r-w);
  grid-template-rows: 1fr;
  margin-top: var(--header-h);
  height: calc(100dvh - var(--header-h));
  overflow: hidden;
}
#sidebar-left, #sidebar-right {
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(11,15,28,0.5);
}
#sidebar-left { border-right: 1px solid var(--border); }
#sidebar-right { border-left: 1px solid var(--border); }

/* ══════════════════════════════════════
   CARDS
══════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover { border-color: rgba(255,255,255,0.12); }
.card-header {
  padding: 12px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-sec);
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-header i { color: var(--accent2); font-size: 12px; }

/* ── STATUS CARD ── */
.robot-status-display {
  padding: 16px 14px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.status-icon-wrap {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  transition: var(--transition-slow);
}
.status-icon-wrap.idle { background: rgba(71,85,105,0.2); color: var(--text-muted); }
.status-icon-wrap.online {
  background: var(--green-dim);
  color: var(--green);
  box-shadow: 0 0 16px var(--green-glow);
  animation: glow-pulse 2s infinite;
}
.status-icon-wrap.analyzing {
  background: rgba(245,158,11,0.15);
  color: var(--gold);
  box-shadow: 0 0 16px var(--gold-glow);
  animation: glow-pulse 1s infinite;
}
.status-icon-wrap.waiting {
  background: var(--accent-dim);
  color: var(--accent2);
  box-shadow: 0 0 12px var(--accent-glow);
}
.status-icon-wrap.sending {
  background: var(--blue-glow);
  color: var(--blue);
  animation: spin-icon 1s linear infinite;
}
.status-icon-wrap.win {
  background: var(--green-dim);
  color: var(--green);
  box-shadow: 0 0 20px var(--green-glow);
}
.status-icon-wrap.loss {
  background: var(--red-dim);
  color: var(--red);
  box-shadow: 0 0 16px var(--red-glow);
}
@keyframes glow-pulse {
  0%,100% { box-shadow: 0 0 12px currentColor; }
  50% { box-shadow: 0 0 24px currentColor; }
}
@keyframes spin-icon {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.status-info { display: flex; flex-direction: column; gap: 2px; }
.status-label {
  font-family: 'Orbitron', monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
}
.status-sub { font-size: 11px; color: var(--text-muted); }
.bot-controls { padding: 0 14px 12px; }
.btn-start-bot {
  width: 100%;
  padding: 11px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: var(--transition-slow);
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-start-bot:hover { transform: translateY(-1px); box-shadow: 0 6px 28px var(--accent-glow); }
.btn-start-bot.running {
  background: linear-gradient(135deg, var(--red), #b91c1c);
  box-shadow: 0 4px 20px var(--red-glow);
}
.btn-start-bot.running:hover { box-shadow: 0 6px 28px var(--red-glow); }

/* Round Timer */
.round-timer-wrap { padding: 10px 14px 14px; border-top: 1px solid var(--border); }
.timer-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.timer-bar-wrap {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4px;
}
.timer-bar {
  height: 100%;
  width: 60%;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  border-radius: 4px;
  transition: width 0.9s linear;
  box-shadow: 0 0 8px var(--cyan-glow);
}
.timer-value {
  font-family: 'Orbitron', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--cyan);
  text-align: right;
}

/* ── STATS CARD ── */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
}
.stat-item {
  padding: 12px 14px;
  background: var(--bg-card);
  display: flex; flex-direction: column; gap: 2px;
}
.stat-val {
  font-family: 'Orbitron', monospace;
  font-size: 18px;
  font-weight: 700;
}
.stat-lbl { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.stat-item.win .stat-val { color: var(--green); text-shadow: 0 0 10px var(--green-glow); }
.stat-item.loss .stat-val { color: var(--red); text-shadow: 0 0 10px var(--red-glow); }
.stat-item.neutral .stat-val { color: var(--accent2); }
.stat-item.profit .stat-val { color: var(--gold); text-shadow: 0 0 10px var(--gold-glow); }

.gale-display {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--border);
}
.gale-label { font-size: 11px; color: var(--text-muted); flex: 1; }
.gale-dots { display: flex; gap: 4px; }
.gale-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.gale-dot.active { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 8px var(--gold-glow); }
.gale-val {
  font-family: 'Orbitron', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  min-width: 24px;
  text-align: right;
}

/* ── CURRENT BET CARD ── */
.bet-display { padding: 14px; display: flex; align-items: center; justify-content: space-between; }
.bet-side { display: flex; align-items: center; gap: 8px; }
.bet-side-icon { font-size: 22px; }
.bet-side-label { font-weight: 700; font-size: 13px; }
.bet-side.player .bet-side-label { color: var(--player-color); }
.bet-side.banker .bet-side-label { color: var(--banker-color); }
.bet-side.tie .bet-side-label { color: var(--tie-color); }
.bet-amount-display {
  font-family: 'Orbitron', monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 10px var(--gold-glow);
}
.last-result-wrap {
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-sec);
}
.last-result-val { font-weight: 700; font-size: 13px; }

/* ── RISK CARD ── */
.risk-bars { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.risk-item { display: flex; align-items: center; justify-content: space-between; }
.risk-lbl { font-size: 11px; color: var(--text-sec); }
.risk-val { font-size: 12px; font-weight: 700; font-family: 'Orbitron', monospace; }
.risk-val.stop-loss { color: var(--red); }
.risk-val.stop-green { color: var(--green); }
.risk-bar-outer {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}
.risk-bar-inner { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.loss-bar { background: linear-gradient(90deg, var(--red-dim), var(--red)); }
.green-bar { background: linear-gradient(90deg, var(--green-dim), var(--green)); }

/* ══════════════════════════════════════
   GAME SECTION
══════════════════════════════════════ */
#game-section {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  position: relative;
}
.tab-pane { display: none; flex: 1; overflow: hidden; }
.tab-pane.active { display: flex; flex-direction: column; }

/* ── RESULTS RIBBON ── */
.results-ribbon {
  height: 44px;
  background: rgba(11,15,28,0.8);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  overflow: hidden;
  flex-shrink: 0;
}
.ribbon-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; }
.ribbon-results {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.ribbon-results::-webkit-scrollbar { display: none; }
.rr-dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px;
  font-weight: 700;
  flex-shrink: 0;
  animation: pop-in 0.3s ease;
}
@keyframes pop-in {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.rr-dot.player { background: var(--player-color); box-shadow: 0 0 6px var(--blue-glow); }
.rr-dot.banker { background: var(--banker-color); box-shadow: 0 0 6px var(--red-glow); }
.rr-dot.tie { background: var(--tie-color); box-shadow: 0 0 6px var(--green-glow); }
.ribbon-stats { display: flex; gap: 10px; flex-shrink: 0; }
.rs-item {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
}
.rs-item.banker { color: var(--banker-color); background: var(--red-dim); }
.rs-item.player { color: var(--player-color); background: rgba(59,130,246,0.1); }
.rs-item.tie { color: var(--tie-color); background: var(--green-dim); }

/* ── GAME CONTAINER ── */
.game-container-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.game-overlay-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 36px;
  background: linear-gradient(180deg, rgba(5,8,16,0.9), transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  z-index: 10;
  pointer-events: none;
}
.go-label { font-size: 11px; color: var(--text-muted); font-weight: 600; letter-spacing: 1px; }
.go-round { font-size: 11px; color: var(--accent2); font-weight: 700; font-family: 'Orbitron', monospace; }
.iframe-holder {
  flex: 1;
  min-height: 0;
  position: relative;
  background: var(--bg-base);
}
.iframe-holder iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.iframe-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(99,102,241,0.05) 0%, transparent 70%);
}
.placeholder-inner {
  text-align: center;
  padding: 40px;
  max-width: 480px;
}
.placeholder-logo {
  font-size: 56px;
  color: var(--accent2);
  margin-bottom: 16px;
  text-shadow: 0 0 30px var(--accent-glow);
}
.placeholder-inner h2 {
  font-family: 'Orbitron', monospace;
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 4px;
  margin-bottom: 8px;
}
.placeholder-inner p { color: var(--text-sec); margin-bottom: 20px; line-height: 1.6; }
.iframe-url-form {
  display: flex; gap: 8px;
  margin-bottom: 14px;
}
.iframe-url-form input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  transition: var(--transition);
}
.iframe-url-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.btn-load-game {
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  transition: var(--transition-slow);
  box-shadow: 0 4px 16px var(--accent-glow);
}
.btn-load-game:hover { transform: translateY(-1px); box-shadow: 0 6px 24px var(--accent-glow); }
.iframe-note {
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin: 0 !important;
}

/* Result Overlay */
.result-overlay {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 20;
  pointer-events: none;
}
.result-overlay-inner {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 30px 50px;
  border-radius: var(--radius-xl);
  backdrop-filter: blur(12px);
  animation: result-appear 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.result-overlay-inner.win-overlay {
  background: rgba(16,185,129,0.15);
  border: 2px solid var(--green);
  box-shadow: 0 0 50px var(--green-glow), inset 0 0 30px rgba(16,185,129,0.05);
}
.result-overlay-inner.loss-overlay {
  background: rgba(239,68,68,0.15);
  border: 2px solid var(--red);
  box-shadow: 0 0 50px var(--red-glow), inset 0 0 30px rgba(239,68,68,0.05);
}
@keyframes result-appear {
  from { opacity:0; transform:scale(0.7); }
  to { opacity:1; transform:scale(1); }
}
.result-overlay-icon { font-size: 56px; }
.result-overlay-text { font-family: 'Orbitron', monospace; font-size: 28px; font-weight: 900; letter-spacing: 3px; }
.result-overlay-amount { font-family: 'Orbitron', monospace; font-size: 20px; font-weight: 700; opacity: 0.8; }

/* ── PATTERN CARD ── */
.pattern-list { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; max-height: 180px; overflow-y: auto; }
.no-pattern { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px; color: var(--text-muted); font-size: 12px; }
.no-pattern i { font-size: 20px; }
.pattern-item {
  padding: 8px 10px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 12px;
  display: flex; align-items: center; gap: 8px;
  animation: slide-in 0.3s ease;
}
@keyframes slide-in {
  from { opacity:0; transform:translateX(-10px); }
  to { opacity:1; transform:translateX(0); }
}
.pattern-item i { color: var(--accent2); font-size: 11px; }
.pattern-name { font-weight: 600; flex: 1; color: var(--text-primary); }
.pattern-signal {
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.pattern-signal.player { background: rgba(59,130,246,0.15); color: var(--player-color); }
.pattern-signal.banker { background: var(--red-dim); color: var(--banker-color); }
.pattern-signal.tie { background: var(--green-dim); color: var(--tie-color); }

/* ── DICE CARD ── */
.dice-display {
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.dice-side-block { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dice-side-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); }
.dice-row { display: flex; gap: 6px; }
.die {
  width: 34px; height: 34px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  transition: var(--transition-slow);
}
.die.rolling { animation: die-roll 0.4s ease; }
@keyframes die-roll {
  0% { transform: rotate(0deg) scale(1); }
  30% { transform: rotate(15deg) scale(1.1); }
  60% { transform: rotate(-10deg) scale(0.95); }
  100% { transform: rotate(0deg) scale(1); }
}
.dice-total {
  font-family: 'Orbitron', monospace;
  font-size: 22px;
  font-weight: 900;
}
.player-total { color: var(--player-color); text-shadow: 0 0 12px var(--blue-glow); }
.banker-total { color: var(--banker-color); text-shadow: 0 0 12px var(--red-glow); }
.dice-vs { font-family: 'Orbitron', monospace; font-size: 13px; font-weight: 900; color: var(--text-muted); }
.dice-winner {
  text-align: center;
  padding: 8px;
  font-family: 'Orbitron', monospace;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 2px;
  border-top: 1px solid var(--border);
}
.dice-winner.player { color: var(--player-color); }
.dice-winner.banker { color: var(--banker-color); }
.dice-winner.tie { color: var(--tie-color); }

/* ── LOG CARD ── */
.log-count {
  margin-left: auto;
  background: var(--accent-dim);
  color: var(--accent2);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
}
.log-scroll { padding: 8px; max-height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; }
.log-empty { text-align: center; padding: 20px; color: var(--text-muted); font-size: 12px; }
.log-item {
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  display: flex; align-items: flex-start; gap: 6px;
  background: rgba(255,255,255,0.02);
  animation: log-fade 0.3s ease;
  line-height: 1.4;
}
@keyframes log-fade { from { opacity:0; } to { opacity:1; } }
.log-time { color: var(--text-muted); white-space: nowrap; font-family: 'Orbitron', monospace; font-size: 9px; }
.log-msg { flex: 1; color: var(--text-sec); }
.log-item.log-win .log-msg { color: var(--green); }
.log-item.log-loss .log-msg { color: var(--red); }
.log-item.log-bet .log-msg { color: var(--gold); }
.log-item.log-info .log-msg { color: var(--accent2); }
.log-item.log-warn .log-msg { color: var(--gold); }

/* ══════════════════════════════════════
   STRATEGY PAGE
══════════════════════════════════════ */
.strategy-page { flex: 1; overflow-y: auto; padding: 16px; }
.strategy-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.strategy-header h2 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.btn-add-strategy {
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 12px;
  display: flex; align-items: center; gap: 6px;
  box-shadow: 0 4px 14px var(--accent-glow);
  transition: var(--transition);
}
.btn-add-strategy:hover { transform: translateY(-1px); box-shadow: 0 6px 20px var(--accent-glow); }
.active-strategy-banner {
  padding: 12px 16px;
  background: var(--accent-dim);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.asb-left { display: flex; align-items: center; gap: 10px; }
.asb-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent2);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: glow-pulse 2s infinite;
}
.asb-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.asb-name { font-weight: 700; font-size: 14px; color: var(--accent2); }
.asb-desc { font-size: 12px; color: var(--text-sec); }
.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.preset-card {
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition-slow);
  display: flex; flex-direction: column; gap: 8px;
}
.preset-card:hover { border-color: var(--accent); box-shadow: 0 4px 20px var(--accent-glow); transform: translateY(-2px); }
.preset-card.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 20px var(--accent-glow);
}
.pc-icon { font-size: 22px; }
.pc-name { font-weight: 700; font-size: 13px; }
.pc-desc { font-size: 11px; color: var(--text-sec); line-height: 1.5; }
.pc-signal {
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  align-self: flex-start;
}
.pc-signal.player { background: rgba(59,130,246,0.15); color: var(--player-color); }
.pc-signal.banker { background: var(--red-dim); color: var(--banker-color); }
.pc-signal.auto { background: var(--accent-dim); color: var(--accent2); }
.custom-strategies-section { margin-top: 4px; }
.custom-strategies-section h3 { font-size: 15px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; color: var(--text-sec); }
.empty-custom {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 30px;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}
.empty-custom i { font-size: 30px; }
.btn-create-custom {
  padding: 8px 20px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--accent2);
  font-weight: 600;
  transition: var(--transition);
}
.btn-create-custom:hover { background: var(--accent-dim); border-color: var(--accent); }

/* ══════════════════════════════════════
   HISTORY PAGE
══════════════════════════════════════ */
.history-page { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.history-header { display: flex; align-items: center; justify-content: space-between; }
.history-header h2 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.history-actions { display: flex; gap: 8px; }
.chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  height: 200px;
}
.history-table-wrap { overflow-x: auto; }
.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.history-table thead th {
  padding: 10px 12px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-size: 10px;
  text-align: left;
  white-space: nowrap;
}
.history-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.history-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.history-table tbody td { padding: 9px 12px; color: var(--text-sec); }
.history-table .row-win td:first-child { border-left: 3px solid var(--green); }
.history-table .row-loss td:first-child { border-left: 3px solid var(--red); }
.result-badge {
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.result-badge.win { background: var(--green-dim); color: var(--green); }
.result-badge.loss { background: var(--red-dim); color: var(--red); }
.side-badge {
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.side-badge.player { background: rgba(59,130,246,0.15); color: var(--player-color); }
.side-badge.banker { background: var(--red-dim); color: var(--banker-color); }
.side-badge.tie { background: var(--green-dim); color: var(--tie-color); }
.profit-val.pos { color: var(--green); font-weight: 700; }
.profit-val.neg { color: var(--red); font-weight: 700; }
.history-empty td { padding: 40px; }
.empty-history { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-muted); }
.empty-history i { font-size: 28px; }

/* ══════════════════════════════════════
   SETTINGS PAGE
══════════════════════════════════════ */
.settings-page { flex: 1; overflow-y: auto; padding: 16px; }
.settings-page h2 { font-size: 18px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.sc-header {
  padding: 12px 16px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-sec);
  display: flex; align-items: center; gap: 8px;
}
.sc-header i { color: var(--accent2); }
.sc-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; }
.form-group input[type="number"],
.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
  padding: 9px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  transition: var(--transition);
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-group select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: calc(100% - 10px) center; background-size: 12px; padding-right: 30px; }
.input-prefix { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.input-prefix span { padding: 9px 10px; background: rgba(255,255,255,0.04); color: var(--text-muted); font-size: 12px; font-weight: 600; white-space: nowrap; border-right: 1px solid var(--border); }
.input-prefix input { border: none; border-radius: 0; flex: 1; }
.input-prefix input:focus { box-shadow: none; }
.toggle-group { flex-direction: row; align-items: center; justify-content: space-between; }
.toggle { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  cursor: pointer;
  transition: var(--transition-slow);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: var(--transition-slow);
}
.toggle input:checked + .toggle-slider { background: var(--accent-dim); border-color: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateY(-50%) translateX(18px); background: var(--accent2); box-shadow: 0 0 8px var(--accent-glow); }
.settings-actions { display: flex; gap: 10px; }
.btn-save-cfg {
  padding: 11px 24px;
  background: linear-gradient(135deg, var(--green), #059669);
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 13px;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 16px var(--green-glow);
  transition: var(--transition);
}
.btn-save-cfg:hover { transform: translateY(-1px); box-shadow: 0 6px 22px var(--green-glow); }
.btn-ghost {
  padding: 11px 20px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-sec);
  font-weight: 600;
  font-size: 12px;
  display: flex; align-items: center; gap: 6px;
  transition: var(--transition);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); border-color: rgba(255,255,255,0.15); }
.btn-ghost.danger:hover { background: var(--red-dim); color: var(--red); border-color: var(--red); }
.btn-reset-cfg { }

/* ══════════════════════════════════════
   MODAL
══════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(5,8,16,0.85);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  animation: fade-in 0.2s ease;
}
@keyframes fade-in { from { opacity:0; } to { opacity:1; } }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 480px;
  max-width: 95vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: modal-up 0.3s cubic-bezier(0.34,1.56,0.64,1);
  overflow: hidden;
}
@keyframes modal-up {
  from { transform: translateY(20px) scale(0.97); opacity:0; }
  to { transform: translateY(0) scale(1); opacity:1; }
}
.modal-header {
  padding: 16px 20px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; font-size: 15px;
}
.modal-header span { display: flex; align-items: center; gap: 8px; }
.modal-close {
  width: 30px; height: 30px;
  border-radius: var(--radius-md);
  background: var(--bg-hover);
  color: var(--text-sec);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: var(--transition);
}
.modal-close:hover { background: var(--red-dim); color: var(--red); }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
}
.btn-primary {
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 13px;
  display: flex; align-items: center; gap: 7px;
  box-shadow: 0 4px 14px var(--accent-glow);
  transition: var(--transition);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 22px var(--accent-glow); }
.side-selector { display: flex; gap: 6px; }
.side-btn {
  flex: 1;
  padding: 9px 4px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-sec);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: var(--transition);
}
.side-btn.player.active { background: rgba(59,130,246,0.15); color: var(--player-color); border-color: var(--player-color); }
.side-btn.banker.active { background: var(--red-dim); color: var(--banker-color); border-color: var(--banker-color); }
.side-btn.tie.active { background: var(--green-dim); color: var(--tie-color); border-color: var(--tie-color); }
.side-btn.auto.active { background: var(--accent-dim); color: var(--accent2); border-color: var(--accent); }
.side-btn:not(.active):hover { background: var(--bg-hover); }

/* ══════════════════════════════════════
   TOAST
══════════════════════════════════════ */
.toast-container {
  position: fixed; bottom: 80px; right: 20px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 300;
}
.toast {
  min-width: 260px; max-width: 340px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 500;
  animation: toast-in 0.4s cubic-bezier(0.34,1.56,0.64,1);
  backdrop-filter: blur(12px);
  border: 1px solid;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
@keyframes toast-in {
  from { opacity:0; transform:translateX(40px) scale(0.9); }
  to { opacity:1; transform:translateX(0) scale(1); }
}
.toast-out { animation: toast-out 0.3s ease forwards; }
@keyframes toast-out {
  to { opacity:0; transform:translateX(40px) scale(0.9); }
}
.toast.success { background: rgba(16,185,129,0.12); border-color: var(--green); color: var(--green); }
.toast.error { background: rgba(239,68,68,0.12); border-color: var(--red); color: var(--red); }
.toast.info { background: var(--accent-dim); border-color: var(--border-glow); color: var(--accent2); }
.toast.warning { background: var(--gold-dim); border-color: var(--gold); color: var(--gold); }
.toast i { font-size: 16px; }

/* ══════════════════════════════════════
   BOTTOM NAV (mobile)
══════════════════════════════════════ */
#bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-h);
  background: rgba(11,15,28,0.97);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 100;
  justify-content: space-around;
  align-items: center;
}
.bnav-btn {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  padding: 8px 4px;
  background: transparent;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
}
.bnav-btn i { font-size: 18px; }
.bnav-btn.active { color: var(--accent2); }

/* ══════════════════════════════════════
   CUSTOM STRATEGY ITEM
══════════════════════════════════════ */
.custom-strategy-item {
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  transition: var(--transition);
}
.custom-strategy-item:hover { border-color: var(--accent); }
.custom-strategy-item.active-strat { border-color: var(--accent); background: var(--accent-dim); }
.csi-info { flex: 1; }
.csi-name { font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.csi-desc { font-size: 11px; color: var(--text-muted); }
.csi-actions { display: flex; gap: 6px; }
.csi-btn {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  transition: var(--transition);
}
.csi-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.08); }
.csi-btn.activate:hover { color: var(--green); border-color: var(--green); }
.csi-btn.delete:hover { color: var(--red); border-color: var(--red); }

/* ══════════════════════════════════════
   SCROLLBAR STYLED
══════════════════════════════════════ */
#sidebar-left::-webkit-scrollbar,
#sidebar-right::-webkit-scrollbar,
.strategy-page::-webkit-scrollbar,
.history-page::-webkit-scrollbar,
.settings-page::-webkit-scrollbar {
  width: 3px;
}
#sidebar-left::-webkit-scrollbar-thumb,
#sidebar-right::-webkit-scrollbar-thumb,
.strategy-page::-webkit-scrollbar-thumb,
.history-page::-webkit-scrollbar-thumb,
.settings-page::-webkit-scrollbar-thumb {
  background: var(--border-glow);
  border-radius: 4px;
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 1200px) {
  :root { --sidebar-r-w: 220px; }
}
@media (max-width: 960px) {
  :root { --sidebar-w: 230px; }
  #sidebar-right { display: none; }
  #app-main { grid-template-columns: var(--sidebar-w) 1fr; }
}
@media (max-width: 720px) {
  :root { --sidebar-w: 0px; }
  #app-main {
    grid-template-columns: 1fr;
    height: calc(100dvh - var(--header-h) - var(--bottom-nav-h));
  }
  #sidebar-left { display: none; }
  #sidebar-right { display: none; }
  #bottom-nav { display: flex; }
  .header-center { display: none; }
  .header-right .balance-display { display: none; }
  .logo-text .logo-sub { display: none; }
  .results-ribbon { padding: 0 8px; }
  .tab-pane.active { display: flex; }
  .toast-container { bottom: calc(var(--bottom-nav-h) + 10px); }
}
@media (max-width: 480px) {
  #app-header { padding: 0 12px; }
  .logo-main { font-size: 15px; }
  .header-badge { display: none; }
  .settings-grid { grid-template-columns: 1fr; }
  .preset-grid { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════
   UTILITY ANIMATIONS
══════════════════════════════════════ */
.shimmer {
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.05) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}
.blink { animation: blink 1s step-end infinite; }
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0; } }
.fade-in { animation: fade-in 0.4s ease; }
.bounce-in { animation: bounce-in 0.5s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes bounce-in {
  from { opacity:0; transform:scale(0.8); }
  to { opacity:1; transform:scale(1); }
}

/* ══════════════════════════════════════
   GLOW BORDERS UTILITY
══════════════════════════════════════ */
.glow-accent { box-shadow: 0 0 20px var(--accent-glow); border-color: var(--accent) !important; }
.glow-green { box-shadow: 0 0 20px var(--green-glow); border-color: var(--green) !important; }
.glow-red { box-shadow: 0 0 20px var(--red-glow); border-color: var(--red) !important; }
.glow-gold { box-shadow: 0 0 20px var(--gold-glow); border-color: var(--gold) !important; }

/* ══════════════════════════════════════
   EXTRAS PREMIUM
══════════════════════════════════════ */

/* Número redondo do histórico */
.history-table tbody td:first-child {
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  color: var(--text-muted);
}

/* Ribbon hover */
.rr-dot:hover { transform: scale(1.3); z-index: 1; position: relative; }

/* Animação de entrada header */
#app-header { animation: header-slide 0.5s ease; }
@keyframes header-slide {
  from { transform: translateY(-100%); opacity:0; }
  to { transform: translateY(0); opacity:1; }
}

/* Sidebar entrance */
#sidebar-left { animation: sidebar-l 0.5s ease 0.1s both; }
#sidebar-right { animation: sidebar-r 0.5s ease 0.1s both; }
@keyframes sidebar-l {
  from { transform: translateX(-20px); opacity:0; }
  to { transform: translateX(0); opacity:1; }
}
@keyframes sidebar-r {
  from { transform: translateX(20px); opacity:0; }
  to { transform: translateX(0); opacity:1; }
}

/* Preset card shimmer on hover */
.preset-card:hover::before {
  content:'';
  position:absolute; inset:0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.04) 50%, transparent 60%);
  background-size: 200% 200%;
  animation: card-shimmer 0.8s ease;
  pointer-events: none;
}
.preset-card { position: relative; overflow: hidden; }
@keyframes card-shimmer {
  from { background-position: 200% 200%; }
  to { background-position: 0% 0%; }
}

/* Game container glow when bot running */
.game-container-wrap.bot-running {
  box-shadow: inset 0 0 30px rgba(99,102,241,0.08);
}
.game-container-wrap.bot-running .game-overlay-top {
  border-bottom: 1px solid rgba(99,102,241,0.2);
  background: linear-gradient(180deg, rgba(99,102,241,0.08), transparent);
}

/* Result ribbon animated line */
.results-ribbon::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,0.3), transparent);
}
.results-ribbon { position: relative; }

/* Win/Loss flash on status card */
.status-card.flash-win {
  animation: flash-win 0.6s ease;
}
.status-card.flash-loss {
  animation: flash-loss 0.6s ease;
}
@keyframes flash-win {
  0%,100% { background: var(--bg-card); }
  50% { background: rgba(16,185,129,0.08); box-shadow: 0 0 30px var(--green-glow); }
}
@keyframes flash-loss {
  0%,100% { background: var(--bg-card); }
  50% { background: rgba(239,68,68,0.08); box-shadow: 0 0 30px var(--red-glow); }
}

/* Scanning line animation (analyzing state) */
.status-icon-wrap.analyzing::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(245,158,11,0.3), transparent);
  animation: scan-line 1s ease infinite;
}
.status-icon-wrap { position: relative; overflow: hidden; }
@keyframes scan-line {
  from { left: -40%; }
  to   { left: 140%; }
}

/* Orbitron numbers for stats */
.stat-val {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* Better form focus outlines */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(99,102,241,0.04);
}

/* Custom scrollbar for chrome */
::-webkit-scrollbar-thumb:hover {
  background: rgba(99,102,241,0.4);
}

/* Dice emoji shadow */
.die {
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

/* Mobile improvements */
@media (max-width: 720px) {
  .strategy-page, .history-page, .settings-page {
    padding: 12px;
  }
  .preset-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .game-container-wrap { min-height: calc(100dvh - 44px - var(--header-h) - var(--bottom-nav-h)); }
  .iframe-holder { height: 100%; }
  .placeholder-inner { padding: 20px; }
  .placeholder-inner h2 { font-size: 20px; }
  .placeholder-logo { font-size: 36px; }
  .iframe-url-form { flex-direction: column; }
}

