:root {
  --bg-gradient: linear-gradient(135deg, #090e1a 0%, #0f172a 50%, #172554 100%);
  --card-bg: rgba(15, 23, 42, 0.75);
  --card-glass: rgba(30, 41, 59, 0.7);
  --card-border: rgba(59, 130, 246, 0.2);
  --card-border-glow: rgba(6, 182, 212, 0.4);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-purple: #8b5cf6;
  --accent-amber: #f59e0b;
  
  --win-green: #10b981;
  --loss-red: #ef4444;
  --violet-color: #a855f7;
  
  --font-main: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Fira Code", monospace;
  
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --shadow-neon: 0 0 15px rgba(6, 182, 212, 0.35);
  --shadow-green: 0 0 15px rgba(16, 185, 129, 0.35);
  --shadow-red: 0 0 15px rgba(239, 68, 68, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  padding-bottom: 70px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}
::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.4);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(6, 182, 212, 0.7);
}

/* TOP HEADER */
.app-header {
  height: 64px;
  background: rgba(11, 19, 43, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.brand-title {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-tag {
  font-size: 10px;
  background: rgba(59, 130, 246, 0.2);
  color: #38bdf8;
  padding: 2px 6px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-family: var(--font-mono);
}

.brand-sub {
  font-size: 11px;
  color: var(--text-secondary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.clock-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #38bdf8;
  background: rgba(15, 23, 42, 0.6);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  gap: 6px;
}

.balance-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
  border: 1px solid var(--card-border-glow);
  padding: 6px 14px;
  border-radius: 20px;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
  cursor: pointer;
  transition: all 0.2s ease;
}

.balance-chip:hover {
  border-color: #38bdf8;
  transform: translateY(-1px);
}

.balance-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.balance-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #10b981;
  font-size: 13px;
}

/* HEADER LOGIN BUTTON */
.btn-header-login {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(59, 130, 246, 0.25));
  border: 1px solid var(--accent-cyan);
  color: #38bdf8;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.btn-header-login:hover {
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  color: white;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.5);
  transform: translateY(-1px);
}

.btn-header-login.logged-in {
  border-color: var(--win-green);
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
}

.btn-icon {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon:hover {
  color: #f8fafc;
  border-color: var(--accent-cyan);
  background: rgba(59, 130, 246, 0.2);
}

.btn-register-link {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: white;
  border: none;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-register-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(6, 182, 212, 0.5);
}

/* NAVIGATION TABS */
.nav-bar-container {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  padding: 8px 20px;
  position: sticky;
  top: 64px;
  z-index: 90;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 1200px;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-tabs::-webkit-scrollbar {
  display: none;
}

.nav-tab-btn {
  background: rgba(30, 41, 59, 0.6);
  color: var(--text-secondary);
  border: 1px solid rgba(59, 130, 246, 0.15);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.25s ease;
}

.nav-tab-btn:hover {
  background: rgba(59, 130, 246, 0.15);
  color: #f8fafc;
  border-color: rgba(59, 130, 246, 0.4);
}

.nav-tab-btn.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(6, 182, 212, 0.25));
  border-color: var(--accent-cyan);
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.25);
}

.nav-tab-btn i {
  font-size: 14px;
}

/* STATUS BANNER */
.server-status-banner {
  max-width: 1200px;
  margin: 14px auto 0;
  padding: 0 20px;
  width: 100%;
}

.status-pill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 12px;
}

.status-pill-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--win-green);
  box-shadow: 0 0 8px var(--win-green);
  display: inline-block;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.server-label-val {
  font-weight: 700;
  color: #38bdf8;
  font-family: var(--font-mono);
}

.mode-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.mode-badge.connected {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

/* MAIN CONTENT CONTAINER */
.main-container {
  max-width: 1200px;
  margin: 16px auto;
  padding: 0 20px;
  width: 100%;
  flex: 1;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* CARDS & GRIDS */
.game-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 880px) {
  .game-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.12);
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f1f5f9;
}

