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

body {
    background: var(--bg-page, #080c14);
    color: var(--hud-body-text, #b0bcd0);
    font-family: 'Courier New', monospace;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

/* Subtle scanline overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
}

#game-container {
    display: none;
    width: 100vw;
    height: 100vh;
    position: relative;
}

#game-container canvas {
    position: absolute;
    top: 0;
    left: 0;
}

/* bg and ui canvases are render-only — let game-canvas handle all mouse events */
#bg-canvas {
    pointer-events: none;
    z-index: 0;
}

#game-canvas {
    z-index: 1;
}

#ui-canvas {
    pointer-events: none;
    z-index: 2;
}

#sidebar {
    position: absolute;
    top: 0;
    right: 0;
    width: 340px;
    height: 100vh;
    background: var(--hud-panel-bg, rgba(8, 12, 20, 0.94));
    border-left: 1px solid var(--hud-border, rgba(50, 180, 200, 0.15));
    display: flex;
    flex-direction: column;
    padding: 12px;
    z-index: 10;
    overflow-y: auto;
    box-shadow: -2px 0 20px var(--hud-accent-glow, rgba(0, 40, 60, 0.15));
}

#sidebar-header {
    border-bottom: 1px solid var(--hud-border, rgba(50, 180, 200, 0.15));
    padding-bottom: 10px;
    margin-bottom: 10px;
}

#sidebar-header h2 {
    font-size: 14px;
    letter-spacing: 3px;
    color: var(--hud-accent, #3a8a9a);
    margin-bottom: 8px;
    text-shadow: 0 0 8px var(--hud-accent-glow, rgba(50, 160, 180, 0.3));
}

#credits-display, #wave-display {
    font-size: 13px;
    margin-bottom: 4px;
}

#credits-value {
    color: var(--hud-credits, #d0c050);
    font-weight: bold;
    text-shadow: 0 0 6px var(--hud-accent-glow, rgba(200, 180, 60, 0.2));
}

#wave-value {
    color: var(--hud-wave, #50b8d0);
    font-weight: bold;
    text-shadow: 0 0 6px var(--hud-accent-glow, rgba(60, 180, 210, 0.2));
}

#shop {
    flex: 1;
    overflow-y: auto;
}

.shop-item {
    background: var(--hud-item-bg, rgba(12, 18, 32, 0.8));
    border: 1px solid var(--hud-border, rgba(50, 180, 200, 0.12));
    border-radius: 1px;
    padding: 8px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-size: 11px;
}

.shop-item:hover {
    border-color: var(--hud-border-hover, rgba(50, 180, 200, 0.35));
    box-shadow: 0 0 8px var(--hud-accent-glow, rgba(50, 180, 200, 0.08));
}

.shop-item.selected {
    border-color: var(--hud-border-hover, rgba(50, 200, 220, 0.6));
    background: var(--hud-item-bg, rgba(20, 40, 60, 0.8));
    box-shadow: 0 0 12px var(--hud-accent-glow, rgba(50, 180, 200, 0.12));
}

.shop-item.too-expensive {
    opacity: 0.4;
    cursor: not-allowed;
}

.shop-item .item-name {
    font-weight: bold;
    color: var(--hud-text-bright, #c0cce0);
    margin-bottom: 3px;
}

.shop-item .item-cost {
    color: var(--hud-credits, #d0c050);
    float: right;
}

.shop-item .item-category {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--hud-item-cat, #4a6878);
}

.shop-item .item-desc {
    color: var(--hud-item-desc, #708098);
    margin-top: 4px;
    line-height: 1.3;
}

#weapon-info {
    border-top: 1px solid var(--hud-border, rgba(50, 180, 200, 0.15));
    padding-top: 8px;
    margin-top: 8px;
    font-size: 11px;
    min-height: 60px;
}

#stacked-info {
    border-top: 1px solid var(--hud-border, rgba(50, 180, 200, 0.2));
    padding-top: 8px;
    margin-top: 8px;
    font-size: 11px;
}

#stacked-info.hidden {
    display: none;
}

#wave-controls {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--hud-border, rgba(50, 180, 200, 0.15));
}

#launch-wave-btn {
    width: 100%;
    padding: 10px;
    background: var(--hud-action-bg, rgba(20, 60, 50, 0.6));
    color: var(--hud-action, #40d080);
    border: 1px solid var(--hud-action-border, rgba(50, 200, 120, 0.3));
    border-radius: 1px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.15s;
    text-shadow: 0 0 8px var(--hud-accent-glow, rgba(60, 200, 100, 0.3));
}

