/* =========================================================
   DAY TRADING SIMULATOR - PRO TRADER TERMINAL STYLESHEET
   Matching Desktop Terminal Design & 1v1 Online PvP Battle
   ========================================================= */

:root {
    --bg-dark: #0e1117;
    --bg-panel: #161a25;
    --bg-chart: #131722;
    --border-color: #222631;
    --border-light: #2a2e39;
    --accent-blue: #2962ff;
    --accent-hover: #3d72ff;
    --green: #089981;
    --green-bg: rgba(8, 153, 129, 0.15);
    --green-hover: #0bb196;
    --red: #f23645;
    --red-bg: rgba(242, 54, 69, 0.15);
    --red-hover: #ff4957;
    --gold: #f5c518;
    --gold-bg: rgba(245, 197, 24, 0.15);
    --text-white: #ffffff;
    --text-main: #d1d4dc;
    --text-muted: #848e9c;
    --text-dim: #50535e;
    --font-sans: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    --font-hud: 'Rajdhani', 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
}

body.theme-cyberpunk {
    --bg-dark: #090514;
    --bg-panel: #110b24;
    --bg-chart: #0d071c;
    --border-color: #2b1845;
    --border-light: #482173;
    --accent-blue: #c026d3;
    --accent-hover: #d946ef;
    --green: #00f0ff;
    --green-bg: rgba(0, 240, 255, 0.15);
    --green-hover: #33f3ff;
    --red: #ff007f;
    --red-bg: rgba(255, 0, 127, 0.15);
    --red-hover: #ff3399;
    --gold: #ff00ea;
    --gold-bg: rgba(255, 0, 234, 0.15);
}

body.theme-gold-vip {
    --bg-dark: #0d0c07;
    --bg-panel: #18150c;
    --bg-chart: #131109;
    --border-color: #3b3216;
    --border-light: #594c22;
    --accent-blue: #ffd700;
    --accent-hover: #ffe44d;
    --gold: #ffd700;
    --gold-bg: rgba(255, 215, 0, 0.18);
    --text-white: #fffdf5;
}

.whale-badge {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 4px;
    margin-left: 6px;
    letter-spacing: 0.5px;
    box-shadow: 0 0 8px rgba(2, 132, 199, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: inline-block;
    vertical-align: middle;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 13px;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-dim);
}

/* Utilities */
.up { color: var(--green) !important; }
.down { color: var(--red) !important; }
.gold { color: var(--gold) !important; }
.badge-up {
    background: var(--green-bg);
    color: var(--green);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}
.badge-down {
    background: var(--red-bg);
    color: var(--red);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* Flash Animations on Price Update */
@keyframes flashGreen {
    0% { background-color: rgba(8, 153, 129, 0.4); }
    100% { background-color: transparent; }
}
@keyframes flashRed {
    0% { background-color: rgba(242, 54, 69, 0.4); }
    100% { background-color: transparent; }
}
.flash-up { animation: flashGreen 0.6s ease-out; }
.flash-down { animation: flashRed 0.6s ease-out; }

/* =========================================================
   TOP HEADER (Solo Sandbox Mode)
   ========================================================= */
#top-header {
    min-height: 52px;
    height: auto;
    flex-shrink: 0;
    width: 100%;
    background: #12151e;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 4px 10px;
    gap: 6px 8px;
    z-index: 10;
    user-select: none;
    overflow: visible;
}
#top-header::-webkit-scrollbar {
    display: none;
}

.header-left {
    display: flex;
    align-items: center;
    flex-shrink: 1;
    min-width: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 800;
    font-size: 14px;
    color: var(--text-white);
    letter-spacing: 0.4px;
    flex-shrink: 0;
}
.brand-name {
    color: var(--text-white);
    font-weight: 800;
}
.brand span {
    color: var(--accent-blue);
}

.header-v-divider {
    width: 1px;
    height: 22px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 8px;
    flex-shrink: 0;
}

.header-metrics {
    display: flex;
    align-items: center;
    gap: 11px;
    background: rgba(22, 26, 37, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 4px 10px;
    border-radius: 8px;
    flex-shrink: 1;
    min-width: 0;
}

.metric-pill {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
}
.metric-pill .label {
    font-size: 8.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.4px;
    line-height: 1.1;
    margin-bottom: 2px;
}
.metric-pill .value {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1.2;
}
.metric-pill.hero-metric .value {
    font-size: 13.5px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.2px;
}
.metric-pill .value.up {
    color: #00e676;
}
.metric-pill .value.down {
    color: #ff5252;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    margin-left: auto;
}

.ctrl-group {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: rgba(22, 26, 37, 0.6);
    padding: 2px 3px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

select.speed-select {
    background: #181d2a;
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.08);
    height: 28px;
    padding: 0 6px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    white-space: nowrap;
    transition: all 0.15s ease;
}
select.speed-select:hover, select.speed-select:focus {
    border-color: var(--accent-blue);
    background: #1f2536;
}
select.speed-select option {
    background: #161a25;
    color: #ffffff;
}

button.btn-ctrl, a.btn-ctrl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 30px;
    padding: 0 8px;
    background: #1a1f2c;
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    box-sizing: border-box;
    position: relative;
}
button.btn-ctrl:hover, a.btn-ctrl:hover {
    background: #252d40;
    border-color: rgba(56, 189, 248, 0.4);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

/* Custom Vector SVG Icon Buttons with Hover-Expand Label & Floating Tooltip */
.btn-icon-nav {
    padding: 0 8px;
    min-width: 32px;
    gap: 0;
}

.nav-svg-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.18s ease, filter 0.18s ease;
}

.btn-icon-nav:hover .nav-svg-icon {
    transform: scale(1.1);
}

/* Semantic Color Accents for Custom SVG Icons so each button is immediately recognizable */
.btn-icon-nav.icon-gold .nav-svg-icon {
    color: #fbbf24;
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.35));
}
.btn-icon-nav.icon-cyan .nav-svg-icon {
    color: #38bdf8;
    filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.35));
}
.btn-icon-nav.icon-violet .nav-svg-icon {
    color: #a78bfa;
    filter: drop-shadow(0 0 4px rgba(167, 139, 250, 0.35));
}
.btn-icon-nav.icon-amber .nav-svg-icon {
    color: #f5c518;
    filter: drop-shadow(0 0 4px rgba(245, 197, 24, 0.4));
}
.btn-icon-nav.icon-slate .nav-svg-icon {
    color: #94a3b8;
}
.btn-icon-nav.icon-blue .nav-svg-icon {
    color: #60a5fa;
    filter: drop-shadow(0 0 4px rgba(96, 165, 250, 0.35));
}
.btn-icon-nav.icon-emerald .nav-svg-icon {
    color: #34d399;
    filter: drop-shadow(0 0 4px rgba(52, 211, 153, 0.35));
}

/* Inline label expands smoothly when hovered over */
.nav-btn-label {
    display: inline-block;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    margin-left: 0;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #f8fafc;
    transition: max-width 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.18s ease,
                margin-left 0.18s ease;
}

.btn-icon-nav:hover .nav-btn-label,
.btn-icon-nav:focus-visible .nav-btn-label {
    max-width: 84px;
    opacity: 1;
    margin-left: 6px;
}

/* Floating High-Contrast Tooltip Pill on Hover */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 7px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    background: rgba(11, 15, 25, 0.96);
    color: #f8fafc;
    border: 1px solid rgba(56, 189, 248, 0.45);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65), 0 0 10px rgba(56, 189, 248, 0.15);
    padding: 4px 9px;
    border-radius: 5px;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
    z-index: 9999;
}

[data-tooltip].tooltip-right::after {
    left: auto;
    right: 0;
    transform: translateX(0) translateY(-4px);
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

[data-tooltip].tooltip-right:hover::after,
[data-tooltip].tooltip-right:focus-visible::after {
    transform: translateX(0) translateY(0);
}

button.btn-ctrl.btn-shop {
    color: var(--gold) !important;
    font-weight: 700;
}
button.btn-ctrl.btn-shop:hover {
    background: rgba(255, 215, 0, 0.12) !important;
    border-color: rgba(255, 215, 0, 0.35) !important;
    color: #ffd700 !important;
}

button.btn-duel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 30px;
    padding: 0 11px;
    background: linear-gradient(135deg, #e53935, #c2185b);
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.35);
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: relative;
}
button.btn-duel:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.5);
}

@media (max-width: 1280px) {
    .header-metrics {
        gap: 8px;
        padding: 4px 8px;
    }
}

@media (max-width: 1040px) {
    #top-header {
        padding: 6px 10px;
    }
    .header-controls {
        width: 100%;
        justify-content: flex-end;
    }
}

/* =========================================================
   TOP BATTLE HUD (1v1 Online PvP Mode)
   ========================================================= */
#battle-hud {
    min-height: 68px;
    height: auto;
    background: var(--bg-chart);
    border-bottom: 2px solid #2a2e39;
    display: none; /* activated in online mode */
    align-items: center;
    justify-content: space-between;
    padding: 6px 20px;
    gap: 14px;
    z-index: 10;
}

