/* ═══════════════════════════════════════════════════════════════════
   AI Bank Hacker — Windows 11 Photo-Real UI
   happystoner5420 Games
═══════════════════════════════════════════════════════════════════ */

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

:root {
  --win-bg: #0a0a14;
  --win-glass: rgba(20,22,40,0.82);
  --win-glass-border: rgba(120,140,255,0.18);
  --win-titlebar: rgba(18,20,38,0.97);
  --win-titlebar-text: #e8eaf6;
  --accent: #0078d4;
  --accent2: #00ff88;
  --accent3: #ff4757;
  --accent4: #ffd700;
  --text-main: #f0f0f0;
  --text-muted: #8892a4;
  --text-dim: #4a5568;
  --terminal-bg: #0d0f1a;
  --terminal-green: #00ff88;
  --terminal-cyan: #00e5ff;
  --terminal-yellow: #ffd700;
  --terminal-red: #ff4757;
  --terminal-purple: #b76cfb;
  --border: rgba(255,255,255,0.08);
  --shadow: 0 8px 32px rgba(0,0,0,0.7), 0 2px 8px rgba(0,120,212,0.15);
  --shadow-lg: 0 24px 64px rgba(0,0,0,0.85), 0 4px 16px rgba(0,120,212,0.2);
  --radius: 10px;
  --radius-sm: 6px;
  --taskbar-h: 48px;
  --scrollbar-w: 6px;
}

html, body {
  width: 100%; height: 100%; overflow: hidden;
  font-family: 'Segoe UI', -apple-system, system-ui, sans-serif;
  font-size: 13px;
  background: #000;
  color: var(--text-main);
  user-select: none;
}