.card-title i {
  color: var(--accent-cyan);
}

/* SUB TABS / MODE SELECTOR */
.sub-tabs {
  display: flex;
  gap: 6px;
  background: rgba(15, 23, 42, 0.8);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  margin-bottom: 16px;
}

.sub-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.sub-tab-btn:hover {
  color: #f8fafc;
}

.sub-tab-btn.active {
  background: var(--accent-blue);
  color: white;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

/* ROUND DISPLAY & COUNTDOWN */
.round-display-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.8));
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

.period-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.period-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.period-number {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 1px;
}

.period-mode-badge {
  font-size: 11px;
  color: var(--accent-cyan);
  font-weight: 600;
}

.countdown-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.countdown-svg {
  transform: rotate(-90deg);
  width: 72px;
  height: 72px;
}

.countdown-bg {
  fill: none;
  stroke: rgba(59, 130, 246, 0.15);
  stroke-width: 5;
}

.countdown-progress {
  fill: none;
  stroke: var(--accent-cyan);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 201;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.5s linear, stroke 0.3s;
}

.countdown-number {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
  color: #f8fafc;
}

.countdown-wrap.warning .countdown-progress {
  stroke: #ef4444;
}
.countdown-wrap.warning .countdown-number {
  color: #ef4444;
  animation: blink 0.8s infinite;
}

@keyframes blink {
  50% { opacity: 0.3; }
}

/* PREDICTION RESULT CARD */
.prediction-box {
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
  text-align: center;
  position: relative;
  box-shadow: inset 0 0 20px rgba(59, 130, 246, 0.1);
}

.prediction-box.highlight {
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-neon);
}

.pred-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.pred-badge {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
}

.pred-main-val {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 1.5px;
  margin: 6px 0;
  font-family: var(--font-mono);
}

.val-besar {
  color: #38bdf8;
  text-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
}

.val-kecil {
  color: #f43f5e;
  text-shadow: 0 0 15px rgba(244, 63, 94, 0.5);
}

.val-merah {
  color: #ef4444;
  text-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

.val-hitam {
  color: #cbd5e1;
  text-shadow: 0 0 15px rgba(203, 213, 225, 0.5);
}

.val-hijau {
  color: #10b981;
  text-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

.val-ungu {
  color: #c084fc;
  text-shadow: 0 0 15px rgba(192, 132, 252, 0.5);
}

.pred-meta-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 10px;
}

.pred-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pred-meta-item strong {
  color: #f8fafc;
}

/* JP / JOKER HUNTER PILL */
.hunter-chip {
  background: rgba(139, 92, 246, 0.15);
  border: 1px dashed rgba(139, 92, 246, 0.4);
  color: #c084fc;
  padding: 6px 12px;
  border-radius: 8px;
  margin-top: 10px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

/* FORM CONTROLS & BET SETTINGS */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 6px;
}

.form-input, .form-select {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--card-border);
  color: #f8fafc;
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  outline: none;
  transition: all 0.2s;
}

.form-input:focus, .form-select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

.quick-chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.quick-chip {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-mono);
}

.quick-chip.all-in {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(249, 115, 22, 0.3));
  border: 1px solid #f97316;
  color: #fdba74;
  font-weight: 800;
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.2);
}

.quick-chip.all-in:hover {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: white;
  border-color: #ffedd5;
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.6);
  transform: translateY(-1px);
}