.player-box {
    display: flex;
    flex-direction: column;
    min-width: 180px;
}
.player-box .p-tag {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.player-box.you .p-tag { color: var(--accent-blue); }
.player-box.opponent .p-tag { color: #f57c00; }
.player-box .p-score {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 800;
    color: var(--text-white);
}

.hud-live-metrics {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 3px;
    padding-top: 3px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hud-metric-pill {
    display: flex;
    align-items: baseline;
    gap: 5px;
    white-space: nowrap;
}

.hud-metric-pill .label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.hud-metric-pill .value {
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 800;
    color: var(--text-white);
}

.hud-metric-pill .value.up {
    color: #00e676;
}

.hud-metric-pill .value.down {
    color: #ff5252;
}

.hud-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.hud-leader-badge {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--gold);
    background: var(--gold-bg);
    padding: 3px 12px;
    border-radius: 12px;
    border: 1px solid rgba(245, 197, 24, 0.3);
    text-transform: uppercase;
}
.hud-timer-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
}
.hud-timer {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 800;
    color: var(--text-white);
}

.hud-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
button.btn-next-opp {
    background: #d83a56;
    color: var(--text-white);
    border: none;
    padding: 8px 14px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}
button.btn-next-opp:hover {
    background: #ff4d6d;
}
button.btn-leave {
    background: var(--border-color);
    color: var(--text-muted);
    border: 1px solid var(--border-light);
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}
button.btn-leave:hover {
    color: var(--text-white);
    background: var(--border-light);
}

/* =========================================================
   MAIN 3-COLUMN LAYOUT
   ========================================================= */
#main-layout {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* --- Left Column: Market Scanner --- */
#left-panel {
    width: 290px;
    background: var(--bg-panel);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.scanner-header {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-dark);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 4px 8px;
}
.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-white);
    font-size: 12px;
    width: 100%;
}

.sector-scroll {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
}
.sector-scroll::-webkit-scrollbar {
    height: 3px;
}
.sector-pill {
    white-space: nowrap;
    font-size: 11px;
    padding: 3px 8px;
    background: var(--bg-dark);
    color: var(--text-muted);
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid transparent;
}
.sector-pill.active {
    background: var(--accent-blue);
    color: var(--text-white);
    font-weight: 700;
}

.stock-list {
    flex: 1;
    overflow-y: auto;
}
.stock-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: background 0.1s ease;
}
.stock-row:hover {
    background: rgba(255, 255, 255, 0.04);
}
.stock-row.active {
    background: rgba(41, 98, 255, 0.15);
    border-left: 3px solid var(--accent-blue);
}
.stock-info {
    display: flex;
    flex-direction: column;
}
.stock-info .sym {
    font-weight: 700;
    color: var(--text-white);
}
.stock-info .sub {
    font-size: 11px;
    color: var(--text-muted);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.stock-prices {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.stock-prices .cur-p {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text-white);
}
.stock-prices .pct {
    font-family: var(--font-mono);
    font-size: 11px;
}

/* --- Center Column: Chart & Active Stock --- */
#center-panel {
    flex: 1;
    background: var(--bg-chart);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chart-header {
    height: 48px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}
.ticker-title-cluster {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.active-ticker {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-white);
}
.active-name {
    font-size: 13px;
    color: var(--text-muted);
}
.active-sector-tag {
    font-size: 11px;
    background: var(--border-color);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--text-main);
}
.ticker-price-cluster {
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.active-price {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 800;
    color: var(--text-white);
}
.active-chg {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
}

.chart-canvas-container {
    flex: 1;
    position: relative;
    min-height: 250px;
}
#chart-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

/* --- Right Column: Execution Desk --- */
#right-panel {
    width: 300px;
    background: var(--bg-panel);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 16px;
    overflow-y: auto;
}

.panel-sec-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* Trade Buttons */
.order-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
button.btn-trade {
    border: none;
    border-radius: 4px;
    padding: 12px;
    font-size: 13px;
    font-weight: 800;
    color: var(--text-white);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: all 0.1s ease;
}
button.btn-trade small {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.8;
}
button.btn-buy { background: var(--green); }
button.btn-buy:hover { background: var(--green-hover); transform: translateY(-1px); }
button.btn-sell { background: #c2185b; }
button.btn-sell:hover { background: #d81b60; transform: translateY(-1px); }
button.btn-short { background: var(--red); }
button.btn-short:hover { background: var(--red-hover); transform: translateY(-1px); }
button.btn-cover { background: #3949ab; }
button.btn-cover:hover { background: #5c6bc0; transform: translateY(-1px); }

/* Quantity Presets & Input */
.qty-cluster {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.qty-presets {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
}
.btn-qty {
    background: var(--bg-dark);
    color: var(--text-main);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 6px 0;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}
.btn-qty:hover, .btn-qty.active {
    background: var(--accent-blue);
    color: var(--text-white);
    border-color: var(--accent-blue);
}

.qty-input-row {
    display: flex;
    align-items: center;
    background: var(--bg-dark);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    overflow: hidden;
}
.qty-btn-step {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 800;
    width: 36px;
    height: 36px;
    cursor: pointer;
}
.qty-btn-step:hover {
    color: var(--text-white);
    background: var(--border-color);
}
.qty-input-row input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-white);
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 700;
    text-align: center;
}

.order-est {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* Active Position Details Box */
.position-card {
    background: var(--bg-dark);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pos-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}
.pos-row .label { color: var(--text-muted); }
.pos-row .val { font-family: var(--font-mono); font-weight: 700; color: var(--text-white); }

button.btn-reverse {
    background: #6a1b9a;
    color: var(--text-white);
    border: none;
    border-radius: 4px;
    padding: 10px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.15s ease;
}
button.btn-reverse:hover {
    background: #8e24aa;
}

button.btn-flatten {
    background: #d32f2f;
    color: var(--text-white);
    border: none;
    border-radius: 4px;
    padding: 10px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.15s ease;
}
button.btn-flatten:hover {
    background: #f44336;
}

/* Hotkey guide */
.hotkeys-guide {
    margin-top: auto;
    font-size: 10px;
    color: var(--text-dim);
    line-height: 1.5;
}
.hotkeys-guide kbd {
    background: var(--bg-dark);
    border: 1px solid var(--border-light);
    border-radius: 3px;
    padding: 1px 4px;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

/* =========================================================
   BOTTOM RESIZER & BOTTOM TABS (Positions, Orders, News)
   ========================================================= */
.bottom-resizer {
    height: 7px;
    background: var(--bg-dark);
    border-top: 1px solid var(--border-color);
    cursor: row-resize;
    cursor: ns-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 20;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease, height 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
}

/* Invisible hit area expansion for effortless grabbing */
.bottom-resizer::before {
    content: "";
    position: absolute;
    top: -5px;
    bottom: -5px;
    left: 0;
    right: 0;
    z-index: 1;
}

.bottom-resizer:hover,
.bottom-resizer.is-dragging {
    background: #171b26;
    border-color: var(--accent-blue);
}

.resizer-handle-grip {
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    position: relative;
    z-index: 2;
}

.grip-line {
    width: 38px;
    height: 3px;
    background: var(--border-light);
    border-radius: 2px;
    transition: background 0.15s ease, width 0.15s ease;
}

.bottom-resizer:hover .grip-line,
.bottom-resizer.is-dragging .grip-line {
    background: var(--accent-blue);
    width: 48px;
    box-shadow: 0 0 8px rgba(41, 98, 255, 0.7);
}

/* Collapsed banner state */
.resizer-collapsed-banner {
    display: none;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 100%;
    padding: 0 16px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.bottom-resizer.is-collapsed {
    height: 30px;
    background: var(--bg-panel);
    border-top: 1px solid var(--border-light);
    cursor: pointer;
}

.bottom-resizer.is-collapsed:hover {
    background: #1a2030;
    border-color: var(--accent-blue);
}

.bottom-resizer.is-collapsed .resizer-handle-grip {
    display: none;
}

.bottom-resizer.is-collapsed .resizer-collapsed-banner {
    display: flex;
}

.resizer-collapsed-icon {
    color: var(--accent-blue);
    font-size: 11px;
    animation: bounceCollapsed 2s infinite ease-in-out;
}

@keyframes bounceCollapsed {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

.resizer-collapsed-title {
    color: var(--text-white);
    font-weight: 700;
    letter-spacing: 0.3px;
}

.resizer-collapsed-hint {
    color: var(--text-dim);
    font-size: 11px;
}

.resizer-btn-reset {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.resizer-btn-reset:hover {
    color: var(--text-white);
    border-color: var(--accent-blue);
    background: rgba(41, 98, 255, 0.18);
}

/* Bottom Panel styling */
#bottom-panel {
    height: 210px;
    background: var(--bg-panel);
    border-top: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

#bottom-panel.transitioning {
    transition: height 0.2s cubic-bezier(0.2, 0, 0, 1);
}

#bottom-panel.is-collapsed {
    height: 0 !important;
    min-height: 0 !important;
    border: none !important;
}

/* Body state when actively dragging the resizer */
body.resizing-bottom-panel {
    cursor: row-resize !important;
    cursor: ns-resize !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

body.resizing-bottom-panel * {
    user-select: none !important;
    -webkit-user-select: none !important;
}

.tab-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    padding: 0 12px 0 16px;
    gap: 4px;
    min-height: 35px;
    flex-shrink: 0;
}

.tab-nav-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tab-nav-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tab-action-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tab-action-btn:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-light);
}

.tab-action-btn:active {
    transform: scale(0.96);
}
.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}
.tab-btn.active {
    color: var(--text-white);
    border-bottom-color: var(--accent-blue);
}

.tab-content {
    flex: 1;
    overflow-y: auto;
    display: none;
}
.tab-content.active {
    display: block;
}

/* Tables */
table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
table.data-table th {
    position: sticky;
    top: 0;
    background: var(--bg-panel);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border-color);
}
table.data-table td {
    padding: 8px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-family: var(--font-mono);
}
table.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

/* News List */
.news-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 12px;
}
.news-time {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 11px;
}
.news-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}
.news-badge.breaking { background: #d32f2f; color: #fff; }
.news-badge.major { background: #1976d2; color: #fff; }
.news-badge.rumor { background: #f57c00; color: #fff; }
.news-headline {
    flex: 1;
    color: var(--text-white);
}

/* =========================================================
   MODAL OVERLAYS (Launcher, Matchmaking, Match End)
   ========================================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(14, 17, 23, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 500px;
    width: 90%;
}

.modal-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 6px;
}
.modal-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.nickname-input {
    background: var(--bg-dark);
    border: 1px solid var(--border-light);
    color: var(--text-white);
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    width: 100%;
    margin-bottom: 20px;
    text-align: center;
}

.mode-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    width: 100%;
    margin-bottom: 20px;
}
.mode-card {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.mode-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(41, 98, 255, 0.2);
}
.mode-card .icon { font-size: 28px; }
.mode-card .title { font-size: 14px; font-weight: 800; color: var(--text-white); }
.mode-card .desc { font-size: 11px; color: var(--text-muted); }

/* Radar Animation for Matchmaking */
.radar-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 20px 0;
}
.radar-circle {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(41, 98, 255, 0.4);
}
.radar-sweep {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(41, 98, 255, 0.6) 0deg, transparent 60deg);
    animation: radarSpin 1.6s linear infinite;
}
@keyframes radarSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.status-txt {
    font-size: 13px;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 16px;
}

/* =========================================================
   V1.4 SHOP & MENU VAULT STYLES
   ========================================================= */
.btn-bank-profit {
    background: #00c853 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 0 10px rgba(0, 200, 83, 0.4);
    transition: all 0.2s ease;
}
.btn-bank-profit:hover:not(:disabled) {
    background: #00e676 !important;
    transform: translateY(-1px);
}
.btn-bank-profit:disabled {
    display: none !important;
}

.menu-vault-pill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #161a25;
    border: 1px solid #2a2e39;
    border-radius: 8px;
    padding: 10px 16px;
    margin: 12px 0 16px;
    width: 100%;
}
.btn-shop-badge {
    background: var(--accent-blue);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
}
.btn-shop-badge:hover {
    background: var(--accent-hover);
}