#launch-wave-btn:hover {
    background: var(--hud-action-bg, rgba(30, 80, 60, 0.7));
    box-shadow: 0 0 15px var(--hud-accent-glow, rgba(50, 200, 120, 0.15));
}

#launch-wave-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Menu screen */
#menu-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-menu, radial-gradient(ellipse at center, #0c1020 0%, #040810 100%));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.menu-op-name {
    font-size: 46px;
    font-weight: bold;
    letter-spacing: 6px;
    color: var(--hud-alert, #e04040);
    margin-bottom: 10px;
    text-shadow: 0 0 12px rgba(220, 50, 50, 0.4), 0 0 30px rgba(220, 50, 50, 0.15);
}

#menu-screen h1 {
    font-size: 48px;
    letter-spacing: 8px;
    color: var(--hud-text-bright, #e8f0ff);
    text-align: center;
    line-height: 1.2;
    margin-bottom: 16px;
    text-shadow: 0 0 40px rgba(80, 120, 220, 0.3), 0 0 80px rgba(80, 120, 220, 0.1);
}

.subtitle {
    font-size: 13px;
    letter-spacing: 3px;
    color: var(--hud-body-text, #8090b0);
    margin-bottom: 40px;
    text-shadow: 0 0 10px rgba(80, 120, 220, 0.15);
}

/* Menu mode buttons */
.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.menu-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 36px;
    background: transparent;
    border: 1px solid rgba(80, 120, 220, 0.3);
    border-radius: 1px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Courier New', monospace;
    width: 380px;
}

.menu-btn:hover {
    background: rgba(40, 60, 140, 0.15);
    border-color: rgba(100, 140, 240, 0.6);
    box-shadow: 0 0 20px rgba(80, 120, 220, 0.15);
}

.menu-btn-primary {
    border-color: rgba(200, 60, 60, 0.4);
    border-width: 2px;
}

.menu-btn-primary:hover {
    border-color: rgba(220, 80, 80, 0.7);
    background: rgba(140, 40, 40, 0.15);
    box-shadow: 0 0 20px rgba(200, 60, 60, 0.15);
}