/* ─── SCROLLBARS ─── */
::-webkit-scrollbar { width: var(--scrollbar-w); height: var(--scrollbar-w); }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.3); }
::-webkit-scrollbar-thumb { background: rgba(120,140,255,0.4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(120,140,255,0.7); }

/* ─── SCREENS ─── */
.screen { position: fixed; inset: 0; }
.hidden { display: none !important; }
.active { display: flex !important; }

/* ════════════════════════════════════ BOOT SCREEN */
.boot-screen {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 9999;
}
.boot-windows-logo {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  width: 72px; height: 72px; margin-bottom: 48px;
}
.w-square { border-radius: 3px; }
.w1 { background: #f35325; }
.w2 { background: #81bc06; }
.w3 { background: #05a6f0; }
.w4 { background: #ffba08; }
.boot-spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top: 3px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 24px;
}
.boot-tagline { color: rgba(255,255,255,0.5); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════════ MAIN MENU */
#main-menu {
  display: none;
  position: fixed; inset: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 100;
}
.menu-wallpaper {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(0,120,212,0.35) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 20%, rgba(120,0,212,0.25) 0%, transparent 60%),
    linear-gradient(135deg, #060810 0%, #0d1226 40%, #08101f 100%);
  overflow: hidden;
}
.menu-wallpaper::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle 1px at 10% 20%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(circle 1px at 80% 15%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(circle 1px at 45% 60%, rgba(255,255,255,0.2) 0%, transparent 100%),
    radial-gradient(circle 1px at 70% 80%, rgba(255,255,255,0.35) 0%, transparent 100%),
    radial-gradient(circle 1px at 25% 75%, rgba(255,255,255,0.25) 0%, transparent 100%);
  animation: starfield 30s linear infinite;
}
@keyframes starfield {
  0% { transform: translate(0,0); }
  100% { transform: translate(-50px, -30px); }
}
.menu-bg-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.35); z-index: 1; }
.menu-center { position: relative; z-index: 10; }

.menu-glass-card {
  background: rgba(16,18,32,0.82);
  backdrop-filter: blur(40px) saturate(1.4);
  border: 1px solid rgba(120,140,255,0.22);
  border-radius: 20px;
  padding: 40px 48px;
  min-width: 420px;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; align-items: center; gap: 24px;
}
.menu-title-block { text-align: center; }
.menu-icon-ai img.menu-ai-icon-img {
  width: 90px; height: 90px; border-radius: 50%;
  border: 3px solid var(--accent2);
  box-shadow: 0 0 24px rgba(0,255,136,0.5);
  margin-bottom: 12px;
}
.menu-title {
  font-size: 32px; font-weight: 700; letter-spacing: -0.5px;
  background: linear-gradient(135deg, #00ff88, #00e5ff, #7c5cd8);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.menu-subtitle { color: var(--text-muted); font-size: 12px; margin-top: 4px; letter-spacing: 1px; }
.menu-disclaimer {
  color: #ff6b35; font-size: 10px; margin-top: 10px;
  background: rgba(255,100,0,0.08); border: 1px solid rgba(255,100,0,0.2);
  border-radius: 6px; padding: 6px 10px; line-height: 1.4;
}

.menu-buttons { display: flex; flex-direction: column; gap: 10px; width: 280px; }
.menu-btn {
  padding: 12px 20px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05); color: var(--text-main);
  font-size: 14px; font-weight: 500; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  transition: all 0.18s ease;
  font-family: 'Segoe UI', sans-serif;
}
.menu-btn:hover { background: rgba(0,120,212,0.2); border-color: rgba(0,120,212,0.5); transform: translateY(-1px); }
.menu-btn.primary { background: linear-gradient(135deg, #0078d4, #005a9e); border-color: #0078d4; }
.menu-btn.primary:hover { background: linear-gradient(135deg, #1a88e4, #0068ae); box-shadow: 0 0 16px rgba(0,120,212,0.4); }
.menu-btn.danger { background: rgba(196,43,28,0.2); border-color: rgba(196,43,28,0.4); }
.menu-btn.danger:hover { background: rgba(196,43,28,0.4); border-color: #c42b1c; }
.btn-icon { font-size: 16px; width: 20px; text-align: center; }

/* ════════════════════════════════════ WIN11 TASKBAR (menu) */
.win11-taskbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--taskbar-h);
  background: rgba(16,18,32,0.88);
  backdrop-filter: blur(40px);
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; z-index: 200;
}
.taskbar-search {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 4px 12px;
  color: var(--text-muted); cursor: pointer; font-size: 12px;
  width: 180px;
}
.taskbar-clock { color: var(--text-main); font-size: 11px; text-align: center; }
.taskbar-right { display: flex; align-items: center; gap: 8px; }
.taskbar-icon { cursor: pointer; font-size: 14px; }

/* ════════════════════════════════════ OVERLAYS */
.overlay-panel {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
}
.overlay-win {
  background: rgba(20,22,38,0.97);
  border: 1px solid var(--win-glass-border);
  border-radius: 12px; box-shadow: var(--shadow-lg);
  width: 580px; max-height: 80vh; display: flex; flex-direction: column;
  overflow: hidden;
}
/* Wider window for How to Play */
.overlay-win.htp-win { width: min(900px, 94vw); max-height: 88vh; }

/* ── HOW TO PLAY LAYOUT ──────────────────────────────────── */
.htp-body { display: flex; flex-direction: column; gap: 0; padding: 20px 22px 16px; }
.htp-intro {
  display: flex; align-items: flex-start; gap: 16px;
  background: rgba(0,255,136,0.04); border: 1px solid rgba(0,255,136,0.12);
  border-radius: 10px; padding: 16px; margin-bottom: 18px;
}
.htp-aria-img {
  width: 60px; height: 60px; border-radius: 50%;
  border: 2px solid var(--accent2); flex-shrink: 0;
  box-shadow: 0 0 12px rgba(0,255,136,0.35);
}
.htp-section { margin-bottom: 18px; }
.htp-section-title {
  font-size: 12px; font-weight: 700; color: var(--terminal-cyan);
  text-transform: uppercase; letter-spacing: 1.5px;
  margin-bottom: 10px; padding-bottom: 5px;
  border-bottom: 1px solid rgba(0,229,255,0.15);
}
.htp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.htp-card {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px; padding: 11px 13px;
  transition: border-color 0.15s, background 0.15s;
}
.htp-card:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.14); }
.htp-card-icon { font-size: 20px; margin-bottom: 5px; }
.htp-card-title { font-size: 12px; font-weight: 700; color: var(--text-main); margin-bottom: 4px; }
.htp-card-body { font-size: 11px; color: var(--text-muted); line-height: 1.6; }
.htp-card-body em { color: var(--terminal-yellow); font-style: normal; }
/* Colour variants */
.htp-card-green { border-color: rgba(0,255,136,0.18); background: rgba(0,255,136,0.03); }
.htp-card-green .htp-card-title { color: var(--accent2); }
.htp-card-blue  { border-color: rgba(0,120,212,0.22); background: rgba(0,120,212,0.04); }
.htp-card-blue  .htp-card-title { color: #7eb8f7; }
.htp-card-red   { border-color: rgba(255,71,87,0.22);  background: rgba(255,71,87,0.04); }
.htp-card-red   .htp-card-title { color: var(--terminal-red); }
.htp-card-yellow{ border-color: rgba(255,215,0,0.22);  background: rgba(255,215,0,0.04); }
.htp-card-yellow .htp-card-title { color: var(--terminal-yellow); }
.htp-card-orange{ border-color: rgba(255,120,0,0.25);  background: rgba(255,80,0,0.05); }
.htp-card-orange .htp-card-title { color: #ff8c42; }
.htp-card-purple{ border-color: rgba(183,108,251,0.25); background: rgba(183,108,251,0.04); }
.htp-card-purple .htp-card-title { color: var(--terminal-purple); }
/* Wide info card */
.htp-card-wide {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px; padding: 13px 16px;
  font-size: 12px; color: var(--text-muted); line-height: 1.7;
}
.htp-card-wide strong { color: var(--text-main); }
/* Tips list */
.htp-tips-list {
  list-style: none; padding: 0; display: flex; flex-direction: column; gap: 7px;
}
.htp-tips-list li {
  font-size: 12px; color: var(--text-muted); line-height: 1.6;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 7px; padding: 8px 12px;
}
.htp-tips-list li strong { color: var(--text-main); }
.overlay-titlebar {
  display: flex; align-items: center; gap: 8px;
  background: var(--win-titlebar); padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.titlebar-icon { font-size: 16px; }
.titlebar-title { flex: 1; font-size: 13px; font-weight: 500; color: var(--win-titlebar-text); }
.titlebar-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 14px; cursor: pointer; padding: 4px 8px; border-radius: 4px;
}
.titlebar-close:hover { background: #c42b1c; color: #fff; }
.overlay-body { padding: 24px; overflow-y: auto; flex: 1; }
.overlay-body h2 { color: var(--accent2); margin-bottom: 12px; font-size: 18px; }
.overlay-body h3 { color: var(--terminal-cyan); margin: 16px 0 6px; font-size: 14px; }
.overlay-body p { color: var(--text-muted); line-height: 1.7; margin-bottom: 8px; }
.overlay-body ul { color: var(--text-muted); padding-left: 20px; }
.overlay-body ul li { margin-bottom: 4px; }
.overlay-body strong { color: var(--text-main); }
.overlay-body em { color: var(--terminal-yellow); }
.credits-body { text-align: center; }
.credits-logo { margin-bottom: 12px; }
.credits-title { font-size: 28px; font-weight: 700; color: var(--accent2); margin-bottom: 4px; }
.credits-studio { color: var(--terminal-cyan); margin-bottom: 16px; }
.credits-scroll { display: flex; flex-direction: column; gap: 14px; }
.credits-scroll p { color: var(--text-muted); line-height: 1.6; }
.credits-footer { font-size: 11px; color: var(--text-dim); border-top: 1px solid var(--border); padding-top: 14px; }

/* ════════════════════════════════════ GAME DESKTOP */
.win11-desktop {
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 15% 85%, rgba(0,60,120,0.5) 0%, transparent 55%),
    radial-gradient(ellipse 50% 70% at 85% 15%, rgba(80,0,180,0.35) 0%, transparent 55%),
    linear-gradient(160deg, #04060e 0%, #080e1e 50%, #040810 100%);
  overflow: hidden;
}
.win11-desktop::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle 1px at 5% 10%, rgba(0,255,136,0.6) 0%, transparent 100%),
    radial-gradient(circle 1px at 20% 40%, rgba(0,229,255,0.4) 0%, transparent 100%),
    radial-gradient(circle 1px at 60% 25%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(circle 1px at 75% 65%, rgba(120,92,251,0.5) 0%, transparent 100%),
    radial-gradient(circle 1px at 35% 80%, rgba(255,100,0,0.3) 0%, transparent 100%),
    radial-gradient(circle 1px at 90% 45%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(circle 1px at 50% 90%, rgba(0,255,136,0.3) 0%, transparent 100%);
  pointer-events: none;
}

/* ════════════════════════════════════ WINDOWS */
.win-window {
  position: absolute;
  display: flex; flex-direction: column;
  background: var(--win-glass);
  border: 1px solid var(--win-glass-border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
  min-width: 300px; min-height: 200px;
  transition: box-shadow 0.15s;
}
.win-window:focus-within, .win-window.focused {
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,120,212,0.4);
}
.win-window.minimized { display: none; }
.win-window.maximized { left: 0 !important; top: 0 !important; width: 100vw !important; height: calc(100vh - 48px) !important; border-radius: 0; }

.win-titlebar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; background: var(--win-titlebar);
  border-bottom: 1px solid var(--border);
  cursor: move; flex-shrink: 0;
  user-select: none;
}
.win-titlebar-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.win-icon { font-size: 14px; }
.win-icon-gif { width: 18px; height: 18px; border-radius: 3px; }
.win-title { font-size: 12px; font-weight: 500; color: var(--win-titlebar-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.win-controls { display: flex; gap: 4px; }
.wc-btn {
  width: 28px; height: 28px; border: none; background: none;
  color: var(--text-muted); font-size: 12px; cursor: pointer;
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  transition: background 0.12s, color 0.12s;
}
.wc-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }
.wc-close:hover { background: #c42b1c; color: #fff; }
.wc-max:hover { background: rgba(0,120,212,0.4); }

.win-body { flex: 1; overflow: hidden; display: flex; flex-direction: column; }

/* ════════════════════════════════════ TERMINAL */
.terminal-body { background: var(--terminal-bg); }
.aria-header {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: rgba(0,255,136,0.04);
  border-bottom: 1px solid rgba(0,255,136,0.1);
  flex-shrink: 0;
}
.aria-avatar { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--accent2); box-shadow: 0 0 12px rgba(0,255,136,0.4); }
.aria-info { display: flex; flex-direction: column; gap: 3px; }
.aria-name { font-weight: 700; font-size: 14px; color: var(--accent2); }
.aria-version { font-size: 10px; color: var(--text-muted); font-weight: normal; }
.aria-status { font-size: 11px; color: var(--terminal-cyan); }
.aria-stats { display: flex; gap: 16px; }
.aria-stats span { font-size: 10px; color: var(--text-muted); font-family: 'Cascadia Code', 'Consolas', monospace; }

.terminal-log {
  flex: 1; overflow-y: auto; padding: 12px 14px;
  font-family: 'Cascadia Code', 'Consolas', 'Courier New', monospace;
  font-size: 12px; line-height: 1.7;
  display: flex; flex-direction: column; gap: 4px;
}
.log-entry { padding: 3px 0; }
.log-system { color: var(--text-muted); }
.log-player { color: var(--terminal-yellow); }
.log-player::before { content: '▶ '; color: var(--accent4); }
.log-aria { color: var(--terminal-green); }
.log-aria::before { content: 'ARIA: '; color: var(--accent2); font-weight: 700; }
.log-action { color: var(--terminal-cyan); }
.log-action::before { content: '⚡ '; }
.log-success { color: #00ff88; }
.log-success::before { content: '✓ '; }
.log-error { color: var(--terminal-red); }
.log-error::before { content: '✗ '; }
.log-warning { color: var(--terminal-yellow); }
.log-warning::before { content: '⚠ '; }
.log-money { color: var(--accent4); font-weight: 700; }
.log-money::before { content: '💰 '; }
.log-chat { color: #c9b8ff; }
.log-chat::before { content: 'ARIA: '; color: #b76cfb; font-weight: 700; }

.terminal-input-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-top: 1px solid rgba(0,255,136,0.15);
  background: rgba(0,255,136,0.03); flex-shrink: 0;
}
.terminal-prompt { color: var(--accent2); font-family: monospace; font-size: 12px; white-space: nowrap; }
.terminal-input {
  flex: 1; background: rgba(0,255,136,0.06);
  border: 1px solid rgba(0,255,136,0.2); border-radius: 6px;
  color: var(--text-main); font-family: 'Cascadia Code','Consolas',monospace;
  font-size: 12px; padding: 7px 10px; outline: none;
}
.terminal-input:focus { border-color: var(--accent2); box-shadow: 0 0 8px rgba(0,255,136,0.2); }
.terminal-input::placeholder { color: var(--text-dim); }
.terminal-send-btn {
  background: linear-gradient(135deg, #005f30, #00a855);
  border: 1px solid rgba(0,255,136,0.3); color: var(--accent2);
  font-weight: 700; font-size: 11px; border-radius: 6px;
  padding: 7px 14px; cursor: pointer; letter-spacing: 1px;
  transition: all 0.15s;
}
.terminal-send-btn:hover { background: linear-gradient(135deg, #007a3d, #00c066); box-shadow: 0 0 12px rgba(0,255,136,0.3); }
.terminal-send-btn:active { transform: scale(0.97); }

.quick-commands {
  display: flex; flex-wrap: wrap; gap: 5px;
  padding: 7px 12px; border-top: 1px solid rgba(0,255,136,0.08);
  background: rgba(0,0,0,0.3); flex-shrink: 0; align-items: center;
}
.qc-label { font-size: 10px; color: var(--text-dim); margin-right: 4px; }
.qc-btn {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted); font-size: 10px; border-radius: 5px;
  padding: 3px 8px; cursor: pointer; transition: all 0.12s;
  font-family: 'Segoe UI', sans-serif;
}
.qc-btn:hover { background: rgba(0,120,212,0.2); border-color: rgba(0,120,212,0.4); color: var(--text-main); }

/* ════════════════════════════════════ BANK */
.bank-body { background: #0a0e1a; padding: 16px; overflow-y: auto; }
.bank-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.bank-logo { display: flex; align-items: center; gap: 8px; }
.bank-logo-text { font-size: 15px; font-weight: 700; color: #7eb8f7; }
.bank-logo-sub { font-size: 10px; color: var(--text-muted); }
.bank-chip { background: linear-gradient(135deg, #c8a84b, #e8cc6a, #a07830); border-radius: 5px; width: 36px; height: 26px; }
.bank-card {
  background: linear-gradient(135deg, #0f1e3d, #1a2a55, #0a1628);
  border: 1px solid rgba(120,180,255,0.25); border-radius: 14px;
  padding: 18px 20px; margin-bottom: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.06);
}
.bank-card-number { font-family: 'Consolas', monospace; font-size: 14px; color: rgba(255,255,255,0.7); letter-spacing: 2px; margin-bottom: 10px; }
.bank-card-name { font-size: 12px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 1px; }
.bank-balance-main { font-size: 28px; font-weight: 700; color: var(--accent2); margin-bottom: 2px; text-shadow: 0 0 20px rgba(0,255,136,0.4); }
.bank-balance-label { font-size: 10px; color: var(--text-muted); letter-spacing: 1px; }
.bank-transactions { margin-top: 10px; }
.bank-tx-header { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.bank-tx { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.bank-tx-desc { font-size: 11px; color: var(--text-muted); }
.bank-tx-date { font-size: 10px; color: var(--text-dim); }
.bank-tx-amount { font-size: 12px; font-weight: 700; }
.bank-tx-amount.credit { color: var(--accent2); }
.bank-tx-amount.debit { color: var(--terminal-red); }

/* ════════════════════════════════════ STOCKS */
.stocks-body { background: #070a14; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.stocks-header { padding: 10px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.stocks-index { display: flex; gap: 16px; }
.stock-idx-item { display: flex; flex-direction: column; }
.stock-idx-name { font-size: 9px; color: var(--text-muted); letter-spacing: 1px; }
.stock-idx-val { font-size: 13px; font-weight: 700; }
.stock-idx-val.up { color: var(--accent2); }
.stock-idx-val.down { color: var(--terminal-red); }
.stock-idx-chg { font-size: 10px; }
.stock-idx-chg.up { color: var(--accent2); }
.stock-idx-chg.down { color: var(--terminal-red); }
.stocks-ticker { overflow: hidden; padding: 6px 0; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.ticker-inner { display: flex; gap: 24px; white-space: nowrap; animation: ticker-scroll 30s linear infinite; width: max-content; }
.ticker-item { font-size: 11px; font-family: 'Consolas', monospace; }
.ticker-item .t-sym { color: var(--text-main); font-weight: 700; margin-right: 4px; }
.ticker-item .t-price { margin-right: 4px; }
.ticker-item.up .t-price { color: var(--accent2); }
.ticker-item.down .t-price { color: var(--terminal-red); }
.ticker-item .t-chg { font-size: 10px; }
.ticker-item.up .t-chg { color: var(--accent2); }
.ticker-item.down .t-chg { color: var(--terminal-red); }
@keyframes ticker-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.stocks-table-wrap { flex: 1; overflow-y: auto; padding: 8px; }
.stocks-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.stocks-table th { color: var(--text-muted); font-size: 9px; text-transform: uppercase; letter-spacing: 0.8px; text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); font-weight: 600; }
.stocks-table td { padding: 7px 8px; border-bottom: 1px solid rgba(255,255,255,0.03); }
.stocks-table tr:hover td { background: rgba(255,255,255,0.04); }
.stocks-table .sym { font-weight: 700; color: var(--text-main); }
.stocks-table .name { color: var(--text-muted); font-size: 10px; }
.stocks-table .price { font-family: 'Consolas', monospace; font-weight: 700; }
.stocks-table .price.up { color: var(--accent2); }
.stocks-table .price.down { color: var(--terminal-red); }
.stocks-table .chg.up { color: var(--accent2); }
.stocks-table .chg.down { color: var(--terminal-red); }
.stocks-table .owned { color: var(--terminal-yellow); }
.stock-buy-btn { background: rgba(0,120,212,0.2); border: 1px solid rgba(0,120,212,0.3); color: #7eb8f7; font-size: 9px; padding: 3px 7px; border-radius: 4px; cursor: pointer; }
.stock-buy-btn:hover { background: rgba(0,120,212,0.4); }
.stock-sell-btn { background: rgba(196,43,28,0.2); border: 1px solid rgba(196,43,28,0.3); color: #ff8070; font-size: 9px; padding: 3px 7px; border-radius: 4px; cursor: pointer; margin-left: 3px; }
.stock-sell-btn:hover { background: rgba(196,43,28,0.4); }

/* ════════════════════════════════════ EMAIL */
.email-body { background: #0a0e1a; display: flex; flex-direction: row; overflow: hidden; }
.email-sidebar { width: 160px; background: rgba(10,14,30,0.9); border-right: 1px solid var(--border); padding: 8px; flex-shrink: 0; overflow-y: auto; }
.email-folder { padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.email-folder:hover { background: rgba(255,255,255,0.06); }
.email-folder.active { background: rgba(0,120,212,0.2); color: var(--text-main); }
.email-folder .badge { background: var(--accent); color: #fff; font-size: 9px; padding: 1px 5px; border-radius: 10px; margin-left: auto; }
.email-compose-btn { background: var(--accent); border: none; color: #fff; font-size: 12px; padding: 8px 12px; border-radius: 8px; cursor: pointer; width: 100%; margin-bottom: 10px; }
.email-compose-btn:hover { background: #1a88e4; }
.email-list { flex: 1; overflow-y: auto; border-right: 1px solid var(--border); }
.email-item { padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.04); cursor: pointer; }
.email-item:hover { background: rgba(255,255,255,0.04); }
.email-item.active { background: rgba(0,120,212,0.12); border-left: 3px solid var(--accent); }
.email-item .ei-from { font-size: 12px; font-weight: 600; color: var(--text-main); }
.email-item .ei-subject { font-size: 11px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.email-item .ei-time { font-size: 10px; color: var(--text-dim); float: right; }
.email-item.unread .ei-from { color: var(--terminal-cyan); }
.email-preview { width: 240px; padding: 14px; overflow-y: auto; flex-shrink: 0; }
.email-preview h4 { font-size: 13px; color: var(--text-main); margin-bottom: 6px; }
.email-preview .ep-meta { font-size: 10px; color: var(--text-muted); margin-bottom: 10px; }
.email-preview .ep-body { font-size: 12px; color: var(--text-muted); line-height: 1.7; }

/* ════════════════════════════════════ MAP */
.map-body { background: #030510; position: relative; overflow: hidden; }
canvas.map-canvas { width: 100%; height: 100%; }
.map-event-marker { position: absolute; width: 14px; height: 14px; border-radius: 50%; animation: pulse-marker 1.5s ease-in-out infinite; }
.map-event-marker.hack { background: var(--accent2); box-shadow: 0 0 8px var(--accent2); }
.map-event-marker.power { background: var(--terminal-yellow); box-shadow: 0 0 8px var(--terminal-yellow); }
.map-event-marker.nuke { background: var(--terminal-red); box-shadow: 0 0 12px var(--terminal-red); }
@keyframes pulse-marker { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: 0.6; } }

/* ════════════════════════════════════ GAME TASKBAR */
.game-taskbar { position: fixed; z-index: 200; }
.taskbar-start-btn {
  background: none; border: none; font-size: 22px;
  cursor: pointer; color: #fff; padding: 4px 10px;
  transition: background 0.12s; border-radius: 6px;
}
.taskbar-start-btn:hover { background: rgba(255,255,255,0.12); }
.tb-app-btn {
  background: none; border: none; font-size: 18px;
  cursor: pointer; padding: 4px 8px; border-radius: 6px;
  color: var(--text-muted); transition: all 0.12s;
}
.tb-app-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.tb-balance { color: var(--accent2); font-weight: 700; font-size: 13px; font-family: 'Consolas', monospace; margin: 0 6px; }

/* ════════════════════════════════════ START MENU */
.start-menu {
  position: fixed; bottom: calc(var(--taskbar-h) + 8px); left: 8px;
  width: 240px; background: rgba(20,22,40,0.97);
  backdrop-filter: blur(40px);
  border: 1px solid rgba(120,140,255,0.22);
  border-radius: 12px; box-shadow: var(--shadow-lg);
  z-index: 300; overflow: hidden;
}
.start-menu-header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text-main); }
.start-menu-items { padding: 8px; }
.sm-item { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: none; color: var(--text-muted); font-size: 13px; padding: 9px 12px; border-radius: 6px; cursor: pointer; text-align: left; }
.sm-item:hover { background: rgba(255,255,255,0.07); color: var(--text-main); }
.sm-item.danger { color: var(--terminal-red); }
.sm-item.danger:hover { background: rgba(196,43,28,0.15); }

/* ════════════════════════════════════ EFFECT OVERLAY */
.effect-overlay {
  position: fixed; inset: 0; z-index: 9000; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}
.effect-overlay.poweroff { background: rgba(0,0,0,0.97); animation: flicker-off 0.8s ease-out forwards; }
.effect-overlay.nuke-flash { background: rgba(255,200,0,0.9); animation: nuke-flash 1.5s ease-out forwards; }
.effect-overlay.hack-flash { background: rgba(0,255,136,0.08); animation: hack-flash 0.5s ease-out forwards; }
.effect-overlay.market-crash { background: rgba(196,43,28,0.1); animation: crash-pulse 2s ease-out forwards; }
@keyframes flicker-off {
  0% { opacity: 0; }
  10% { opacity: 1; }
  20% { opacity: 0.3; }
  30% { opacity: 0.9; }
  40% { opacity: 0.2; }
  50% { opacity: 1; }
  100% { opacity: 1; }
}
@keyframes nuke-flash {
  0% { opacity: 0; }
  5% { opacity: 1; }
  30% { opacity: 0.8; }
  100% { opacity: 0; }
}
@keyframes hack-flash {
  0% { opacity: 1; } 100% { opacity: 0; }
}
@keyframes crash-pulse {
  0% { opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; }
}

/* ════════════════════════════════════ TOASTS */
.toast-container { position: fixed; top: 16px; right: 16px; z-index: 8000; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.toast {
  background: rgba(20,22,40,0.95);
  border: 1px solid var(--win-glass-border);
  border-radius: 10px; padding: 12px 16px;
  display: flex; align-items: flex-start; gap: 10px;
  box-shadow: var(--shadow);
  animation: toast-in 0.3s ease-out;
  backdrop-filter: blur(20px);
}
.toast.success { border-left: 3px solid var(--accent2); }
.toast.error { border-left: 3px solid var(--terminal-red); }
.toast.warning { border-left: 3px solid var(--terminal-yellow); }
.toast.info { border-left: 3px solid var(--accent); }
.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast-content { flex: 1; }
.toast-title { font-size: 12px; font-weight: 600; color: var(--text-main); margin-bottom: 2px; }
.toast-msg { font-size: 11px; color: var(--text-muted); line-height: 1.5; }
@keyframes toast-in { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toast-out { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

/* ════════════════════════════════════ MODAL DIALOGS */
.modal-overlay {
  position: fixed; inset: 0; z-index: 5000;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
}
.modal-win { background: rgba(22,24,42,0.98); border: 1px solid var(--win-glass-border); border-radius: 12px; padding: 24px; min-width: 320px; max-width: 480px; box-shadow: var(--shadow-lg); }
.modal-title { font-size: 16px; font-weight: 700; color: var(--text-main); margin-bottom: 10px; }
.modal-body { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.6; }
.modal-input { width: 100%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; padding: 8px 12px; color: var(--text-main); font-size: 13px; outline: none; font-family: inherit; margin-bottom: 12px; }
.modal-input:focus { border-color: var(--accent); }
.modal-btns { display: flex; gap: 8px; justify-content: flex-end; }
.modal-btn { padding: 8px 18px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.06); color: var(--text-main); font-size: 13px; cursor: pointer; }
.modal-btn.primary { background: var(--accent); border-color: var(--accent); }
.modal-btn:hover { opacity: 0.85; }

/* ════════════════════════════════════ MISC HELPERS */
.pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 20px; font-size: 10px; font-weight: 600; letter-spacing: 0.5px; }
.pill-green { background: rgba(0,255,136,0.1); color: var(--accent2); border: 1px solid rgba(0,255,136,0.2); }
.pill-red { background: rgba(255,71,87,0.1); color: var(--terminal-red); border: 1px solid rgba(255,71,87,0.2); }
.pill-yellow { background: rgba(255,215,0,0.1); color: var(--terminal-yellow); border: 1px solid rgba(255,215,0,0.2); }
.pill-blue { background: rgba(0,120,212,0.1); color: #7eb8f7; border: 1px solid rgba(0,120,212,0.2); }

/* ════════════════════════════════════ TV HIJACK EFFECT */
.effect-overlay.tv-hijack {
  background: #000;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  pointer-events: none;
}
.tv-static-layer {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.12'/%3E%3C/svg%3E");
  animation: tv-static-anim 0.08s steps(1) infinite;
  opacity: 0.15;
  pointer-events: none;
}
@keyframes tv-static-anim {
  0%   { background-position: 0 0; }
  25%  { background-position: 40px 20px; }
  50%  { background-position: -20px 40px; }
  75%  { background-position: 60px -30px; }
  100% { background-position: -40px 10px; }
}
.tv-broadcast-frame {
  position: relative; z-index: 2;
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #0a0a14 0%, #000 100%);
  animation: tv-scan-lines 0.1s linear infinite;
}
@keyframes tv-scan-lines {
  0% { background-position: 0 0; }
  100% { background-position: 0 4px; }
}
.tv-network-bug {
  position: absolute; top: 14px; left: 18px;
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: #fff;
  background: rgba(0,0,0,0.7); padding: 5px 12px; border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.2);
}
.tv-live-dot { color: #ff4757; animation: blink 1s ease-in-out infinite; font-size: 10px; }
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0; } }
.tv-network-name { color: #e8eaf6; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.tv-aria-logo {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
}
.tv-aria-gif {
  width: 100px; height: 100px; border-radius: 50%;
  border: 4px solid #e040fb;
  box-shadow: 0 0 40px rgba(224,64,251,0.7), 0 0 80px rgba(224,64,251,0.3);
  animation: tv-aria-pulse 1.5s ease-in-out infinite;
}
@keyframes tv-aria-pulse {
  0%,100% { box-shadow: 0 0 40px rgba(224,64,251,0.7), 0 0 80px rgba(224,64,251,0.3); }
  50% { box-shadow: 0 0 60px rgba(224,64,251,1), 0 0 120px rgba(224,64,251,0.5); }
}
.tv-aria-label {
  font-size: 28px; font-weight: 900; letter-spacing: 4px; text-transform: uppercase;
  color: #e040fb; text-shadow: 0 0 30px rgba(224,64,251,0.8);
  animation: tv-glitch-text 3s ease-in-out infinite;
}
@keyframes tv-glitch-text {
  0%,90%,100% { transform: translate(0,0); clip-path: none; }
  92% { transform: translate(-3px, 1px); color: #00e5ff; }
  94% { transform: translate(3px,-1px); color: #ff4757; }
  96% { transform: translate(-1px, 2px); color: #e040fb; }
  98% { transform: translate(0,0); }
}
.tv-aria-sub {
  font-size: 14px; color: rgba(255,255,255,0.6); letter-spacing: 1px;
}
.tv-headline-box {
  margin: 0 0 8px; flex-shrink: 0;
}
.tv-breaking-banner {
  background: #ff4757; color: #fff;
  font-size: 11px; font-weight: 900; letter-spacing: 3px; text-transform: uppercase;
  padding: 6px 20px; text-align: center;
}
.tv-headline-text {
  background: rgba(0,0,0,0.85); color: #fff;
  font-size: 22px; font-weight: 700; text-align: center;
  padding: 14px 24px; line-height: 1.4;
  border-top: 3px solid #e040fb;
  text-shadow: 0 0 20px rgba(224,64,251,0.5);
}
.tv-ticker-wrap {
  display: flex; align-items: center;
  background: #1a1a2e; border-top: 2px solid #e040fb;
  height: 34px; overflow: hidden; flex-shrink: 0;
}
.tv-ticker-label {
  background: #e040fb; color: #fff;
  font-size: 10px; font-weight: 900; letter-spacing: 2px;
  padding: 0 12px; height: 100%; display: flex; align-items: center;
  white-space: nowrap; flex-shrink: 0;
}
.tv-ticker-scroll {
  flex: 1; white-space: nowrap; overflow: hidden;
  font-size: 12px; color: #e8eaf6; font-weight: 600; letter-spacing: 0.5px;
  animation: tv-ticker-move 18s linear infinite;
  padding-left: 20px;
}
@keyframes tv-ticker-move { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }
.tv-glitch-bar {
  position: absolute; width: 100%; height: 3px;
  background: linear-gradient(90deg, transparent, #e040fb, #00e5ff, transparent);
  animation: tv-scan-bar 2s linear infinite;
  opacity: 0.6;
}
@keyframes tv-scan-bar { 0% { top: 0; } 100% { top: 100%; } }
.effect-overlay.tv-fade-out { animation: tv-fadeout 1s ease-in forwards; }
@keyframes tv-fadeout {
  0% { opacity:1; filter:none; }
  40% { opacity:1; filter:brightness(3) saturate(0); }
  100% { opacity:0; filter:brightness(0); }
}

/* ════════════════════════════════════ INTERNET CRASH EFFECT */
.effect-overlay.internet-crash {
  background: rgba(4,6,14,0.97);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  flex-direction: column;
}
.inet-grid-container {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: repeat(20, 1fr);
  gap: 4px; padding: 12px; align-content: center;
  opacity: 0.35;
}
.inet-node {
  width: 100%; aspect-ratio: 1;
  border-radius: 3px;
  transition: background 0.3s, box-shadow 0.3s;
}
.inet-node.online {
  background: #00ff88;
  box-shadow: 0 0 4px rgba(0,255,136,0.6);
}
.inet-node.offline {
  background: #ff4757;
  box-shadow: 0 0 4px rgba(255,71,87,0.4);
  animation: node-die 0.3s ease-out forwards;
}
@keyframes node-die {
  0% { background:#ff4757; box-shadow: 0 0 8px rgba(255,71,87,0.8); }
  50% { background:#ff6b35; }
  100% { background:#1a0a0a; box-shadow:none; }
}
.inet-center-panel {
  position: relative; z-index: 2;
  background: rgba(10,14,26,0.95);
  border: 1px solid rgba(255,71,87,0.35);
  border-radius: 14px; padding: 28px 36px;
  min-width: 480px; text-align: center;
  box-shadow: 0 0 60px rgba(255,71,87,0.2), 0 8px 32px rgba(0,0,0,0.8);
}
.inet-error-icon { font-size: 48px; margin-bottom: 8px; filter: grayscale(1) opacity(0.5); }
.inet-error-title {
  font-size: 28px; font-weight: 900; color: #ff4757; letter-spacing: 2px;
  text-shadow: 0 0 20px rgba(255,71,87,0.6);
  font-family: 'Consolas', monospace;
  margin-bottom: 8px;
}
.inet-error-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.6; }
.inet-stats { display: flex; gap: 24px; justify-content: center; margin-bottom: 18px; }
.inet-stat { display: flex; flex-direction: column; gap: 3px; align-items: center; }
.inet-stat-val {
  font-size: 22px; font-weight: 700; color: #ff4757;
  font-family: 'Consolas', monospace;
  min-width: 80px; text-align: center;
}
.inet-stat-lbl { font-size: 9px; color: var(--text-dim); letter-spacing: 1px; text-transform: uppercase; }
.inet-progress-wrap { margin-bottom: 16px; }
.inet-progress-label { font-size: 10px; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 6px; }
.inet-progress-bar { background: rgba(255,71,87,0.1); border: 1px solid rgba(255,71,87,0.2); border-radius: 4px; height: 8px; overflow: hidden; }
.inet-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #ff4757, #ff6b35);
  border-radius: 4px;
  transition: width 0.18s ease;
  box-shadow: 0 0 8px rgba(255,71,87,0.5);
}
.inet-log {
  background: rgba(0,0,0,0.5); border: 1px solid rgba(255,71,87,0.15);
  border-radius: 6px; padding: 10px 12px; height: 110px; overflow-y: auto;
  font-family: 'Consolas', monospace; font-size: 11px; text-align: left;
}
.inet-log-line { color: #ff6b35; margin-bottom: 3px; animation: log-appear 0.2s ease-out; }
@keyframes log-appear { from { opacity:0; transform:translateX(-8px); } to { opacity:1; transform:none; } }

/* ════════════════════════════════════ NUCLEAR MELTDOWN EFFECT */
.effect-overlay.nuke-meltdown {
  background: radial-gradient(ellipse at center, rgba(30,12,0,0.98) 0%, rgba(4,6,2,0.99) 100%);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; overflow: hidden;
}
/* Expanding radiation rings */
.melt-radiation-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(255,160,0,0.4);
  animation: melt-ring-expand 3s ease-out infinite;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
}
#melt-ring1 { animation-delay: 0s;    width: 100px; height: 100px; }
#melt-ring2 { animation-delay: 1s;    width: 100px; height: 100px; border-color: rgba(255,80,0,0.3); }
#melt-ring3 { animation-delay: 2s;    width: 100px; height: 100px; border-color: rgba(200,255,0,0.2); }
@keyframes melt-ring-expand {
  0%   { width:100px; height:100px; opacity:0.8; border-width:3px; }
  100% { width:900px; height:900px; opacity:0;   border-width:1px; }
}
/* Floating radioactive particles */
.melt-particles { position: absolute; inset: 0; pointer-events: none; }
.melt-particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, #aaff00, #ff8800);
  animation: melt-float linear infinite;
  box-shadow: 0 0 6px rgba(170,255,0,0.8);
}
@keyframes melt-float {
  0%   { transform: translateY(0)   rotate(0deg) scale(1);   opacity: 0.8; }
  50%  { transform: translateY(-60px) rotate(180deg) scale(1.3); opacity: 1; }
  100% { transform: translateY(-120px) rotate(360deg) scale(0.5); opacity: 0; }
}
/* Center panel */
.melt-center-panel {
  position: relative; z-index: 2;
  background: rgba(8,5,0,0.95);
  border: 2px solid rgba(255,120,0,0.5);
  border-radius: 14px; padding: 26px 36px;
  min-width: 500px; text-align: center;
  box-shadow: 0 0 80px rgba(255,100,0,0.35), 0 0 160px rgba(255,60,0,0.15), inset 0 0 40px rgba(255,80,0,0.05);
}
.melt-symbol {
  font-size: 64px; margin-bottom: 6px;
  animation: melt-symbol-spin 4s linear infinite;
  display: inline-block;
  filter: drop-shadow(0 0 20px rgba(255,140,0,0.9));
  color: #ff8800;
}
@keyframes melt-symbol-spin {
  0%,100% { transform: rotate(0deg) scale(1);   filter: drop-shadow(0 0 20px rgba(255,140,0,0.9)); }
  25%      { transform: rotate(5deg) scale(1.05); filter: drop-shadow(0 0 30px rgba(255,60,0,1)); }
  50%      { transform: rotate(0deg) scale(1.1);  filter: drop-shadow(0 0 40px rgba(200,255,0,0.8)); }
  75%      { transform: rotate(-5deg) scale(1.05);filter: drop-shadow(0 0 30px rgba(255,60,0,1)); }
}
.melt-title {
  font-size: 30px; font-weight: 900; letter-spacing: 4px; text-transform: uppercase;
  color: #ff6600; text-shadow: 0 0 24px rgba(255,100,0,0.9);
  animation: melt-title-flicker 0.5s ease-in-out infinite alternate;
  margin-bottom: 4px;
}
@keyframes melt-title-flicker {
  0%   { opacity:1; text-shadow: 0 0 24px rgba(255,100,0,0.9); }
  100% { opacity:0.85; text-shadow: 0 0 40px rgba(255,200,0,1); }
}
.melt-plant { font-size: 13px; color: rgba(255,200,100,0.7); letter-spacing: 1px; margin-bottom: 20px; }
/* Gauges */
.melt-gauges { display: flex; gap: 16px; margin-bottom: 16px; }
.melt-gauge { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.melt-gauge-label { font-size: 9px; color: rgba(255,255,255,0.4); letter-spacing: 1.5px; text-transform: uppercase; }
.melt-gauge-bar {
  height: 10px; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,100,0,0.2); border-radius: 3px; overflow: hidden;
}
.melt-gauge-fill { height: 100%; width: 0%; border-radius: 3px; transition: width 0.15s ease; }
.melt-gauge-fill.temp    { background: linear-gradient(90deg, #ff4400, #ff8800, #ffcc00); box-shadow: 0 0 8px rgba(255,100,0,0.6); }
.melt-gauge-fill.contain { background: linear-gradient(90deg, #00ff88, #88ff00); box-shadow: 0 0 8px rgba(0,255,136,0.5); }
.melt-gauge-fill.rad     { background: linear-gradient(90deg, #aaff00, #ffff00, #ff8800); box-shadow: 0 0 8px rgba(170,255,0,0.6); }
.melt-gauge-val { font-size: 11px; font-family: 'Consolas', monospace; color: #ff8800; font-weight: 700; }
/* Status */
.melt-status {
  font-size: 14px; font-weight: 700; letter-spacing: 1px;
  color: #ffcc00; margin-bottom: 12px;
  animation: melt-status-pulse 0.8s ease-in-out infinite alternate;
}
@keyframes melt-status-pulse { 0% { opacity:1; } 100% { opacity:0.6; } }
/* Log */
.melt-log {
  background: rgba(0,0,0,0.6); border: 1px solid rgba(255,100,0,0.2);
  border-radius: 6px; padding: 10px 12px; height: 100px; overflow-y: auto;
  font-family: 'Consolas', monospace; font-size: 11px; text-align: left;
}
.melt-log-line { color: #ff8844; margin-bottom: 3px; animation: log-appear 0.2s ease-out; }

/* ════════════════════════════════════ CASINO */
.cas-nav {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-bottom: 1px solid rgba(180,140,0,0.25);
  background: linear-gradient(90deg, #0d0a00, #1a1200, #0d0a00);
  flex-shrink: 0;
}
.cas-nav-btn {
  background: rgba(255,215,0,0.07); border: 1px solid rgba(180,140,0,0.25);
  color: rgba(255,215,0,0.7); font-size: 12px; font-weight: 600;
  padding: 6px 14px; border-radius: 6px; cursor: pointer;
  transition: all 0.15s; font-family: 'Segoe UI', sans-serif;
}
.cas-nav-btn:hover { background: rgba(255,215,0,0.15); color: #ffd700; }
.cas-nav-btn.active { background: rgba(255,215,0,0.2); border-color: rgba(255,215,0,0.6); color: #ffd700; box-shadow: 0 0 10px rgba(255,215,0,0.2); }
.cas-balance-display { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; }
.cas-bal-label { font-size: 9px; color: rgba(255,215,0,0.5); letter-spacing: 1.5px; text-transform: uppercase; }
.cas-bal-val { font-size: 16px; font-weight: 700; color: #00ff88; font-family: 'Consolas', monospace; }
.cas-game-area { flex: 1; overflow: auto; display: flex; align-items: flex-start; justify-content: center; padding: 14px; }

/* ── Shared canvas ── */
.cas-canvas { display: block; border-radius: 10px; box-shadow: 0 8px 32px rgba(0,0,0,0.8), 0 0 0 1px rgba(180,140,0,0.25); }
.cas-canvas-wide { max-width: 100%; }

/* ── Slots layout ── */
.cas-slots-wrap { display: flex; gap: 16px; align-items: flex-start; }
.cas-slots-controls { display: flex; flex-direction: column; gap: 10px; min-width: 140px; }

/* ── Blackjack layout ── */
.cas-bj-wrap { display: flex; gap: 16px; align-items: flex-start; }
.cas-bj-controls { display: flex; flex-direction: column; gap: 10px; min-width: 140px; }
.cas-bj-actions { display: flex; flex-direction: column; gap: 7px; }
.cas-bj-hint { font-size: 11px; color: rgba(255,215,0,0.5); text-align: center; margin-top: 4px; }

/* ── Roulette layout ── */
.cas-roulette-wrap { display: flex; gap: 0; flex-direction: column; align-items: center; }
.cas-roulette-controls { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; justify-content: center; }
.cas-roulette-actions { display: flex; gap: 8px; }

/* ── Controls ── */
.cas-bet-row {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,215,0,0.05); border: 1px solid rgba(180,140,0,0.2);
  border-radius: 8px; padding: 7px 10px;
}
.cas-ctrl-label { font-size: 9px; color: rgba(255,215,0,0.5); letter-spacing: 1.5px; text-transform: uppercase; flex-shrink: 0; }
.cas-bet-btn {
  width: 26px; height: 26px; background: rgba(255,215,0,0.1);
  border: 1px solid rgba(180,140,0,0.3); color: #ffd700; font-size: 16px;
  border-radius: 5px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.cas-bet-btn:hover { background: rgba(255,215,0,0.25); }
.cas-bet-val { font-size: 13px; font-weight: 700; color: #ffd700; font-family: 'Consolas', monospace; flex: 1; text-align: center; }

.cas-spin-btn {
  background: linear-gradient(135deg, #7a5500, #c8960a, #7a5500);
  border: 1px solid #c8960a; color: #fff;
  font-size: 15px; font-weight: 700; padding: 11px 0; border-radius: 8px;
  cursor: pointer; width: 100%; letter-spacing: 1px;
  box-shadow: 0 4px 16px rgba(180,140,0,0.3);
  transition: all 0.15s; font-family: 'Segoe UI', sans-serif;
}
.cas-spin-btn:hover { background: linear-gradient(135deg, #9a6f00, #e0a80a, #9a6f00); box-shadow: 0 4px 24px rgba(180,140,0,0.5); transform: translateY(-1px); }
.cas-spin-btn:active { transform: translateY(1px); }

.cas-action-btn {
  background: rgba(0,120,212,0.2); border: 1px solid rgba(0,120,212,0.35);
  color: #7eb8f7; font-size: 13px; font-weight: 700;
  padding: 10px 0; border-radius: 7px; cursor: pointer; text-align: center;
  transition: all 0.13s; font-family: 'Segoe UI', sans-serif;
}
.cas-action-btn:hover { background: rgba(0,120,212,0.4); }
.cas-action-btn.hit  { background: rgba(0,200,80,0.15); border-color: rgba(0,200,80,0.35); color: #00e060; }
.cas-action-btn.hit:hover { background: rgba(0,200,80,0.3); }
.cas-action-btn.stand  { background: rgba(255,71,87,0.15); border-color: rgba(255,71,87,0.35); color: #ff8070; }
.cas-action-btn.stand:hover { background: rgba(255,71,87,0.3); }
.cas-action-btn.double { background: rgba(255,140,0,0.15); border-color: rgba(255,140,0,0.35); color: #ff9f43; }
.cas-action-btn.double:hover { background: rgba(255,140,0,0.3); }

.cas-small-btn {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted); font-size: 10px; padding: 5px 10px; border-radius: 5px; cursor: pointer;
}
.cas-small-btn:hover { background: rgba(255,255,255,0.12); color: var(--text-main); }

/* Paytable */
.cas-paytable { background: rgba(0,0,0,0.5); border: 1px solid rgba(180,140,0,0.2); border-radius: 7px; padding: 8px; margin-top: 4px; }
.cas-paytable.hidden { display: none; }
.cas-pt-row { display: flex; justify-content: space-between; font-size: 10px; color: rgba(255,215,0,0.7); padding: 2px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.cas-paytable-toggle { text-align: center; }

/* ARIA typing indicator */
.aria-typing { display: flex; gap: 4px; align-items: center; padding: 4px 0; }
.aria-typing span { width: 6px; height: 6px; background: var(--accent2); border-radius: 50%; animation: typing-dot 1.4s ease-in-out infinite; }
.aria-typing span:nth-child(2) { animation-delay: 0.2s; }
.aria-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-dot { 0%,80%,100% { transform: scale(0.7); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }

/* Progress bar */
.progress-bar { background: rgba(255,255,255,0.06); border-radius: 4px; height: 4px; overflow: hidden; margin-top: 4px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent2), var(--terminal-cyan)); border-radius: 4px; transition: width 0.5s ease; }

/* Grid hack animation on map */
.grid-line { stroke: rgba(0,255,136,0.15); stroke-width: 0.5; }
.grid-dot { fill: rgba(0,255,136,0.4); }