.btn-all-in {
  background: linear-gradient(135deg, #dc2626 0%, #ea580c 50%, #f59e0b 100%) !important;
  border: 1px solid rgba(254, 215, 170, 0.6) !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 15px rgba(234, 88, 12, 0.5), 0 4px 12px rgba(0, 0, 0, 0.4) !important;
  transition: all 0.2s ease !important;
  position: relative;
  overflow: hidden;
}

.btn-all-in:hover {
  background: linear-gradient(135deg, #ef4444 0%, #f97316 50%, #fbbf24 100%) !important;
  box-shadow: 0 0 25px rgba(249, 115, 22, 0.8), 0 6px 18px rgba(0, 0, 0, 0.5) !important;
  transform: translateY(-2px);
}

.btn-all-in:active {
  transform: translateY(0);
}

.quick-chip:hover, .quick-chip.active {
  background: rgba(59, 130, 246, 0.25);
  color: #38bdf8;
  border-color: #38bdf8;
}

/* DIRECTION SWITCHER (IKUTI / LAWAN) */
.direction-switcher {
  display: flex;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}

.setting-direction-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.setting-direction-btn.active[data-direction="IKUTI"] {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: white;
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.4);
}

.setting-direction-btn.active[data-direction="LAWAN"] {
  background: linear-gradient(135deg, #dc2626, #f97316);
  color: white;
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.4);
}

/* BUTTONS */
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  color: white;
  border: none;
  font-size: 14px;
  font-weight: 700;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
  transition: all 0.25s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.6);
}

.btn-secondary {
  width: 100%;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--accent-cyan);
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}
.btn-danger:hover {
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6);
}

.auto-bet-toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.6);
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  margin-bottom: 14px;
}

.toggle-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-quick-settings {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-quick-settings:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  transform: rotate(45deg);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #334155;
  transition: .3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

/* SETTINGS SECTION CARDS */
.settings-section-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
}

.settings-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.settings-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 640px) {
  .settings-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* TABLES & HISTORY */
.history-table-container {
  overflow-x: auto;
  margin-top: 12px;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.history-table th {
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid var(--card-border);
  white-space: nowrap;
}

.history-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
  color: #cbd5e1;
  white-space: nowrap;
}

.history-table tr:hover td {
  background: rgba(59, 130, 246, 0.05);
}

.badge-win {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 11px;
}

.badge-loss {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 11px;
}

.badge-draw {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 11px;
}

.badge-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}
.badge-color-dot.green { background: #10b981; box-shadow: 0 0 6px #10b981; }
.badge-color-dot.red { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.badge-color-dot.violet { background: #a855f7; box-shadow: 0 0 6px #a855f7; }

/* CRASH SPECIFIC UI */
.crash-canvas-container {
  position: relative;
  width: 100%;
  height: 280px;
  background: radial-gradient(circle at 50% 50%, #0f1c3f 0%, #080d1a 100%);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#crashCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.crash-live-multiplier {
  position: absolute;
  font-size: 52px;
  font-weight: 900;
  font-family: var(--font-mono);
  color: #38bdf8;
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.6);
  pointer-events: none;
  user-select: none;
}

.crash-live-multiplier.crashed {
  color: #ef4444;
  text-shadow: 0 0 25px rgba(239, 68, 68, 0.8);
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  20%, 60% { transform: translate(-4px, 2px); }
  40%, 80% { transform: translate(4px, -2px); }
}

.crash-history-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 0;
  scrollbar-width: none;
  margin-bottom: 14px;
}

.crash-history-bar::-webkit-scrollbar {
  display: none;
}

.crash-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.crash-pill.high {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.crash-pill.low {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.smart-analyz-box {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.7));
  border: 1px solid var(--accent-purple);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}

.smart-analyz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.smart-title {
  font-size: 13px;
  font-weight: 700;
  color: #c084fc;
  display: flex;
  align-items: center;
  gap: 6px;
}

.smart-targets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
}

.target-item {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--card-border);
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.target-item:hover, .target-item.selected {
  border-color: #c084fc;
  background: rgba(139, 92, 246, 0.2);
}

.target-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.target-val {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  color: #38bdf8;
  margin-top: 2px;
}

.target-rate {
  font-size: 10px;
  color: var(--win-green);
  font-weight: 600;
}

/* STATS CARDS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
  color: #f8fafc;
}

.stat-value.positive { color: var(--win-green); }
.stat-value.negative { color: var(--loss-red); }

/* TOAST NOTIFICATIONS */
.toast-container {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--accent-cyan);
  color: #f8fafc;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: slideIn 0.3s ease;
  min-width: 250px;
  max-width: 380px;
}