#modal-shop {
    z-index: 200;
}

.shop-modal-card {
    max-width: 800px;
    width: 90vw;
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #222631;
    padding-bottom: 14px;
    margin-bottom: 14px;
}
.shop-vault-box {
    background: rgba(0, 230, 118, 0.1);
    border: 1px solid rgba(0, 230, 118, 0.3);
    border-radius: 6px;
    padding: 8px 16px;
    text-align: right;
    display: flex;
    flex-direction: column;
}
.shop-vault-box .label {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted);
}
.shop-vault-box .value {
    font-size: 16px;
    font-weight: 800;
}

.shop-category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 14px;
    padding-bottom: 4px;
}
.shop-tab-btn {
    background: #161a25;
    border: 1px solid #2a2e39;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}
.shop-tab-btn.active {
    background: var(--accent-blue);
    color: #ffffff;
    border-color: var(--accent-blue);
}

.shop-items-list {
    overflow-y: auto;
    max-height: 50vh;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 6px;
}
.shop-item-card {
    background: #161a25;
    border: 1px solid #222631;
    border-radius: 8px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.shop-item-card:hover {
    border-color: #2a2e39;
}
.shop-item-icon {
    font-size: 32px;
    line-height: 1;
}
.shop-item-info {
    flex: 1;
    text-align: left;
}
.shop-item-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 2px;
}
.shop-item-category {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent-blue);
    text-transform: uppercase;
    margin-bottom: 4px;
}
.shop-item-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}
.shop-item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.btn-shop-preview {
    background: #222631;
    color: var(--text-main);
    border: 1px solid #2a2e39;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-shop-preview:hover {
    background: #2a2e39;
    color: #ffffff;
}
.btn-shop-buy {
    background: #00c853;
    color: #ffffff;
    border: none;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-shop-buy:hover {
    background: #00e676;
}
.btn-shop-equip {
    background: var(--accent-blue);
    color: #ffffff;
    border: none;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
}
.btn-shop-equip:hover {
    background: var(--accent-hover);
}
.shop-badge-equipped {
    background: rgba(0, 230, 118, 0.15);
    color: #00e676;
    border: 1px solid rgba(0, 230, 118, 0.4);
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 4px;
}
.shop-btn-locked {
    background: #222631;
    color: #787b86;
    border: 1px solid #2a2e39;
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: not-allowed;
}

/* =========================================================
   SETTINGS MODAL & TEMPERATURE CONTROLS (UPGRADED THEME)
   ========================================================= */
.settings-modal-card {
    max-width: 680px !important;
    width: 94vw !important;
    max-height: min(90vh, 760px);
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    background: linear-gradient(165deg, rgba(16, 22, 35, 0.98) 0%, rgba(9, 12, 19, 0.99) 100%) !important;
    border: 1px solid rgba(56, 189, 248, 0.22) !important;
    border-radius: 14px !important;
    box-shadow: 0 28px 75px rgba(0, 0, 0, 0.9), 0 0 40px rgba(56, 189, 248, 0.08) !important;
    overflow: hidden;
    text-align: left !important;
    align-items: stretch !important;
}

/* Modal Header */
.settings-modal-header {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 22px 14px 22px;
    background: rgba(14, 19, 31, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

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

.settings-icon-badge {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(41, 98, 255, 0.2) 0%, rgba(56, 189, 248, 0.1) 100%);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.15);
    flex-shrink: 0;
}

.settings-eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.settings-badge-pill {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 2px 7px;
    border-radius: 10px;
    text-transform: uppercase;
}

.settings-engine-ver {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.settings-modal-title {
    font-size: 19px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    margin: 0 !important;
    letter-spacing: 0.3px;
}

.settings-modal-sub {
    font-size: 11px !important;
    color: var(--text-muted) !important;
    margin: 2px 0 0 0 !important;
    line-height: 1.35;
}

.settings-close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.settings-close-btn:hover {
    background: rgba(242, 54, 69, 0.15);
    border-color: rgba(242, 54, 69, 0.4);
    color: #ff5252;
}

/* Nav Tabs */
.settings-nav-tabs {
    flex-shrink: 0;
    display: flex;
    background: #0b0f18;
    padding: 8px 18px 0 18px;
    gap: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.settings-tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    border-radius: 6px 6px 0 0;
}

.settings-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
}

.settings-tab-btn.active {
    color: #38bdf8;
    border-bottom-color: #38bdf8;
    background: rgba(56, 189, 248, 0.08);
}

.settings-tab-icon {
    font-size: 13px;
}

/* Modal Body (Scrollable) */
.settings-modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px 22px;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.25) transparent;
}

.settings-modal-body::-webkit-scrollbar {
    width: 6px;
}

.settings-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.settings-modal-body::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.2);
    border-radius: 4px;
}

.settings-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.45);
}

.settings-tab-panel {
    display: none;
    animation: fadeInTab 0.18s ease-out;
}

.settings-tab-panel.active {
    display: block;
}

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

/* Gauge Box */
.settings-gauge-card {
    background: linear-gradient(145deg, #0e1320 0%, #090d16 100%);
    border: 1px solid rgba(56, 189, 248, 0.16);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 12px;
    text-align: left;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.04);
}

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

.gauge-title-cluster {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.gauge-title {
    font-size: 11px;
    font-weight: 800;
    color: #38bdf8;
    letter-spacing: 0.6px;
}

.gauge-subtitle {
    font-size: 10px;
    color: var(--text-muted);
}

.gauge-readout-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 2px 0 8px 0;
}

.gauge-value {
    font-size: 34px;
    font-weight: 800;
    color: #00e676;
    font-family: var(--font-mono);
    text-shadow: 0 0 16px rgba(0, 230, 118, 0.35);
    line-height: 1;
}