.menu-btn-primary .menu-btn-label {
    color: var(--hud-text-bright, #e8f0ff);
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 4px;
    text-shadow: 0 0 10px rgba(80, 120, 220, 0.3);
}

.menu-btn-secondary .menu-btn-label {
    color: var(--hud-body-text, #8098c0);
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 3px;
}

.menu-btn-desc {
    font-size: 10px;
    color: var(--hud-text-dim, #506080);
    margin-top: 4px;
    letter-spacing: 1px;
}

.menu-settings {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.settings-btn {
    padding: 8px 16px;
    background: transparent;
    color: var(--hud-text-dim, #506080);
    border: 1px solid var(--hud-border, rgba(80, 120, 220, 0.2));
    border-radius: 1px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.15s;
}

.settings-btn:hover {
    color: var(--hud-body-text, #8098c0);
    border-color: var(--hud-border-hover, rgba(80, 120, 220, 0.5));
    background: rgba(40, 60, 140, 0.1);
}

.settings-btn.active {
    color: var(--hud-warning, #e0b040);
    border-color: var(--hud-warning-border, rgba(220, 170, 50, 0.4));
}

#restart-btn {
    padding: 14px 40px;
    background: transparent;
    color: var(--hud-btn-text, #50b8d0);
    border: 1px solid var(--hud-btn-border, rgba(50, 180, 200, 0.3));
    border-radius: 1px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    letter-spacing: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

#restart-btn:hover {
    background: var(--hud-btn-bg, rgba(40, 100, 120, 0.2));
    border-color: var(--hud-border-hover, rgba(50, 200, 220, 0.6));
    box-shadow: 0 0 20px var(--hud-accent-glow, rgba(50, 180, 200, 0.15));
}

/* Game over screen */
#gameover-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 4, 4, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

#gameover-screen h1 {
    font-size: 36px;
    letter-spacing: 6px;
    color: var(--hud-alert, #e04040);
    margin-bottom: 24px;
    text-shadow: 0 0 30px rgba(220, 50, 50, 0.3);
}

#gameover-stats {
    font-size: 14px;
    line-height: 2;
    margin-bottom: 30px;
    text-align: center;
}

#gameover-stats .stat-label {
    color: var(--hud-text-dim, #5a6a80);
}

#gameover-stats .stat-value {
    color: var(--hud-text-bright, #c0cce0);
    font-weight: bold;
}


/* Strategic asset panel — left sidebar, mirrors right sidebar */
#asset-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: var(--hud-panel-bg, rgba(8, 12, 20, 0.94));
    border-right: 1px solid var(--hud-border, rgba(50, 180, 200, 0.15));
    display: flex;
    flex-direction: column;
    padding: 10px;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    color: var(--hud-body-text, #b0bcd0);
    z-index: 10;
    overflow-y: auto;
    box-shadow: 2px 0 20px var(--hud-accent-glow, rgba(0, 40, 60, 0.15));
}

.panel-title {
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
    color: var(--hud-accent, #3a8a9a);
    border-bottom: 1px solid var(--hud-border, rgba(50, 180, 200, 0.15));
    padding-bottom: 8px;
    margin-bottom: 8px;
    text-shadow: 0 0 8px var(--hud-accent-glow, rgba(50, 160, 180, 0.3));
}

#asset-panel .asset-section {
    margin-bottom: 8px;
}

#asset-panel .asset-header {
    color: var(--hud-accent, #4a7a8a);
    font-weight: bold;
    font-size: 10px;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

#asset-panel .asset-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
    color: var(--hud-item-desc, #708098);
}

#asset-panel .asset-count {
    color: var(--hud-text-bright, #b0c8e0);
    font-weight: bold;
}

#asset-panel .asset-transit {
    color: var(--hud-credits, #c0a840);
    font-size: 10px;
}

.asset-btn {
    background: var(--hud-btn-bg, rgba(12, 18, 32, 0.8));
    border: 1px solid var(--hud-btn-border, rgba(50, 180, 200, 0.2));
    color: var(--hud-btn-text, #50b8d0);
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 1px;
    font-size: 10px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-align: center;
    margin-top: 3px;
    transition: all 0.15s;
    width: 100%;
}

.asset-btn:hover {
    background: var(--hud-btn-bg, rgba(30, 60, 80, 0.5));
    border-color: var(--hud-border-hover, rgba(50, 200, 220, 0.5));
    box-shadow: 0 0 8px var(--hud-accent-glow, rgba(50, 180, 200, 0.1));
}

.asset-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.asset-btn.warning {
    border-color: var(--hud-warning-border, rgba(200, 140, 50, 0.4));
    color: var(--hud-warning, #d0a040);
}

/* Individual asset unit rows */
.asset-unit-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    padding: 3px 0;
    border-bottom: 1px solid var(--hud-border, rgba(50, 180, 200, 0.06));
    font-size: 10px;
}

.asset-unit-name {
    color: var(--hud-text-bright, #90a8c0);
    font-weight: bold;
    min-width: 68px;
}

.asset-unit-loc {
    font-weight: bold;
    min-width: 60px;
}

.asset-unit-detail {
    color: var(--hud-text-dim, #5a6a80);
    font-size: 9px;
    flex: 1;
}

.asset-req-btn {
    background: var(--hud-btn-bg, rgba(20, 35, 55, 0.6));
    border: 1px solid var(--hud-btn-border, rgba(50, 180, 200, 0.25));
    color: var(--hud-btn-text, #50b8d0);
    cursor: pointer;
    padding: 1px 6px;
    border-radius: 1px;
    font-size: 9px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    transition: all 0.15s;
}

.asset-req-btn:hover {
    background: var(--hud-btn-bg, rgba(40, 60, 90, 0.6));
    border-color: var(--hud-border-hover, rgba(50, 200, 220, 0.5));
}

.asset-req-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.return-pacific-btn {
    background: rgba(20, 16, 32, 0.8);
    border: 1px solid rgba(120, 80, 200, 0.3);
    color: var(--hud-btn-text, #9070c0);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 1px;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-align: center;
    margin-top: 6px;
    width: 100%;
}

.return-pacific-btn:hover {
    background: rgba(80, 50, 130, 0.15);
    border-color: rgba(140, 100, 220, 0.5);
}

/* Home Command bottom panel */
#ct-panel {
    position: absolute;
    bottom: 0;
    left: 260px;
    right: 340px;
    height: 120px;
    background: var(--hud-panel-bg, rgba(8, 12, 20, 0.94));
    border-top: 1px solid var(--hud-border, rgba(50, 180, 200, 0.15));
    display: flex;
    flex-direction: column;
    padding: 0;
    z-index: 10;
    overflow: visible;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: var(--hud-body-text, #b0bcd0);
    box-shadow: 0 -2px 20px var(--hud-accent-glow, rgba(0, 40, 60, 0.15));
}

/* Life bar row — top of HOME COMMAND panel */
.life-bar-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 3px;
    border-bottom: 1px solid var(--hud-border, rgba(50, 180, 200, 0.08));
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
}

.home-command-title {
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 2px;
    color: var(--hud-accent, #3a8a9a);
    white-space: nowrap;
    display: flex;
    align-items: center;
    text-shadow: 0 0 8px var(--hud-accent-glow, rgba(50, 160, 180, 0.3));
}

.life-bar {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1 1 0%;
    min-width: 0;
    overflow: hidden;
}

.life-bar-label {
    font-size: 7px;
    font-weight: bold;
    letter-spacing: 0.5px;
    color: var(--hud-accent, #4a7a8a);
    display: flex;
    justify-content: space-between;
    white-space: nowrap;
    overflow: hidden;
}

.life-bar-label .life-pct {
    color: var(--hud-text-bright, #b0c8e0);
}

.life-bar-track {
    height: 8px;
    background: var(--hud-item-bg, rgba(12, 18, 32, 0.8));
    border: 1px solid var(--hud-border, rgba(50, 180, 200, 0.12));
    border-radius: 1px;
    overflow: hidden;
}

.life-bar-fill {
    height: 100%;
    border-radius: 0;
    transition: width 0.3s ease;
}

/* CT controls row — bottom of HOME COMMAND panel */
.ct-controls-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 4px 12px 6px;
    flex: 1;
    overflow: visible;
}

.ct-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    white-space: nowrap;
}

/* Offensive operations two-column container */
.ops-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.ops-title {
    font-size: 9px;
    font-weight: bold;
    letter-spacing: 2px;
    color: var(--hud-accent, #3a8a9a);
    text-shadow: 0 0 6px var(--hud-accent-glow, rgba(50, 160, 180, 0.2));
}

.ops-columns {
    display: flex;
    gap: 0;
    flex: 1;
    min-width: 0;
}

.ops-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 50%;
    min-width: 0;
    white-space: nowrap;
}

.ops-divider {
    width: 1px;
    background: var(--hud-border, rgba(50, 180, 200, 0.15));
    align-self: stretch;
    margin: 0 6px;
}

.ct-label {
    font-size: 9px;
    font-weight: bold;
    letter-spacing: 1px;
    color: var(--hud-accent, #4a7a8a);
}

.ct-value {
    color: var(--hud-text-bright, #b0c8e0);
    font-weight: bold;
    font-size: 11px;
}

.ct-btn {
    background: var(--hud-btn-bg, rgba(12, 18, 32, 0.8));
    border: 1px solid var(--hud-btn-border, rgba(50, 180, 200, 0.2));
    color: var(--hud-btn-text, #50b8d0);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 1px;
    font-size: 9px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    transition: all 0.15s;
    width: auto;
}

.ct-btn:hover {
    background: var(--hud-btn-bg, rgba(30, 60, 80, 0.5));
    border-color: var(--hud-border-hover, rgba(50, 200, 220, 0.5));
    box-shadow: 0 0 8px var(--hud-accent-glow, rgba(50, 180, 200, 0.1));
}

.ct-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.ct-btn.warning {
    border-color: var(--hud-warning-border, rgba(200, 140, 50, 0.4));
    color: var(--hud-warning, #d0a040);
}

.ct-btn[data-tooltip] {
    position: relative;
}

.ct-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--hud-tooltip-bg, #0a1420);
    color: var(--hud-tooltip-text, #90b0c8);
    border: 1px solid var(--hud-btn-border, rgba(50, 180, 200, 0.25));
    padding: 4px 8px;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    max-width: 250px;
    white-space: normal;
    line-height: 1.3;
    text-align: left;
    pointer-events: none;
    z-index: 9998;
    box-shadow: 0 0 12px var(--hud-accent-glow, rgba(0, 40, 60, 0.3));
}

/* Briefing screen */
#briefing-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-menu, radial-gradient(ellipse at center, #0c1020 0%, #040810 100%));
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 100;
    overflow-y: auto;
    padding: 30px 40px;
}

.briefing-title {
    font-size: 24px;
    letter-spacing: 6px;
    color: var(--hud-text-bright, #e8f0ff);
    margin-bottom: 16px;
    text-shadow: 0 0 30px rgba(80, 120, 220, 0.3), 0 0 60px rgba(80, 120, 220, 0.1);
}

.briefing-scenario {
    max-width: 700px;
    text-align: center;
    font-size: 13px;
    line-height: 1.7;
    color: var(--hud-body-text, #8090b0);
    margin-bottom: 24px;
}

#commence-btn {
    padding: 14px 40px;
    background: rgba(140, 40, 40, 0.3);
    color: var(--hud-text-bright, #e8f0ff);
    border: 2px solid rgba(200, 60, 60, 0.5);
    border-radius: 1px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    letter-spacing: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 24px;
    text-shadow: 0 0 10px rgba(80, 120, 220, 0.3);
}

#commence-btn:hover {
    background: rgba(160, 50, 50, 0.4);
    border-color: rgba(220, 80, 80, 0.7);
    box-shadow: 0 0 20px rgba(200, 60, 60, 0.2);
}

.briefing-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 2px;
    width: 100%;
    max-width: 900px;
    justify-content: center;
}

.briefing-tab {
    padding: 12px 28px;
    background: rgba(10, 16, 28, 0.5);
    border: 1px solid rgba(80, 120, 220, 0.1);
    border-bottom: none;
    border-radius: 1px 1px 0 0;
    color: var(--hud-text-dim, #4a5a70);
    font-family: 'Courier New', monospace;
    font-size: 13px;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all 0.15s;
    flex: 1;
    text-align: center;
}

.briefing-tab:hover {
    color: var(--hud-body-text, #8090b0);
    background: rgba(16, 24, 44, 0.6);
}

.briefing-tab.active {
    color: var(--hud-text-bright, #e8f0ff);
    background: rgba(16, 24, 44, 0.8);
    border-color: rgba(80, 120, 220, 0.35);
    text-shadow: 0 0 8px rgba(80, 120, 220, 0.2);
}

.briefing-tab-content {
    display: none;
    width: 100%;
    max-width: 900px;
    background: rgba(16, 24, 44, 0.8);
    border: 1px solid rgba(80, 120, 220, 0.2);
    border-radius: 0 1px 1px 1px;
    padding: 16px;
    font-size: 11px;
    line-height: 1.7;
    color: var(--hud-body-text, #8090b0);
    margin-bottom: 6px;
}

.briefing-tab-content.active {
    display: block;
}

.briefing-summary {
    list-style: none;
    font-size: 12px;
    line-height: 1.9;
    color: var(--hud-body-text, #8090b0);
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(80, 120, 220, 0.1);
}

.briefing-summary li::before {
    content: '\25B8 ';
    color: var(--hud-briefing-accent, #c04040);
}

.briefing-summary li strong {
    color: var(--hud-text-bright, #e8f0ff);
}

.briefing-tab-content h4 {
    color: var(--hud-briefing-accent, #c04040);
    font-size: 11px;
    letter-spacing: 1px;
    margin: 10px 0 4px;
}

.briefing-tab-content h4:first-child {
    margin-top: 0;
}

.briefing-tab-content p {
    margin-bottom: 6px;
}

.briefing-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.briefing-detail-item {
    background: rgba(8, 12, 24, 0.6);
    border: 1px solid rgba(80, 120, 220, 0.1);
    border-radius: 1px;
    padding: 8px;
}

.briefing-detail-item .detail-name {
    color: var(--hud-text-bright, #e8f0ff);
    font-weight: bold;
    margin-bottom: 2px;
}

.briefing-detail-item .detail-desc {
    color: var(--hud-text-dim, #607090);
    font-size: 10px;
}

/* Breaking news overlay */
#news-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    z-index: 101;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.news-panel {
    display: flex;
    flex-direction: row;
    max-width: 700px;
    background: var(--hud-panel-bg, rgba(8, 12, 20, 0.95));
    border: 1px solid var(--hud-border-hover, rgba(50, 180, 200, 0.4));
    box-shadow: 0 0 30px var(--hud-accent-glow, rgba(50, 180, 200, 0.15)), 0 0 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

#news-image {
    width: 320px;
    min-height: 200px;
    object-fit: cover;
    flex-shrink: 0;
}

.news-text {
    display: flex;
    flex-direction: column;
    padding: 0;
    min-width: 0;
}

.news-ticker {
    background: var(--hud-alert, #c0392b);
    color: var(--bg-page, #fff);
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 3px;
    padding: 6px 14px;
}

#news-headline {
    font-family: 'Courier New', monospace;
    font-size: 20px;
    font-weight: bold;
    color: var(--hud-text-bright, #e0e8f0);
    padding: 14px 14px 8px;
    line-height: 1.3;
    text-shadow: 0 0 10px var(--hud-accent-glow, rgba(200, 220, 240, 0.2));
}

#news-subtext {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--hud-item-desc, #708098);
    padding: 0 14px 14px;
    line-height: 1.5;
}

/* After Action Report overlay */
#aar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.80);
    z-index: 102;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#aar-content {
    max-width: 520px;
    width: 90%;
    background: var(--hud-panel-bg, rgba(8, 12, 20, 0.95));
    border: 1px solid var(--hud-border-hover, rgba(50, 180, 200, 0.4));
    box-shadow: 0 0 30px var(--hud-accent-glow, rgba(50, 180, 200, 0.15)), 0 0 60px rgba(0, 0, 0, 0.5);
    padding: 20px 24px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--hud-body-text, #b0bcd0);
    line-height: 1.6;
}

.aar-title {
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 3px;
    color: var(--hud-text-bright, #e8f0ff);
    text-align: center;
    margin-bottom: 8px;
    text-shadow: 0 0 12px var(--hud-accent-glow, rgba(50, 180, 200, 0.3));
}

.aar-divider {
    height: 1px;
    background: var(--hud-border, rgba(50, 180, 200, 0.2));
    margin: 8px 0;
}

.aar-section-title {
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 2px;
    color: var(--hud-accent, #3a8a9a);
    margin-bottom: 4px;
    text-shadow: 0 0 6px var(--hud-accent-glow, rgba(50, 160, 180, 0.2));
}

.aar-line {
    padding: 1px 0 1px 8px;
}

.aar-label {
    color: var(--hud-text-bright, #90a8c0);
}

.aar-dots {
    color: var(--hud-text-dim, #2a3a4a);
    letter-spacing: 1px;
}

.aar-value {
    font-weight: bold;
}

.aar-muted {
    color: var(--hud-text-dim, #5a6a80);
}

.aar-none {
    color: var(--hud-text-dim, #4a5a6a);
    font-style: italic;
}

.aar-footer {
    text-align: center;
    margin-top: 14px;
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--hud-accent, #4a7a8a);
    text-shadow: 0 0 6px var(--hud-accent-glow, rgba(50, 160, 180, 0.2));
}

/* Strike video overlay */
#strike-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 103;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#strike-panel {
    background: var(--bg-page, #0c1020);
    border: 2px solid var(--hud-action, #40e040);
    border-radius: 8px;
    padding: 20px;
    max-width: 640px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 30px rgba(64, 224, 64, 0.3);
}

#strike-header {
    font-family: monospace;
    font-size: 22px;
    font-weight: bold;
    color: var(--hud-action, #40e040);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
    text-shadow: 0 0 10px rgba(64, 224, 64, 0.5);
}

#strike-details {
    font-family: monospace;
    font-size: 13px;
    color: var(--hud-body-text, #b0d0b0);
    margin-bottom: 16px;
    line-height: 1.6;
}

#strike-video {
    width: 100%;
    border-radius: 4px;
    border: 1px solid var(--hud-border, #2a4a2a);
    background: #000;
}

#strike-dismiss {
    font-family: monospace;
    font-size: 12px;
    color: var(--hud-text-dim, #4a7a4a);
    margin-top: 12px;
    letter-spacing: 1px;
}

/* News Ticker Bar */
#ticker-bar {
    position: absolute;
    left: 260px;
    right: 340px;
    bottom: 120px;
    height: 24px;
    overflow: hidden;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.85);
    border-top: 1px solid var(--hud-border, rgba(50, 180, 200, 0.15));
    border-bottom: 1px solid var(--hud-border, rgba(50, 180, 200, 0.15));
    font-family: 'Courier New', monospace;
    font-size: 11px;
    line-height: 24px;
    z-index: 11;
    transition: opacity 0.3s;
}

#ticker-track {
    display: inline-block;
    white-space: nowrap;
    will-change: transform;
}

.ticker-item {
    color: var(--hud-body-text, #b0bcd0);
}

.ticker-war {
    color: var(--hud-text-bright, #e8f0ff);
    font-weight: bold;
}

.ticker-global {
    color: var(--hud-action, #40d080);
}

.ticker-commentary {
    color: var(--hud-action, #40d080);
}

.ticker-colour {
    color: var(--hud-text-dim, #5a6a8a);
}

.ticker-journalism {
    color: var(--hud-warning, #e0b040);
    font-weight: bold;
}

.ticker-sep {
    color: var(--hud-text-dim, #3a4a6a);
    padding: 0 6px;
}

/* Trading Console Overlay */
#trading-console {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 102;
    background: rgba(0, 0, 0, 0.80);
    display: flex;
    align-items: center;
    justify-content: center;
}

#trading-panel {
    width: 90%;
    max-width: 900px;
    max-height: 80vh;
    background: var(--hud-panel-bg, rgba(4, 8, 16, 0.97));
    border: 1px solid var(--hud-border-hover, rgba(50, 180, 200, 0.4));
    box-shadow: 0 0 40px rgba(0, 40, 60, 0.3), 0 0 80px rgba(0, 0, 0, 0.5);
    font-family: 'Courier New', monospace;
    color: var(--hud-body-text, #b0bcd0);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.trading-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--hud-border, rgba(50, 180, 200, 0.2));
    background: rgba(0, 4, 12, 0.5);
}

.trading-title {
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 3px;
    color: var(--hud-action, #40d080);
    text-shadow: 0 0 8px rgba(64, 208, 128, 0.3);
}

#trading-close {
    background: none;
    border: 1px solid var(--hud-border, rgba(50, 180, 200, 0.2));
    color: var(--hud-text-dim, #5a6a8a);
    font-size: 18px;
    cursor: pointer;
    padding: 0 8px;
    line-height: 1;
    font-family: 'Courier New', monospace;
}

#trading-close:hover {
    color: var(--hud-text-bright, #e8f0ff);
    border-color: var(--hud-border-hover, rgba(50, 200, 220, 0.5));
}

.trading-body {
    display: flex;
    gap: 1px;
    flex: 1;
    overflow-y: auto;
    background: var(--hud-border, rgba(50, 180, 200, 0.1));
}

.trading-col {
    flex: 1;
    padding: 12px;
    background: var(--hud-panel-bg, rgba(4, 8, 16, 0.97));
    min-width: 0;
}

.trading-charts {
    flex: 0.9;
}

.trading-trade {
    flex: 1;
    border-left: 1px solid var(--hud-border, rgba(50, 180, 200, 0.15));
    border-right: 1px solid var(--hud-border, rgba(50, 180, 200, 0.15));
}

.trading-intel {
    flex: 0.9;
}

/* Charts */
.chart-section {
    margin-bottom: 10px;
}

.chart-header {
    font-size: 10px;
    margin-bottom: 3px;
    display: flex;
    gap: 8px;
    align-items: baseline;
}

.chart-asset {
    color: var(--hud-text-bright, #e8f0ff);
    font-weight: bold;
    letter-spacing: 1px;
}

.chart-price {
    color: var(--hud-body-text, #b0bcd0);
}

.chart-pct {
    font-weight: bold;
}

.chart-section canvas {
    width: 100%;
    height: 50px;
    border: 1px solid var(--hud-border, rgba(50, 180, 200, 0.1));
    background: rgba(0, 4, 12, 0.5);
}

/* Trade panel */
.trade-row {
    margin-bottom: 8px;
}

.trade-row label {
    display: block;
    font-size: 9px;
    letter-spacing: 1px;
    color: var(--hud-accent, #3a8a9a);
    margin-bottom: 3px;
    font-weight: bold;
}

.trade-btns {
    display: flex;
    gap: 4px;
}

.trade-btn {
    flex: 1;
    padding: 5px 0;
    background: var(--hud-btn-bg, rgba(12, 18, 32, 0.8));
    border: 1px solid var(--hud-btn-border, rgba(50, 180, 200, 0.2));
    color: var(--hud-btn-text, #50b8d0);
    font-family: 'Courier New', monospace;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.trade-btn:hover {
    border-color: var(--hud-border-hover, rgba(50, 200, 220, 0.5));
}

.trade-btn.selected {
    background: var(--hud-action-bg, rgba(20, 60, 50, 0.6));
    border-color: var(--hud-action-border, rgba(50, 200, 120, 0.3));
    color: var(--hud-action, #40d080);
}

#trade-amount {
    width: 100%;
    padding: 5px 8px;
    background: var(--hud-btn-bg, rgba(12, 18, 32, 0.8));
    border: 1px solid var(--hud-btn-border, rgba(50, 180, 200, 0.2));
    color: var(--hud-text-bright, #e8f0ff);
    font-family: 'Courier New', monospace;
    font-size: 12px;
    outline: none;
}

#trade-amount:focus {
    border-color: var(--hud-border-hover, rgba(50, 200, 220, 0.5));
}

.trade-warnings {
    font-size: 10px;
    color: var(--hud-warning, #e0b040);
    min-height: 14px;
    margin-bottom: 6px;
}

.trade-exec-btn {
    width: 100%;
    padding: 8px;
    background: var(--hud-action-bg, rgba(20, 60, 50, 0.6));
    color: var(--hud-action, #40d080);
    border: 1px solid var(--hud-action-border, rgba(50, 200, 120, 0.3));
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.15s;
}

.trade-exec-btn:hover {
    background: var(--hud-action-bg, rgba(30, 80, 60, 0.7));
    box-shadow: 0 0 12px rgba(50, 200, 120, 0.15);
}

.trade-available {
    font-size: 10px;
    color: var(--hud-text-dim, #5a6a8a);
    margin-top: 6px;
    text-align: center;
}

/* Intel panel */
.intel-section {
    margin-bottom: 12px;
}

.intel-title {
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 2px;
    color: var(--hud-accent, #3a8a9a);
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--hud-border, rgba(50, 180, 200, 0.15));
}

.position-row {
    font-size: 10px;
    padding: 4px 0;
    border-bottom: 1px solid var(--hud-border, rgba(50, 180, 200, 0.06));
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.position-info {
    color: var(--hud-text-bright, #b0c8e0);
}

.position-pnl {
    font-weight: bold;
}

.position-close-btn {
    background: var(--hud-btn-bg, rgba(12, 18, 32, 0.8));
    border: 1px solid rgba(200, 60, 60, 0.3);
    color: var(--hud-alert, #e04040);
    font-family: 'Courier New', monospace;
    font-size: 9px;
    padding: 1px 6px;
    cursor: pointer;
    margin-left: 6px;
}

.position-close-btn:hover {
    border-color: rgba(220, 80, 80, 0.6);
    background: rgba(60, 10, 10, 0.5);
}

.intel-item {
    font-size: 10px;
    color: var(--hud-text-dim, #5a6a8a);
    padding: 2px 0;
    border-bottom: 1px solid var(--hud-border, rgba(50, 180, 200, 0.04));
    line-height: 1.4;
}

/* ===== PRO MODE ===== */

.menu-pro {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    align-items: center;
}

.pro-btn {
    color: var(--hud-warning, #e0b040);
    border-color: var(--hud-warning-border, rgba(220, 170, 50, 0.4));
}

.pro-btn:hover {
    color: var(--hud-warning, #e0b040);
    border-color: var(--hud-warning, #e0b040);
    background: rgba(220, 170, 50, 0.1);
}

.pro-btn.pro-active {
    color: var(--hud-text, #8098c0);
    border-color: var(--hud-border, rgba(50, 180, 200, 0.15));
}

.restore-btn {
    font-size: 10px;
    padding: 6px 10px;
}

#restore-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
}

.restore-panel {
    background: var(--bg-menu, #0a0e1a);
    border: 1px solid var(--hud-border, rgba(50, 180, 200, 0.15));
    padding: 24px 32px;
    text-align: center;
    max-width: 340px;
    width: 90%;
}

.restore-header {
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 2px;
    color: var(--hud-text, #8098c0);
    margin-bottom: 12px;
}

.restore-desc {
    font-size: 11px;
    color: var(--hud-text-dim, #506080);
    margin-bottom: 16px;
}

#restore-email {
    width: 100%;
    padding: 8px 10px;
    background: rgba(20, 30, 60, 0.6);
    border: 1px solid var(--hud-border, rgba(50, 180, 200, 0.15));
    color: var(--hud-text, #8098c0);
    font-family: inherit;
    font-size: 12px;
    box-sizing: border-box;
    outline: none;
}

#restore-email:focus {
    border-color: var(--hud-border-hover, rgba(80, 120, 220, 0.5));
}

.restore-error {
    font-size: 10px;
    color: var(--hud-alert, #ff4444);
    min-height: 16px;
    margin: 8px 0;
}

.restore-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 8px;
}

.hidden {
    display: none !important;
}