.toast.win { border-left-color: var(--win-green); }
.toast.loss { border-left-color: var(--loss-red); }
.toast.info { border-left-color: var(--accent-cyan); }
.toast.warning { border-left-color: var(--accent-amber); }

@keyframes slideIn {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* MODAL */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.show {
  display: flex;
}

.modal-box {
  background: #0f172a;
  border: 1px solid var(--card-border-glow);
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  animation: popIn 0.25s ease;
}

@keyframes popIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 16px 20px;
  background: rgba(30, 41, 59, 0.6);
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close-btn:hover {
  color: #f8fafc;
}

.modal-body {
  padding: 20px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 14px 20px;
  background: rgba(15, 23, 42, 0.8);
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* MOBILE BOTTOM NAV */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(11, 19, 43, 0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--card-border);
  z-index: 100;
  justify-content: space-around;
  align-items: center;
  padding: 0 8px;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  flex: 1;
  height: 100%;
  transition: all 0.2s;
}

.bottom-nav-item i {
  font-size: 18px;
}

.bottom-nav-item.active {
  color: var(--accent-cyan);
}

@media (max-width: 768px) {
  .bottom-nav {
    display: flex;
  }
  .nav-bar-container {
    display: none;
  }
}

/* ========================================================
   WINGO NUMBER & COLOR BETTING BOARD
   ======================================================== */
.wingo-board-container {
  margin-top: 16px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 16px;
}

.wingo-board-title {
  font-size: 13px;
  font-weight: 700;
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

/* Colors Grid (Green, Violet, Red) */
.color-bet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.btn-color-bet {
  border: none;
  border-radius: 10px;
  padding: 12px 6px;
  color: white;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn-color-bet:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
}

.btn-color-bet.active {
  box-shadow: 0 0 15px rgba(255,255,255,0.6);
  outline: 2px solid white;
}

.btn-color-bet.green {
  background: linear-gradient(135deg, #059669, #10b981);
}

.btn-color-bet.violet {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
}

.btn-color-bet.red {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}

.bet-multi-badge {
  font-size: 10px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 6px;
  border-radius: 10px;
  font-family: var(--font-mono);
}

/* Size Grid (Besar / Kecil) */
.size-bet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.btn-size-bet {
  border: none;
  border-radius: 10px;
  padding: 12px 10px;
  color: white;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: all 0.2s;
}

.btn-size-bet:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-size-bet.active {
  box-shadow: 0 0 15px rgba(255,255,255,0.6);
  outline: 2px solid white;
}

.btn-size-bet.besar {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
}

.btn-size-bet.kecil {
  background: linear-gradient(135deg, #e11d48, #f43f5e);
}

/* Number Bet Grid (0-9) */
.number-bet-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.btn-number-bet {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-family: var(--font-mono);
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.3), 0 4px 10px rgba(0,0,0,0.5);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.btn-number-bet .num-val {
  font-size: 20px;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.btn-number-bet .num-payout {
  font-size: 9px;
  opacity: 0.85;
  margin-top: 2px;
}

.btn-number-bet:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.5);
}

.btn-number-bet.selected {
  transform: scale(1.15);
  border-color: #f8fafc;
  box-shadow: 0 0 20px #38bdf8, 0 0 10px white;
}

/* Number Color Theming */
.num-red {
  background: radial-gradient(circle at 35% 35%, #f87171 0%, #dc2626 60%, #991b1b 100%);
}

.num-green {
  background: radial-gradient(circle at 35% 35%, #34d399 0%, #059669 60%, #064e3b 100%);
}

.num-split-0 {
  background: linear-gradient(135deg, #dc2626 50%, #9333ea 50%);
}

.num-split-5 {
  background: linear-gradient(135deg, #059669 50%, #9333ea 50%);
}

/* AI RECOMMENDED NUMBER BADGE */
.btn-number-bet.ai-pick::after {
  content: "AI";
  position: absolute;
  top: -4px;
  right: -4px;
  background: #f59e0b;
  color: #000;
  font-size: 8px;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 6px;
  box-shadow: 0 0 6px #f59e0b;
}

/* ========================================================
   SMART AI ANTI-4X LOSS SHIELD CARD
   ======================================================== */
.anti-loss-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 14px;
  padding: 16px;
  margin-top: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.15);
}

.anti-loss-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #10b981, #06b6d4, #8b5cf6, #ef4444);
}

.anti-loss-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.anti-loss-title {
  font-size: 13px;
  font-weight: 800;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.3px;
}

.anti-loss-shield-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 12px;
  font-family: var(--font-mono);
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.anti-loss-shield-badge.warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
}

.anti-loss-shield-badge.critical {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.6);
  animation: pulse 1s infinite;
}

/* Streak Meter */
.streak-meter-box {
  background: rgba(11, 19, 43, 0.6);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}

.streak-meter-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 8px;
}

.streak-steps-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  height: 8px;
}