.gauge-detail-text {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.slider-wrap {
    width: 100%;
    margin-bottom: 8px;
}

.temp-slider {
    width: 100%;
    height: 7px;
    border-radius: 5px;
    background: linear-gradient(90deg, #3d72ff 0%, #00e676 35%, #ff9100 70%, #ff5252 100%);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.temp-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    border: 3px solid #2962ff;
    box-shadow: 0 0 14px rgba(41, 98, 255, 0.8), 0 2px 5px rgba(0, 0, 0, 0.4);
    transition: transform 0.12s ease;
}

.temp-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.temp-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    border: 3px solid #2962ff;
    box-shadow: 0 0 14px rgba(41, 98, 255, 0.8), 0 2px 5px rgba(0, 0, 0, 0.4);
    transition: transform 0.12s ease;
}

.temp-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
}

.slider-endpoints {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
}

.endpoint-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 5px;
}

.endpoint-dot.blue { background: #3d72ff; box-shadow: 0 0 6px #3d72ff; }
.endpoint-dot.green { background: #00e676; box-shadow: 0 0 6px #00e676; }
.endpoint-dot.red { background: #ff5252; box-shadow: 0 0 6px #ff5252; }

/* Quick Presets Row */
.settings-presets-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    background: rgba(14, 18, 28, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 8px 12px;
}

.presets-label {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.presets-buttons-wrap {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
}

.btn-preset {
    background: #151a26;
    color: var(--text-main);
    border: 1px solid #263043;
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-preset:hover {
    background: #1f2738;
    border-color: #38bdf8;
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-preset.active {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    color: #ffffff;
    border-color: #60a5fa;
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.5);
}

/* Metrics Grid (2x2) */
.settings-metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.settings-metric-card {
    background: #0d121c;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.m-card-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

.settings-metric-card .m-val {
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: #00e676;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Fairplay Notice */
.settings-fairplay-notice {
    background: rgba(245, 158, 11, 0.07);
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-left: 3px solid #f59e0b;
    border-radius: 6px;
    padding: 9px 12px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    text-align: left;
}

.notice-icon {
    font-size: 14px;
    line-height: 1.2;
    flex-shrink: 0;
}

.notice-content {
    flex: 1;
}

.notice-title {
    font-size: 10px;
    font-weight: 800;
    color: #fbbf24;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.notice-desc {
    font-size: 10.5px;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.4;
}

/* Hotkeys Studio Panel */
.settings-hotkeys-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hotkeys-sec-title {
    font-size: 11px;
    font-weight: 800;
    color: #38bdf8;
    letter-spacing: 0.6px;
    display: block;
    margin-bottom: 2px;
}

.hotkeys-sec-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.35;
}

#btn-reset-hotkeys {
    font-size: 11px;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    background: #141a27;
    border: 1px solid #273449;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

#btn-reset-hotkeys:hover {
    color: #ffffff;
    border-color: #38bdf8;
    background: #1c2638;
}

.hotkey-bindings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 11px;
}

.hotkey-row-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 11px;
    background: #0d121c;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    transition: all 0.15s ease;
}

.hotkey-row-item:hover {
    border-color: rgba(56, 189, 248, 0.3);
    background: #111724;
}

.hotkey-row-item.active-listening {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.08);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}

.hotkey-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.hotkey-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.hk-label {
    font-size: 11px;
    font-weight: 600;
    color: #d1d5db;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-hotkey-bind {
    background: linear-gradient(180deg, #1b2333 0%, #111723 100%);
    border: 1px solid #2b3952;
    border-bottom: 2px solid #090d15;
    border-radius: 6px;
    padding: 4px 10px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 800;
    color: #38bdf8;
    cursor: pointer;
    min-width: 44px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.btn-hotkey-bind kbd {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.btn-hotkey-bind:hover {
    border-color: #38bdf8;
    background: #232e42;
    color: #ffffff;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.btn-hotkey-bind.listening {
    background: rgba(41, 98, 255, 0.25);
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
    animation: hotkeyPulse 1s infinite alternate;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #38bdf8;
    animation: hotkeyDotPulse 0.8s infinite alternate;
}

@keyframes hotkeyPulse {
    from { border-color: #2962ff; box-shadow: 0 0 6px rgba(41, 98, 255, 0.4); }
    to { border-color: #38bdf8; box-shadow: 0 0 14px rgba(56, 189, 248, 0.8); }
}

@keyframes hotkeyDotPulse {
    from { opacity: 0.3; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1.2); }
}

/* Modal Actions Footer (Fixed at bottom) */
.settings-modal-actions {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 22px;
    background: rgba(12, 16, 25, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-actions-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

#btn-reset-temp {
    background: #141824;
    border: 1px solid #242c3d;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

#btn-reset-temp:hover {
    color: #ffffff;
    border-color: #38bdf8;
    background: #1c2333;
}

#btn-close-settings {
    background: #141824;
    border: 1px solid #242c3d;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

#btn-close-settings:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
    background: #1c2333;
}

#btn-save-settings {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    border: 1px solid #60a5fa;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 7px 18px;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
    transition: all 0.15s ease;
}

#btn-save-settings:hover {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.6);
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .settings-metrics-grid {
        grid-template-columns: 1fr;
    }
    .hotkey-bindings-grid {
        grid-template-columns: 1fr;
    }
    .settings-nav-tabs {
        padding: 6px 12px 0 12px;
    }
    .settings-tab-btn {
        padding: 7px 10px;
        font-size: 11px;
    }
}



/* =========================================================
   PRO TRADER HUD & HIGH-FREQUENCY 1v1 LIVE SHOWDOWN POLISH
   ========================================================= */

/* Dual-Bar Tug-of-War Live PnL Gauge */
.hud-tug-gauge-container {
    width: 240px;
    height: 8px;
    background: #090c12;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    display: flex;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
    margin: 4px 0;
}

.hud-tug-bar {
    height: 100%;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.hud-tug-bar.you {
    background: linear-gradient(90deg, #1e88e5, #00e676);
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.4);
}

.hud-tug-bar.opp {
    background: linear-gradient(90deg, #ff5252, #ff9100);
    box-shadow: 0 0 10px rgba(255, 82, 82, 0.4);
}

.hud-tug-center-pin {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ffffff;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 4px #ffffff;
}

.hud-badge-title {
    font-size: 9px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(41, 98, 255, 0.2);
    color: #64b5f6;
    border: 1px solid rgba(41, 98, 255, 0.4);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hud-badge-title.opp {
    background: rgba(245, 124, 0, 0.2);
    color: #ffb74d;
    border-color: rgba(245, 124, 0, 0.4);
}

/* Leverage Selector Desk */
.leverage-cluster {
    background: #121620;
    border: 1px solid #222631;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 12px;
}

.leverage-multiplier-badge {
    font-size: 11px;
    font-weight: 800;
    color: #00e676;
    background: rgba(0, 230, 118, 0.12);
    border: 1px solid rgba(0, 230, 118, 0.3);
    padding: 2px 7px;
    border-radius: 4px;
    font-family: var(--font-mono);
}

.leverage-presets {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.btn-lev {
    flex: 1;
    background: #181d28;
    color: var(--text-muted);
    border: 1px solid #2a2f3d;
    border-radius: 4px;
    padding: 6px 0;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-lev:hover {
    background: #202636;
    color: #ffffff;
    border-color: #3d465c;
}

.btn-lev.active {
    background: #2962ff;
    color: #ffffff;
    border-color: #5383ff;
    box-shadow: 0 0 12px rgba(41, 98, 255, 0.45);
}

/* 3-2-1 Match Countdown Overlay */
.countdown-modal-card {
    text-align: center;
    background: radial-gradient(circle at center top, #1c2233, #0b0e14);
    border: 1px solid #333d52;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 30px rgba(41, 98, 255, 0.15);
    max-width: 460px;
    padding: 28px;
    border-radius: 12px;
}

.countdown-badge-pill {
    display: inline-block;
    background: rgba(41, 98, 255, 0.18);
    color: #82b1ff;
    border: 1px solid rgba(41, 98, 255, 0.4);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 16px;
    margin-bottom: 18px;
}

.countdown-matchup-grid {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: rgba(10, 13, 20, 0.6);
    border: 1px solid #222938;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 18px;
}

.cd-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.cd-avatar {
    font-size: 32px;
    margin-bottom: 4px;
}

.cd-name {
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 4px;
}

.cd-title-pill {
    font-size: 9px;
    font-weight: 800;
    background: rgba(0, 230, 118, 0.12);
    color: #00e676;
    border: 1px solid rgba(0, 230, 118, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
}

.cd-title-pill.opp {
    background: rgba(255, 145, 0, 0.12);
    color: #ff9100;
    border-color: rgba(255, 145, 0, 0.3);
}

.cd-vs-badge {
    font-size: 16px;
    font-weight: 900;
    color: #ff3d71;
    background: rgba(255, 61, 113, 0.12);
    border: 1px solid rgba(255, 61, 113, 0.3);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
}

.cd-stock-box {
    background: #11151f;
    border: 1px solid #232b3b;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 16px;
}

.cd-big-number-wrap {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.cd-number-pulse {
    font-size: 72px;
    font-weight: 900;
    font-family: var(--font-mono);
    color: #00e676;
    text-shadow: 0 0 24px rgba(0, 230, 118, 0.7);
    animation: cdPulse 0.9s infinite ease-out;
}

@keyframes cdPulse {
    0% { transform: scale(1.3); opacity: 0.6; }
    50% { transform: scale(1.0); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.8; }
}

/* Polished Button Effects */
.btn-trade:active {
    transform: scale(0.97);
}
.btn-buy:hover {
    box-shadow: 0 0 16px rgba(8, 153, 129, 0.4);
}
.btn-sell:hover {
    box-shadow: 0 0 16px rgba(242, 54, 69, 0.4);
}
.btn-short:hover {
    box-shadow: 0 0 16px rgba(245, 124, 0, 0.4);
}
.btn-cover:hover {
    box-shadow: 0 0 16px rgba(41, 98, 255, 0.4);
}

/* =========================================================
   INSTITUTIONAL BRANDING & 3-TIER DUEL DURATION SELECTOR
   ========================================================= */

.brand-name {
    font-weight: 900;
    letter-spacing: 1px;
    color: #ffffff;
    font-size: 14px;
}

.brand-sub {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent-blue);
    background: rgba(41, 98, 255, 0.14);
    border: 1px solid rgba(41, 98, 255, 0.3);
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 6px;
}

.tape-pill {
    border-color: rgba(0, 230, 118, 0.25) !important;
    background: rgba(0, 230, 118, 0.05) !important;
}

/* =========================================================
   PRO MODE SELECT DISPATCH MODAL (Premium Cyber-Terminal HUD)
   ========================================================= */
#modal-mode {
    background: radial-gradient(circle at 50% 20%, rgba(16, 28, 56, 0.78) 0%, rgba(4, 6, 12, 0.92) 75%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mode-dispatch-card {
    max-width: 920px !important;
    width: 94% !important;
    max-height: 94vh;
    overflow-y: auto;
    padding: 26px 30px !important;
    background: linear-gradient(165deg, rgba(10, 15, 28, 0.92) 0%, rgba(5, 8, 16, 0.96) 100%) !important;
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid rgba(56, 189, 248, 0.16) !important;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.85), 0 0 40px rgba(14, 165, 233, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
}

.mono-data {
    font-family: var(--font-mono);
}

/* Top Header Bar */
.modal-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-bottom: 18px;
    margin-bottom: 22px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    gap: 16px;
    flex-wrap: wrap;
}

.modal-brand-cluster {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 2px;
}

.modal-brand-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-brand-cluster .modal-title {
    font-family: var(--font-hud);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1.8px;
    margin: 0;
    color: #f8fafc;
    text-transform: uppercase;
    text-shadow: 0 0 18px rgba(56, 189, 248, 0.25);
}

.version-tag {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: #38bdf8;
    font-weight: 700;
    background: rgba(56, 189, 248, 0.1);
    padding: 2px 8px;
    border-radius: 5px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    letter-spacing: 0.5px;
}

.modal-brand-cluster .modal-sub {
    font-size: 12px;
    color: #64748b;
    margin: 0;
}

/* Global Navigation & Profile (Grouped in Top Right) */
.modal-top-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.menu-vault-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(9, 14, 26, 0.78);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 230, 118, 0.2);
    border-radius: 8px;
    padding: 4px 6px 4px 11px;
    height: 34px;
    box-shadow: 0 0 16px rgba(0, 230, 118, 0.06);
}

.vault-label {
    font-family: var(--font-hud);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #64748b;
}

.vault-amount {
    font-size: 13px;
    font-family: var(--font-mono);
    font-weight: 700;
    color: #00e676 !important;
    text-shadow: 0 0 10px rgba(0, 230, 118, 0.35);
}

.btn-shop-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(56, 189, 248, 0.1);
    color: #e2e8f0;
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    cursor: pointer;
    transition: all 0.18s ease;
    height: 24px;
}

.btn-shop-badge:hover {
    background: rgba(56, 189, 248, 0.2);
    color: #ffffff;
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.modal-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    padding: 0 12px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(9, 14, 26, 0.75);
    backdrop-filter: blur(8px);
    transition: all 0.18s ease;
    white-space: nowrap;
}

.modal-nav-link:hover {
    color: #f8fafc;
    border-color: rgba(56, 189, 248, 0.35);
    background: rgba(18, 27, 48, 0.85);
}

/* Unified User Profile & Callsign Pill */
.modal-profile-cluster {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(9, 14, 26, 0.78);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 8px;
    padding: 3px 5px 3px 10px;
    height: 34px;
}

.nickname-box {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.profile-mono-icon {
    color: #38bdf8;
    flex-shrink: 0;
}

.nickname-input-clean {
    background: transparent;
    border: 1px solid transparent;
    color: #f1f5f9;
    font-family: var(--font-mono);
    padding: 3px 6px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    width: 118px;
    text-align: left;
    transition: all 0.15s ease;
}

.nickname-input-clean:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(148, 163, 184, 0.18);
}

.nickname-input-clean:focus {
    outline: none;
    background: #060913;
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.modal-top-auth {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-auth-signin {
    height: 26px !important;
    padding: 0 10px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(96, 165, 250, 0.35) !important;
    border-radius: 6px !important;
}

.btn-auth-signin:hover {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
}

.btn-auth-profile {
    height: 26px !important;
    padding: 0 9px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    background: rgba(148, 163, 184, 0.1) !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(148, 163, 184, 0.16) !important;
    border-radius: 6px !important;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-auth-profile:hover {
    background: rgba(148, 163, 184, 0.18) !important;
    color: #ffffff !important;
}

.auth-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00e676;
    box-shadow: 0 0 6px #00e676;
    display: inline-block;
}

.btn-auth-signout {
    height: 26px !important;
    padding: 0 9px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    background: transparent !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(148, 163, 184, 0.12) !important;
    border-radius: 6px !important;
}

.btn-auth-signout:hover {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #fca5a5 !important;
    border-color: rgba(239, 68, 68, 0.25) !important;
}

/* 2-Column Mode Cards Grid */
.mode-cards-grid-modern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
    margin-bottom: 16px;
}

@media (max-width: 740px) {
    .mode-cards-grid-modern {
        grid-template-columns: 1fr;
    }
    .modal-top-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

.mode-card-modern {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(16, 23, 41, 0.76) 0%, rgba(9, 13, 25, 0.88) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 14px;
    padding: 24px;
    text-align: left;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    min-height: 330px;
}

.mode-card-modern.solo:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 230, 118, 0.45);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5), 0 0 24px rgba(0, 230, 118, 0.12);
}

.mode-card-modern.pvp:hover {
    transform: translateY(-3px);
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5), 0 0 26px rgba(37, 99, 235, 0.18);
}

.mode-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.mode-card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 12px;
}

.mode-title-with-icon {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mode-card-modern.solo .mode-header-icon {
    color: #00e676;
    filter: drop-shadow(0 0 6px rgba(0, 230, 118, 0.35));
    flex-shrink: 0;
}

.mode-card-modern.pvp .mode-header-icon {
    color: #38bdf8;
    filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.35));
    flex-shrink: 0;
}

.mode-sparkline-icon {
    color: #475569;
    flex-shrink: 0;
}

.mode-card-title {
    font-family: var(--font-hud);
    font-size: 22px;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin: 0;
}

.mode-card-desc {
    font-size: 12.5px;
    color: #8492a6;
    line-height: 1.5;
    margin-bottom: 18px;
}

/* Inner Sub-Cards inside Solo & PvP Cards */
.mode-inner-box {
    background: rgba(6, 10, 20, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.11);
    border-radius: 11px;
    padding: 15px 16px;
    margin-top: auto;
    box-shadow: inset 0 1px 8px rgba(0, 0, 0, 0.45);
}

/* Solo Specs Inner Box */
.solo-specs-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.solo-specs-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    flex: 1;
}

.solo-spec-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
}

.spec-label {
    color: #7c8ba1;
}

.spec-val {
    color: #f1f5f9;
    font-weight: 700;
    font-family: var(--font-mono);
}

/* Live Ticking Price Pill in Solo Sandbox */
.live-ticker-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    padding: 2px 8px;
    border-radius: 5px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.14);
    transition: background-color 0.25s ease;
}

.lt-sym {
    font-weight: 700;
    color: #cbd5e1;
}

.lt-price {
    font-weight: 700;
    color: #ffffff;
}

.lt-chg {
    font-size: 11px;
    font-weight: 700;
}

.temp-tuning-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

#mode-temp-tag {
    font-size: 11.5px;
    font-weight: 600;
    color: #94a3b8;
    font-family: var(--font-mono);
}

.btn-tune-temp {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 6px;
    background: rgba(56, 189, 248, 0.1);
    color: #cbd5e1;
    border: 1px solid rgba(56, 189, 248, 0.22);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-tune-temp:hover {
    background: rgba(56, 189, 248, 0.2);
    color: #ffffff;
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.solo-mini-chart {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes candleBreath {
    0%, 100% { opacity: 1; filter: drop-shadow(0 0 5px rgba(0, 230, 118, 0.6)); }
    50% { opacity: 0.65; filter: drop-shadow(0 0 2px rgba(0, 230, 118, 0.2)); }
}

.candle-live-pulse {
    animation: candleBreath 2.2s infinite ease-in-out;
}

/* Split-Screen 1v1 HUD Clash Visualizer (Green vs. Red) */
.pvp-clash-visualizer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: rgba(11, 16, 30, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 7px;
    padding: 6px 10px;
    margin-bottom: 12px;
}

.clash-side {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
}

.clash-tag {
    font-family: var(--font-hud);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    padding: 1px 5px;
    border-radius: 3px;
}

.clash-side.you .clash-tag {
    background: rgba(0, 230, 118, 0.15);
    color: #00e676;
    border: 1px solid rgba(0, 230, 118, 0.35);
}

.clash-side.you .clash-pnl {
    color: #00e676;
    text-shadow: 0 0 8px rgba(0, 230, 118, 0.35);
}

.clash-side.opp .clash-tag {
    background: rgba(244, 63, 94, 0.15);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.35);
}

.clash-side.opp .clash-pnl {
    color: #fb7185;
    text-shadow: 0 0 8px rgba(244, 63, 94, 0.35);
}

.clash-bar-track {
    flex: 1;
    height: 6px;
    background: #060911;
    border-radius: 999px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: visible;
}

@keyframes clashTugYou {
    0%, 100% { width: 58%; }
    50% { width: 64%; }
}

@keyframes clashTugOpp {
    0%, 100% { width: 42%; }
    50% { width: 36%; }
}

.clash-bar-fill.you {
    height: 100%;
    width: 60%;
    border-radius: 999px 0 0 999px;
    background: linear-gradient(90deg, #059669, #00e676);
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.45);
    animation: clashTugYou 3.6s infinite ease-in-out;
}

.clash-bar-fill.opp {
    height: 100%;
    width: 40%;
    border-radius: 0 999px 999px 0;
    background: linear-gradient(90deg, #f43f5e, #be123c);
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.45);
    animation: clashTugOpp 3.6s infinite ease-in-out;
}

.clash-spark {
    font-family: var(--font-hud);
    font-size: 9px;
    font-weight: 700;
    color: #ffffff;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    padding: 0 4px;
    line-height: 14px;
    z-index: 2;
    margin: 0 -6px;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
}

/* PvP Format Selector Inner Box */
.pvp-format-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.format-box-label {
    font-family: var(--font-hud);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: #94a3b8;
}

.tape-badge {
    font-size: 10px;
    font-weight: 600;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.24);
    padding: 2px 8px;
    border-radius: 999px;
    font-family: var(--font-mono);
}

/* 3-Tier Selectable Toggle Cards (Blitz, Tactical, Marathon) */
.duel-duration-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.duel-dur-card {
    background: rgba(15, 22, 38, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 9px;
    padding: 12px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.duel-dur-card:hover {
    background: rgba(24, 35, 58, 0.88);
    border-color: rgba(56, 189, 248, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35), 0 0 12px rgba(56, 189, 248, 0.15);
}

.duel-dur-card.active {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.22) 0%, rgba(14, 165, 233, 0.12) 100%);
    border-color: #38bdf8;
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4), 0 6px 18px rgba(14, 165, 233, 0.22);
}