.streak-step {
  background: rgba(59, 130, 246, 0.15);
  border-radius: 4px;
  transition: all 0.3s;
}

.streak-step.active.step-1 { background: #3b82f6; box-shadow: 0 0 8px #3b82f6; }
.streak-step.active.step-2 { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.streak-step.active.step-3 { background: #ef4444; box-shadow: 0 0 10px #ef4444; }
.streak-step.active.step-4 { background: #10b981; box-shadow: 0 0 10px #10b981; }

.anti-loss-status-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
}

.anti-loss-status-desc strong {
  color: #f8fafc;
}

/* ========================================================
   NEW FEATURES: FLIPLOSS, 212, BOOM, SERVER ANALYZER, AUTO WITHDRAW
   ======================================================== */

.feature-control-card {
  background: linear-gradient(135deg, rgba(20, 27, 45, 0.85), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 14px;
  padding: 16px;
  margin-top: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

.feature-control-card.active-glow {
  border-color: rgba(6, 182, 212, 0.6);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.25);
}

.feature-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.feature-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 0.3px;
}

.feature-title i {
  color: #38bdf8;
  font-size: 15px;
}

.feature-sub-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-family: var(--font-mono);
  font-weight: 700;
}

.switches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 14px;
}

.switch-pill-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(11, 19, 43, 0.7);
  border: 1px solid var(--card-border);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.switch-pill-item:hover {
  border-color: #38bdf8;
  background: rgba(30, 41, 59, 0.8);
}

.switch-pill-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.switch-pill-label i {
  font-size: 13px;
  color: #38bdf8;
}

/* Analyz Custom Server Box */
.server-analyz-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  padding: 14px;
  margin-top: 14px;
}

.analyz-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 12px 0;
  text-align: center;
}

.analyz-stat-cell {
  background: rgba(11, 19, 43, 0.8);
  border: 1px solid rgba(139, 92, 246, 0.2);
  padding: 8px;
  border-radius: 8px;
}

.analyz-stat-val {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  color: #a855f7;
}

.analyz-stat-val.rate {
  color: #10b981;
}

.analyz-stat-lbl {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

.analyz-progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0;
}

.analyz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  width: 94.2%;
  transition: width 0.6s ease;
}

/* Auto Boom Box */
.boom-badge {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.boom-active-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #f59e0b;
  font-size: 11px;
  font-weight: 700;
}

/* Pola 2P Log Highlight */
.badge-pola-2p {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.badge-fliploss {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.badge-212 {
  background: rgba(6, 182, 212, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.4);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}