.dur-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-hud);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #94a3b8;
    transition: color 0.18s ease;
}

.duel-dur-card.active .dur-badge {
    color: #38bdf8;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.dur-time {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 800;
    color: #e2e8f0;
}

.duel-dur-card.active .dur-time {
    color: #ffffff;
}

.dur-desc {
    font-size: 10.5px;
    color: #64748b;
    line-height: 1.25;
}

.duel-dur-card.active .dur-desc {
    color: #cbd5e1;
}

/* Primary Action Buttons with Targeted Neon Breathing Pulse */
@keyframes ctaPulseSolo {
    0%, 100% { box-shadow: 0 4px 18px rgba(16, 185, 129, 0.28), 0 0 0 0 rgba(0, 230, 118, 0.25); }
    50% { box-shadow: 0 6px 26px rgba(0, 230, 118, 0.45), 0 0 16px 2px rgba(0, 230, 118, 0.18); }
}

@keyframes ctaPulsePvp {
    0%, 100% { box-shadow: 0 4px 18px rgba(37, 99, 235, 0.34), 0 0 0 0 rgba(56, 189, 248, 0.25); }
    50% { box-shadow: 0 6px 26px rgba(56, 189, 248, 0.5), 0 0 16px 2px rgba(56, 189, 248, 0.2); }
}

.btn-mode-launch {
    width: 100%;
    min-height: 48px;
    border-radius: 10px;
    padding: 12px 18px;
    cursor: pointer;
    font-family: var(--font-hud);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: all 0.2s ease;
    user-select: none;
}

.btn-mode-launch.solo {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: 1px solid rgba(110, 231, 183, 0.35);
    animation: ctaPulseSolo 3.2s infinite ease-in-out;
}

.btn-mode-launch.solo:hover {
    background: linear-gradient(180deg, #22c55e 0%, #10b981 100%);
    box-shadow: 0 8px 28px rgba(0, 230, 118, 0.55);
    transform: translateY(-2px);
}

.btn-mode-launch.solo:active {
    transform: translateY(0);
}

.solo-btn-content {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-hud);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
}

.btn-mode-launch.pvp {
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border: 1px solid rgba(125, 211, 252, 0.35);
    padding: 9px 18px;
    animation: ctaPulsePvp 3.2s infinite ease-in-out;
}

.btn-mode-launch.pvp:hover {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 8px 28px rgba(56, 189, 248, 0.55);
    transform: translateY(-2px);
}

.btn-mode-launch.pvp:active {
    transform: translateY(0);
}

.duel-btn-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-hud);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Pulsing Matchmaking Radar Indicator inside Find Opponent CTA */
.btn-radar-indicator {
    position: relative;
    width: 12px;
    height: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@keyframes radarPing {
    0% { transform: scale(0.8); opacity: 0.9; }
    100% { transform: scale(2.2); opacity: 0; }
}

.btn-radar-ping {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1.5px solid #38bdf8;
    animation: radarPing 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.btn-radar-core {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00f0ff;
    box-shadow: 0 0 8px #00f0ff;
}

.duel-btn-sub {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: rgba(226, 232, 240, 0.78);
    font-weight: 500;
    letter-spacing: 0.2px;
    text-transform: none;
}

/* Vault Progression & High-Roller Showcase Bar */
.vault-progression-teaser {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: linear-gradient(90deg, rgba(12, 18, 34, 0.85) 0%, rgba(18, 25, 46, 0.85) 50%, rgba(12, 18, 34, 0.85) 100%);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 12px;
    padding: 11px 16px;
    margin-bottom: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-wrap: wrap;
}

.vault-progression-teaser:hover {
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 18px rgba(56, 189, 248, 0.12);
    transform: translateY(-1px);
}

.vpt-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 2px;
}

.vpt-eyebrow {
    font-family: var(--font-hud);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: #38bdf8;
    text-transform: uppercase;
}

.vpt-headline {
    font-size: 12px;
    color: #cbd5e1;
}

.vpt-headline strong {
    color: #00e676;
}

.vpt-items {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.vpt-reward-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(6, 10, 20, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 8px;
    padding: 5px 10px;
}

.vpt-reward-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
}

.vpt-r-name {
    font-size: 11px;
    font-weight: 600;
    color: #e2e8f0;
}

.vpt-r-price {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    color: #00e676;
}

.vpt-cta {
    font-family: var(--font-hud);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #38bdf8;
    white-space: nowrap;
}

.modal-footer-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: #64748b;
    padding-top: 2px;
}

.live-dot {
    color: #00e676;
    font-size: 9px;
    text-shadow: 0 0 8px #00e676;
    animation: pulse 2s infinite;
}

/* Battle HUD Duel Format Badge */
.hud-duel-format-badge {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 800;
    background: rgba(41, 98, 255, 0.15);
    color: #82b1ff;
    border: 1px solid rgba(41, 98, 255, 0.4);
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Catalyst, Margin Call & Spectator Banners */
.catalyst-alert-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: linear-gradient(90deg, rgba(255, 152, 0, 0.18), rgba(41, 98, 255, 0.12));
    border-bottom: 1px solid rgba(255, 152, 0, 0.45);
    font-size: 12px;
    color: #fff;
    animation: pulse 1.6s infinite;
}

.catalyst-alert-banner .cat-badge {
    background: #ff9800;
    color: #000;
    font-weight: 800;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.margin-call-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: linear-gradient(90deg, rgba(242, 54, 69, 0.28), rgba(242, 54, 69, 0.08));
    border-bottom: 1px solid #f23645;
    color: #ff8a80;
    font-size: 12px;
    font-weight: 700;
    animation: pulse 1s infinite;
}

.spectator-mode-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 14px;
    background: linear-gradient(90deg, rgba(11, 20, 38, 0.98) 0%, rgba(14, 25, 48, 0.98) 100%);
    border-bottom: 1px solid rgba(56, 189, 248, 0.45);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    font-size: 12px;
    color: #e2e8f0;
    z-index: 5;
}

.spec-banner-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spec-banner-divider {
    color: rgba(148, 163, 184, 0.3);
    font-size: 12px;
}

.spec-live-pill {
    background: rgba(242, 54, 69, 0.16);
    color: #ff5252;
    border: 1px solid rgba(242, 54, 69, 0.4);
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.spec-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff5252;
    box-shadow: 0 0 6px #ff5252;
    display: inline-block;
    animation: pulse 1.4s infinite;
}

.spec-bias-btn {
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}
.spec-bias-btn.up {
    background: rgba(0, 230, 118, 0.1);
    color: #00e676;
    border-color: rgba(0, 230, 118, 0.3);
}
.spec-bias-btn.up:hover {
    background: rgba(0, 230, 118, 0.2);
    border-color: #00e676;
}
.spec-bias-btn.down {
    background: rgba(255, 82, 82, 0.1);
    color: #ff5252;
    border-color: rgba(255, 82, 82, 0.3);
}
.spec-bias-btn.down:hover {
    background: rgba(255, 82, 82, 0.2);
    border-color: #ff5252;
}
.spec-bias-btn.cyan {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.3);
}
.spec-bias-btn.cyan:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
}

/* =========================================================
   LIVE TRADING FLOOR • SPECTATOR TERMINAL MODAL STYLES
   ========================================================= */
.spectator-modal-card {
    max-width: 960px !important;
    width: 95vw !important;
    max-height: 88vh;
    padding: 22px 26px !important;
    display: flex;
    flex-direction: column;
    align-items: stretch !important;
    text-align: left !important;
    background: linear-gradient(165deg, rgba(11, 16, 28, 0.98) 0%, rgba(6, 9, 18, 0.99) 100%) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(56, 189, 248, 0.22) !important;
    border-radius: 14px !important;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.9), 0 0 40px rgba(56, 189, 248, 0.08) !important;
    overflow: hidden;
}

.spectator-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    margin-bottom: 16px;
    width: 100%;
    flex-shrink: 0;
}

.spectator-badge-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.spec-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 800;
    color: #00e676;
    background: rgba(0, 230, 118, 0.12);
    border: 1px solid rgba(0, 230, 118, 0.3);
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.6px;
}

.spec-live-indicator .spec-live-dot {
    background: #00e676;
    box-shadow: 0 0 6px #00e676;
}

.spec-sub-badge {
    font-size: 10px;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.spectator-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spectator-main-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 16px;
    flex: 1;
    min-height: 0;
    width: 100%;
    overflow: hidden;
}

@media (max-width: 820px) {
    .spectator-main-grid {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }
}

.spectator-sessions-pane,
.spectator-feed-pane {
    background: rgba(14, 18, 30, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.spectator-pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
    margin-bottom: 12px;
    flex-shrink: 0;
}

.spectator-pane-title {
    font-family: var(--font-hud);
    font-size: 12.5px;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.spectator-pane-stat {
    font-size: 11px;
    font-weight: 600;
    color: #38bdf8;
    font-family: var(--font-mono);
}

.spectator-symbol-badge {
    font-size: 10.5px;
    font-weight: 800;
    font-family: var(--font-mono);
    color: #00e676;
    background: rgba(0, 230, 118, 0.12);
    border: 1px solid rgba(0, 230, 118, 0.3);
    padding: 1px 6px;
    border-radius: 3px;
}

.spectator-feed-status {
    font-size: 10.5px;
    color: var(--text-muted);
}

/* Lobbies scroll list */
.spectate-lobbies-scroll {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 4px;
    min-height: 220px;
}

.spectate-lobby-card {
    background: rgba(10, 14, 24, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    cursor: pointer;
}

.spectate-lobby-card:hover {
    border-color: rgba(56, 189, 248, 0.45);
    background: rgba(16, 23, 40, 0.95);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4), 0 0 12px rgba(56, 189, 248, 0.1);
}

.spectate-lobby-card.active-selected {
    border-color: #38bdf8;
    background: linear-gradient(165deg, rgba(20, 32, 58, 0.85) 0%, rgba(12, 19, 36, 0.95) 100%);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35), 0 6px 20px rgba(0, 0, 0, 0.5);
}

.lobby-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lobby-format-pill {
    font-size: 10px;
    font-weight: 800;
    color: #82b1ff;
    background: rgba(41, 98, 255, 0.15);
    border: 1px solid rgba(41, 98, 255, 0.35);
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.lobby-viewers-pill {
    font-size: 11px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.lobby-matchup-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: rgba(6, 9, 16, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 6px;
    padding: 8px 10px;
}

.lobby-trader-col {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.lobby-trader-col.right {
    align-items: flex-end;
    text-align: right;
}

.lobby-trader-name {
    font-size: 12.5px;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 5px;
}

.lobby-trader-equity {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    margin-top: 2px;
}

.lobby-vs-badge {
    font-size: 10px;
    font-weight: 800;
    color: #ff5252;
    background: rgba(255, 82, 82, 0.12);
    border: 1px solid rgba(255, 82, 82, 0.28);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    flex-shrink: 0;
}

.lobby-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2px;
}

.lobby-asset-pill {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: #cbd5e1;
}

.btn-lobby-watch {
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border: 1px solid rgba(147, 197, 253, 0.35);
    padding: 5px 14px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.btn-lobby-watch:hover {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
    transform: translateY(-1px);
}

/* Execution Tape & Desk Feed Scroll */
.spectate-chat-scroll {
    flex: 1;
    min-height: 220px;
    max-height: 280px;
    overflow-y: auto;
    display: flex;
    flex-direction: column-reverse;
    gap: 6px;
    padding: 10px;
    background: #080c14;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
}

.spectate-feed-placeholder {
    color: var(--text-muted);
    font-size: 11px;
    font-style: italic;
    text-align: center;
    padding: 30px 10px;
}

.spectate-feed-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 3px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.02);
    line-height: 1.4;
    border-left: 2px solid transparent;
}

.spectate-feed-item.order-buy {
    border-left-color: #00e676;
    background: rgba(0, 230, 118, 0.04);
}
.spectate-feed-item.order-sell {
    border-left-color: #ff5252;
    background: rgba(255, 82, 82, 0.04);
}
.spectate-feed-item.commentary-item {
    border-left-color: #38bdf8;
    background: rgba(56, 189, 248, 0.04);
}

.feed-time {
    color: var(--text-muted);
    font-size: 10px;
    flex-shrink: 0;
}
.feed-actor {
    font-weight: 700;
    color: #e2e8f0;
    flex-shrink: 0;
}
.feed-action {
    font-weight: 700;
}
.feed-detail {
    color: var(--text-main);
    flex: 1;
}

.spectator-quick-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0 8px 0;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.spec-qa-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.btn-spec-action {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 4px;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-spec-action.up {
    color: #00e676;
    background: rgba(0, 230, 118, 0.08);
    border-color: rgba(0, 230, 118, 0.25);
}
.btn-spec-action.up:hover {
    background: rgba(0, 230, 118, 0.18);
    border-color: #00e676;
}

.btn-spec-action.down {
    color: #ff5252;
    background: rgba(255, 82, 82, 0.08);
    border-color: rgba(255, 82, 82, 0.25);
}
.btn-spec-action.down:hover {
    background: rgba(255, 82, 82, 0.18);
    border-color: #ff5252;
}

.btn-spec-action.cyan {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.25);
}
.btn-spec-action.cyan:hover {
    background: rgba(56, 189, 248, 0.18);
    border-color: #38bdf8;
}

.spectator-chat-input-row {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.spectator-chat-input-row input {
    flex: 1;
    background: #0b0f19;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 6px;
    padding: 7px 12px;
    color: #ffffff;
    font-size: 12px;
    outline: none;
    transition: border-color 0.15s ease;
}

.spectator-chat-input-row input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15);
}

.spectator-chat-input-row button {
    padding: 7px 18px;
    font-size: 12px;
    font-weight: 700;
}

.hotkey-bind-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #161a25;
    border: 1px solid #2a2e39;
    border-radius: 5px;
    padding: 5px 8px;
    color: #e2e8f0;
    cursor: pointer;
    transition: border-color 0.15s;
}

.hotkey-bind-btn:hover,
.hotkey-bind-btn.listening {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
}

.hotkey-key-pill {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 800;
    background: #0e1117;
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 3px;
    padding: 2px 6px;
}

.analytics-comp-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 6px;
    background: #0e1117;
    border: 1px solid #262b38;
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 8px;
    font-size: 11px;
    font-family: var(--font-mono);
}

.analytics-comp-row {
    display: contents;
}

.analytics-comp-row > span {
    padding: 3px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* =========================================================
   MODULAR HOVER-REVEAL ASSET BADGE & ANTI-CLUTTER UI RULES
   ========================================================= */

.asset-badge-modular {
    display: inline-flex;
    align-items: center;
    gap: 0;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    vertical-align: middle;
}

.asset-badge-modular:hover,
.asset-badge-modular:focus-within {
    border-color: rgba(56, 189, 248, 0.6) !important;
    background: rgba(14, 21, 37, 0.96) !important;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.asset-type-pill {
    font-weight: 800;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

/* Advanced Options Greeks & Funding Rate hidden by default to prevent UI clutter;
   smoothly expands on #chart-asset-badge:hover */
.asset-greeks-detail {
    display: inline-block;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    margin-left: 0;
    padding-left: 0;
    border-left: 1px solid transparent;
    color: #94a3b8;
    font-family: var(--font-mono);
    font-weight: 600;
    transition: max-width 0.24s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.2s ease,
                margin-left 0.2s ease,
                padding-left 0.2s ease;
}

.asset-badge-modular:hover .asset-greeks-detail,
.asset-badge-modular:focus .asset-greeks-detail,
.asset-badge-modular:focus-within .asset-greeks-detail {
    max-width: 340px;
    opacity: 1;
    margin-left: 7px;
    padding-left: 7px;
    border-left-color: rgba(56, 189, 248, 0.35);
    color: #e2e8f0;
}

.margin-util-bar {
    height: 100%;
    transition: width 0.2s ease, background 0.2s ease;
}

/* =========================================================
   SEASONAL COMPETITIVE LEAGUES & DIVISION LADDER MODAL
   ========================================================= */
#modal-leagues,
#modal-spectate,
#modal-private-room {
    z-index: 250;
}

#modal-spectate .modal-card,
#modal-private-room .modal-card {
    align-items: stretch;
}

.leagues-modal-card {
    max-width: 920px !important;
    width: 95% !important;
    max-height: 92vh;
    overflow-y: auto;
    align-items: stretch !important;
    text-align: left !important;
    padding: 22px 24px !important;
    background: linear-gradient(180deg, #151924 0%, #0f131c 100%) !important;
    border: 1px solid rgba(245, 197, 24, 0.28) !important;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85), 0 0 40px rgba(245, 197, 24, 0.08) !important;
    border-radius: 14px !important;
    gap: 12px;
}

.leagues-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}

.leagues-header-left {
    flex: 1;
    min-width: 260px;
}

.leagues-eyebrow-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.leagues-season-pill {
    font-family: var(--font-hud);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(245, 197, 24, 0.16);
    color: #ffd700;
    border: 1px solid rgba(245, 197, 24, 0.4);
}

.leagues-rules-pill {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.leagues-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.leagues-btn-claim-all {
    background: linear-gradient(135deg, #00c853, #009624) !important;
    color: #041208 !important;
    font-weight: 800 !important;
    border: 1px solid #69f0ae !important;
    box-shadow: 0 0 14px rgba(0, 230, 118, 0.4);
}

.leagues-btn-claim-all:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.leagues-reward-toast {
    background: linear-gradient(90deg, rgba(0, 200, 83, 0.2), rgba(245, 197, 24, 0.15));
    border: 1px solid rgba(0, 230, 118, 0.5);
    color: #00e676;
    font-weight: 700;
    font-size: 12.5px;
    padding: 9px 14px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Personal Ranked Command Center */
.leagues-summary-box {
    width: 100%;
    background: linear-gradient(135deg, rgba(16, 22, 36, 0.95) 0%, rgba(11, 15, 25, 0.98) 100%);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px;
    padding: 16px 18px;
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 18px;
    align-items: center;
}

.league-hero-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.league-identity-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.league-emblem-badge {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.12), rgba(10, 14, 23, 0.95));
    border: 2px solid rgba(255, 215, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.league-identity-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.league-you-eyebrow {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.league-division-title {
    font-family: var(--font-hud);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.league-rp-readout-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 2px;
}

.league-rp-big {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
}

.league-rank-standing-pill {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 2px 8px;
    border-radius: 999px;
}

.league-progress-block {
    background: rgba(8, 11, 18, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    padding: 10px 12px;
}

.league-progress-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    margin-bottom: 6px;
}

.league-progress-bar-outer {
    width: 100%;
    height: 9px;
    background: #090c12;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.league-progress-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.league-progress-sub {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10.5px;
    color: #94a3b8;
    margin-top: 6px;
}

.league-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.league-stat-card {
    background: rgba(10, 14, 23, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 8px;
    padding: 9px 11px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.league-stat-card .ls-label {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #7c8ba1;
}

.league-stat-card .ls-val {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 800;
    color: #f8fafc;
}

.league-stat-card .ls-sub {
    font-size: 10px;
    color: #94a3b8;
}

/* Section Headers */
.leagues-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.leagues-sec-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #cbd5e1;
}

.leagues-sec-hint {
    font-size: 11px;
    color: #94a3b8;
}

/* 5-Tier Progression Cards Grid */
.leagues-tiers-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    width: 100%;
}

.league-tier-card {
    background: #10141f;
    border: 1px solid #23293a;
    border-radius: 10px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: space-between;
    gap: 6px;
    position: relative;
    transition: all 0.18s ease;
}

.league-tier-card:hover {
    transform: translateY(-2px);
    border-color: rgba(148, 163, 184, 0.35);
}

.league-tier-card.is-current {
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.1) 0%, rgba(16, 20, 31, 0.98) 100%);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.league-tier-card.is-unlocked {
    border-color: rgba(148, 163, 184, 0.25);
}

.league-tier-card.is-locked {
    opacity: 0.78;
}

.ltc-status-pill {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 999px;
}

.ltc-icon {
    font-size: 28px;
    line-height: 1.1;
    margin: 2px 0;
}

.ltc-name {
    font-family: var(--font-hud);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.4px;
}

.ltc-rp-range {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: #94a3b8;
    font-weight: 600;
}

.ltc-perk {
    font-size: 10px;
    color: #64748b;
    line-height: 1.25;
    min-height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ltc-reward-box {
    width: 100%;
    background: rgba(8, 11, 18, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 5px 6px;
    margin-top: 2px;
}

.ltc-reward-lbl {
    font-size: 8.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    display: block;
}

.ltc-reward-val {
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 800;
    color: #00e676;
}

.ltc-action-wrap {
    width: 100%;
    margin-top: 2px;
}

.btn-tier-claim {
    width: 100%;
    background: linear-gradient(135deg, #00c853, #00e676);
    color: #031409;
    border: none;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(0, 230, 118, 0.35);
    transition: all 0.15s ease;
}

.btn-tier-claim:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.tier-claimed-badge {
    display: block;
    width: 100%;
    background: rgba(0, 230, 118, 0.12);
    color: #00e676;
    border: 1px solid rgba(0, 230, 118, 0.3);
    border-radius: 6px;
    padding: 5px 6px;
    font-size: 10px;
    font-weight: 800;
}

.tier-locked-badge {
    display: block;
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    color: #64748b;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 6px;
    padding: 5px 6px;
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-mono);
}

/* Filter Tabs & Standings Table */
.leagues-filter-tabs {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.league-filter-btn {
    background: #10141f;
    color: #94a3b8;
    border: 1px solid #242b3d;
    border-radius: 6px;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.league-filter-btn:hover {
    color: #ffffff;
    border-color: #38bdf8;
}

.league-filter-btn.active {
    background: rgba(41, 98, 255, 0.22);
    color: #ffffff;
    border-color: #38bdf8;
}

.leagues-table-wrap {
    width: 100%;
    max-height: 220px;
    overflow-y: auto;
    background: #0b0e16;
    border: 1px solid #23293a;
    border-radius: 8px;
}

.leagues-standings-table th {
    background: #121723 !important;
    padding: 8px 12px !important;
    font-size: 10px !important;
}

.leagues-standings-table td {
    padding: 8px 12px !important;
    font-size: 12px !important;
    vertical-align: middle;
}

.leagues-standings-table tr.is-you-row td {
    background: rgba(41, 98, 255, 0.16) !important;
    border-top: 1px solid rgba(56, 189, 248, 0.45);
    border-bottom: 1px solid rgba(56, 189, 248, 0.45);
}

.leagues- guide-footer,
.leagues-guide-footer {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    background: rgba(10, 14, 22, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 8px;
    padding: 10px 12px;
}

.lg-step {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 11px;
    line-height: 1.35;
}

.lg-step-num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.16);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.lg-step strong {
    display: block;
    color: #e2e8f0;
    font-size: 11.5px;
    margin-bottom: 1px;
}

.lg-step span {
    color: #848e9c;
}

@media (max-width: 820px) {
    .leagues-summary-box {
        grid-template-columns: 1fr;
    }
    .leagues-tiers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .leagues-guide-footer {
        grid-template-columns: 1fr;
    }
}



