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

:root {
    --bg-dark: #0a0e17;
    --bg-panel: rgba(15, 23, 42, 0.88);
    --bg-glass: rgba(30, 41, 69, 0.7);
    --border-glass: rgba(100, 140, 200, 0.2);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-accent: #38bdf8;
    --gold: #fbbf24;
    --green: #4ade80;
    --red: #f87171;
    --blue: #60a5fa;
    --font-ui: 'Rajdhani', sans-serif;
    --font-title: 'Orbitron', sans-serif;
}

html, body {
    width: 100%; height: 100%;
    overflow: hidden;
    background: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-ui);
    cursor: default;
}

canvas#gameCanvas {
    display: block;
    width: 100%; height: 100%;
    position: fixed; top: 0; left: 0;
}

/* ═══════════════════════════════════════════
   Start Screen
═══════════════════════════════════════════ */
#startScreen {
    position: fixed; inset: 0;
    background: linear-gradient(135deg, #060a14 0%, #0f172a 50%, #060a14 100%);
    display: flex; align-items: center; justify-content: center;
    z-index: 2000;
}
#startScreen.hidden { display: none; }

.start-content {
    text-align: center;
    padding: 30px 36px;
    background: var(--bg-panel);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    min-width: 520px;
    max-width: 620px;
}

.start-grid {
    display: flex; gap: 24px; text-align: left; margin: 1rem 0;
}
.start-left { flex: 1; min-width: 200px; }
.start-right { flex: 1; min-width: 200px; display: flex; flex-direction: column; }

.start-subtitle {
    color: var(--text-secondary);
    font-size: 0.85rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    margin-top: -1rem;
}

.start-setting {
    margin: 0.8rem 0;
}

.start-setting label {
    display: block;
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.start-setting label strong {
    color: var(--text-accent);
    font-size: 1.4rem;
    font-family: var(--font-title);
}

.start-slider {
    width: 100%;
    accent-color: var(--text-accent);
    height: 4px;
    cursor: pointer;
}

.start-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.start-btn {
    margin-top: 1.5rem;
    padding: 12px 32px;
    font-size: 1rem;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
}

/* Start screen inputs */
.start-input {
    width: 100%; box-sizing: border-box; padding: 8px 12px;
    background: rgba(15, 23, 42, 0.6); border: 1px solid var(--border-glass);
    border-radius: 6px; color: var(--text-primary); font-size: 0.9rem;
    font-family: var(--font-body); outline: none;
}
.start-input:focus { border-color: var(--text-accent); }
.start-input::placeholder { color: var(--text-secondary); opacity: 0.6; }

.flag-picker, .color-picker {
    display: flex; flex-wrap: wrap; gap: 5px; justify-content: center;
}
.flag-picker {
    max-width: 260px; max-height: 220px; overflow-y: auto;
}
.flag-picker .fp-btn {
    width: 38px; height: 26px; padding: 2px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(15, 23, 42, 0.5);
    border: 2px solid transparent; border-radius: 4px; cursor: pointer;
    transition: border-color 0.15s, transform 0.15s;
    overflow: hidden;
}
.flag-picker .fp-btn:hover { transform: scale(1.15); }
.flag-picker .fp-btn.selected { border-color: var(--text-accent); background: rgba(56, 189, 248, 0.15); }

.color-picker .cp-btn {
    width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
    border: 2px solid transparent; transition: transform 0.15s, border-color 0.15s;
}
.color-picker .cp-btn:hover { transform: scale(1.2); }
.color-picker .cp-btn.selected { border-color: #fff; box-shadow: 0 0 8px rgba(255,255,255,0.5); }

/* Spawn Selection Screen */
#spawnScreen {
    position: fixed; inset: 0; z-index: 1500; background: #0a0f1e;
}
#spawnScreen.hidden { display: none; }
#spawnCanvas { width: 100%; height: 100%; display: block; cursor: crosshair; }
.spawn-overlay {
    position: absolute; top: 0; left: 0; right: 0;
    display: flex; justify-content: center; padding-top: 20px;
    pointer-events: none;
}
.spawn-prompt {
    background: rgba(15, 23, 42, 0.9); border: 1px solid var(--border-glass);
    border-radius: 10px; padding: 12px 24px; font-size: 1rem;
    color: var(--text-primary); font-family: var(--font-body);
    letter-spacing: 1px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    animation: spawn-pulse 2s ease-in-out infinite;
}
@keyframes spawn-pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* ═══════════════════════════════════════════
   Loading Screen
═══════════════════════════════════════════ */
#loadingScreen {
    position: fixed; inset: 0;
    background: var(--bg-dark);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
    transition: opacity 0.8s ease;
}
#loadingScreen.hidden { opacity: 0; pointer-events: none; }

.loader-title {
    font-family: var(--font-title);
    font-size: 3rem;
    background: linear-gradient(135deg, var(--text-accent), var(--blue), #a78bfa);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    margin-bottom: 2rem; text-align: center;
    animation: pulse-glow 2s ease-in-out infinite;
}
@keyframes pulse-glow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.3); } }

.loader-bar {
    width: 320px; height: 6px;
    background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden;
}
.loader-fill {
    width: 0%; height: 100%;
    background: linear-gradient(90deg, var(--text-accent), var(--blue), #a78bfa);
    border-radius: 3px;
    transition: width 0.15s ease-out;
}
.loader-text {
    margin-top: 1rem; color: var(--text-secondary);
    font-size: 0.85rem; text-align: center;
}
.loader-percent {
    margin-top: 0.4rem; color: var(--text-accent);
    font-size: 1.1rem; text-align: center;
    font-family: var(--font-title);
    letter-spacing: 2px;
}

/* ═══════════════════════════════════════════
   Top HUD Bar
═══════════════════════════════════════════ */
#topBar {
    position: fixed; top: 0; left: 50%; transform: translateX(-50%);
    display: flex; gap: 1px; background: var(--border-glass);
    border-radius: 0 0 12px 12px; z-index: 10;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.resource {
    display: flex; align-items: center; gap: 5px;
    padding: 6px 12px; background: var(--bg-panel);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-weight: 600; font-size: 0.85rem;
}
.resource:first-child { border-radius: 0 0 0 12px; }
.resource:last-child { border-radius: 0 0 12px 0; }
.resource .icon { font-size: 0.9rem; }
.resource .value { color: var(--text-accent); font-family: var(--font-title); font-size: 0.85rem; }
.resource .sep { color: var(--text-secondary); font-size: 0.75rem; }
.resource .rate { font-size: 0.7rem; color: var(--green); margin-left: 2px; }
.resource .rate.negative { color: var(--red); }

/* HUD Tooltips (gold/pop breakdown on hover) */
.resource { position: relative; }
.hud-tooltip {
    display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    min-width: 240px; padding: 10px 12px; margin-top: 6px;
    background: rgba(15, 23, 42, 0.95); border: 1px solid var(--border-glass);
    border-radius: 8px; z-index: 500; pointer-events: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    font-size: 0.75rem; color: var(--text-primary);
}
.resource:hover .hud-tooltip { display: block; }
.hud-tt-title { font-weight: 700; font-size: 0.8rem; margin-bottom: 8px; }
.hud-tt-section { margin-bottom: 6px; }
.hud-tt-label {
    font-size: 0.6rem; text-transform: uppercase; letter-spacing: 1.5px;
    color: var(--text-secondary); margin-bottom: 3px;
}
.hud-tt-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1px 0; gap: 12px;
}
.hud-tt-val { font-family: var(--font-title); white-space: nowrap; }
.hud-tt-val.positive { color: var(--green); }
.hud-tt-val.negative { color: var(--red); }
.hud-tt-divider { border-top: 1px solid var(--border-glass); margin: 6px 0; }
.hud-tt-total { font-weight: 700; font-size: 0.8rem; }
.hud-tt-wfr { font-size: 0.7rem; color: var(--text-secondary); }
.hud-tt-wfr .hud-tt-val { color: var(--gold); }

/* Leaderboard tooltip */
.leaderboard-tooltip { min-width: 380px; pointer-events: auto !important; }
.lb-table { width: 100%; border-collapse: collapse; font-size: 0.7rem; }
.lb-table th { text-align: left; color: var(--text-secondary); font-weight: 600; padding: 2px 4px; font-size: 0.65rem; text-transform: uppercase; border-bottom: 1px solid var(--border-glass); }
.lb-table th:not(:nth-child(2)) { text-align: right; }
.lb-table td { padding: 3px 4px; white-space: nowrap; }
.lb-table td:not(:nth-child(2)) { text-align: right; font-family: var(--font-title); }
.lb-table tr.lb-self { background: rgba(56, 189, 248, 0.12); }
.lb-table tr.lb-ally td:nth-child(2) { color: var(--green); }
.lb-table tr.lb-enemy td:nth-child(2) { color: var(--red); }
.lb-table tr:hover { background: rgba(255,255,255,0.06); }
.lb-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 2px; vertical-align: middle; }
/* Nation detail row (shown on hover) */
.lb-detail { display: none; }
.lb-table tr:hover + .lb-detail { display: table-row; }
.lb-detail td { padding: 2px 4px 6px; font-size: 0.62rem; color: var(--text-secondary); border-bottom: 1px solid rgba(255,255,255,0.05); }

/* Map Nation Hover Tooltip */
.map-nation-tooltip {
    position: fixed; z-index: 300; pointer-events: none;
    min-width: 200px; max-width: 260px; padding: 10px 12px;
    background: rgba(15, 23, 42, 0.95); border: 1px solid var(--border-glass);
    border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    font-size: 0.72rem; color: var(--text-primary);
    transition: transform 0.1s ease;
}
.mnt-header {
    display: flex; align-items: center; gap: 6px;
    font-weight: 700; font-size: 0.8rem; margin-bottom: 4px;
}
.mnt-dot {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 10px; min-height: 10px;
    border-radius: 3px; flex-shrink: 0;
}
.mnt-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mnt-relation { font-size: 0.65rem; font-weight: 600; flex-shrink: 0; }
.mnt-divider { border-top: 1px solid var(--border-glass); margin: 5px 0; }
.mnt-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.5px 0; gap: 12px;
}
.mnt-val { font-family: var(--font-title); white-space: nowrap; }
.mnt-val.positive { color: var(--green); }
.mnt-val.negative { color: var(--red); }

/* ═══════════════════════════════════════════
   Panel Containers (flexbox layout)
═══════════════════════════════════════════ */
.left-panels {
    position: fixed; left: 10px; top: 46px; bottom: 12px;
    display: flex; flex-direction: column; gap: 0;
    width: 185px; z-index: 10;
    overflow-y: auto; scrollbar-width: thin;
    pointer-events: none;
}
.left-panels > * { pointer-events: auto; }
.left-panels::-webkit-scrollbar { width: 3px; }
.left-panels::-webkit-scrollbar-thumb { background: var(--border-glass); border-radius: 3px; }

.right-panels {
    position: fixed; right: 10px; top: 46px; bottom: 200px;
    display: flex; flex-direction: column; gap: 6px;
    width: 190px; z-index: 10;
    overflow-y: auto; scrollbar-width: thin;
    pointer-events: none;
}
.right-panels > * { pointer-events: auto; }
.right-panels::-webkit-scrollbar { width: 3px; }
.right-panels::-webkit-scrollbar-thumb { background: var(--border-glass); border-radius: 3px; }

/* ═══════════════════════════════════════════
   Side Panels & Collapsible Sections
═══════════════════════════════════════════ */
.side-panel {
    width: 100%; padding: 0;
    background: var(--bg-panel); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass); border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    overflow: hidden;
    flex-shrink: 1;
    pointer-events: auto;
}
.side-panel::-webkit-scrollbar { width: 3px; }
.side-panel::-webkit-scrollbar-thumb { background: var(--border-glass); border-radius: 3px; }

/* Unified left panel with sections */
.left-unified { border-radius: 10px; overflow: visible; }
.left-unified .panel-section { border-bottom: 1px solid var(--border-glass); }
.left-unified .panel-section:last-child { border-bottom: none; }

.panel-header {
    font-family: var(--font-title); font-size: 0.65rem; letter-spacing: 2px;
    color: var(--text-accent); text-transform: uppercase;
    padding: 8px 10px; margin: 0; cursor: pointer;
    display: flex; align-items: center; gap: 4px;
    -webkit-user-select: none; user-select: none; transition: background 0.2s;
}
.panel-header:hover { background: rgba(56,189,248,0.06); }
.toggle-arrow { margin-left: auto; font-size: 0.6rem; color: var(--text-secondary); transition: transform 0.2s; }

.panel-body { padding: 0 10px 8px; max-height: 300px; overflow-y: auto; }
.panel-body::-webkit-scrollbar { width: 3px; }
.panel-body::-webkit-scrollbar-thumb { background: var(--border-glass); border-radius: 3px; }
.panel-body.collapsed { display: none; }

#frontLinesPanel .panel-body { max-height: 160px; }
#diplomacyPanel .panel-body { max-height: 200px; }
#eventFeedPanel .panel-body { max-height: 180px; }
#armyBody { max-height: 150px; }
#navyBody { max-height: 120px; }

/* Military summary row */
.mil-summary {
    display: flex; gap: 10px; margin-bottom: 6px;
}
.mil-stat {
    display: flex; align-items: center; gap: 4px; font-size: 0.75rem;
}
.mil-stat-label { color: var(--text-secondary); font-size: 0.65rem; text-transform: uppercase; }
.mil-btn-row {
    display: flex; gap: 4px; margin-top: 4px;
}
.sm-btn {
    flex: 1; padding: 4px 6px; font-size: 0.68rem;
    background: var(--bg-glass); border: 1px solid var(--border-glass);
    border-radius: 5px; color: var(--text-primary); cursor: pointer;
    font-family: var(--font-ui); transition: all 0.2s; text-align: center;
}
.sm-btn:hover { background: rgba(56,189,248,0.15); border-color: var(--text-accent); }
.sm-btn.accent { background: linear-gradient(135deg, #064e3b, #059669); border-color: transparent; color: white; }
.sm-btn.accent:hover { filter: brightness(1.2); }
.mil-controls { margin: 6px 0; }
.mil-controls.hidden { display: none; }

/* ═══════════════════════════════════════════
   Event Feed
═══════════════════════════════════════════ */
#eventFeed {
    display: flex; flex-direction: column; gap: 2px;
}
.event-item {
    font-size: 0.65rem; padding: 3px 6px; border-radius: 4px;
    color: var(--text-secondary); cursor: pointer;
    transition: background 0.15s; line-height: 1.3;
    border-left: 2px solid transparent;
}
.event-item:hover { background: rgba(255,255,255,0.05); }
.event-item .event-time { color: var(--text-secondary); opacity: 0.6; margin-right: 4px; }
.event-item.attack { border-left-color: var(--red); }
.event-item.alliance { border-left-color: var(--green); }
.event-item.building { border-left-color: var(--gold); }
.event-item.death { border-left-color: #a855f7; }
.event-item.trade { border-left-color: #c084fc; }
.event-item.build { border-left-color: var(--gold, #eab308); }
.event-item.diplomacy { border-left-color: #fb923c; }
.event-item.nuke { border-left-color: #f97316; font-weight: 700; }
.event-item.capture { border-left-color: var(--blue); }
.event-empty { color: var(--text-secondary); font-size: 0.7rem; text-align: center; font-style: italic; padding: 8px; }

/* ═══════════════════════════════════════════
   Build Bar (Footer)
═══════════════════════════════════════════ */
/* ── Unit Sub-bar (below top bar) ── */
#unitSubBar {
    position: fixed; top: 36px; left: 50%; transform: translateX(-50%);
    display: flex; align-items: center; gap: 2px;
    padding: 3px 8px; z-index: 0;
    background: rgba(15,23,42,0.85);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.usb-item {
    display: flex; align-items: center; gap: 2px;
    padding: 2px 5px; border-radius: 4px;
    cursor: pointer; transition: background 0.15s;
    font-size: 0.65rem; color: var(--text-secondary);
}
.usb-item:hover { background: rgba(56,189,248,0.12); color: var(--text-primary); }
.usb-icon { font-size: 0.7rem; }
.usb-val { font-family: var(--font-title); font-size: 0.68rem; color: var(--text-accent); font-weight: 600; }
.usb-sep { width: 1px; height: 14px; background: var(--border-glass); margin: 0 3px; }
.usb-reserve { gap: 4px; }
.usb-slider {
    width: 50px; height: 3px; -webkit-appearance: none; appearance: none;
    background: rgba(255,255,255,0.15); border-radius: 2px; outline: none; cursor: pointer;
}
.usb-slider::-webkit-slider-thumb {
    -webkit-appearance: none; width: 8px; height: 8px;
    background: var(--text-accent); border-radius: 50%; cursor: pointer;
}

/* ── Footer Bar (2 rows: reserve + construction + nuclear) ── */
#footerBar {
    position: fixed; bottom: 8px; left: 50%; transform: translateX(-50%);
    z-index: 10; display: flex; flex-direction: column; gap: 2px;
    padding: 5px 8px; background: var(--bg-panel);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass); border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}
.fb-row { display: flex; align-items: center; gap: 3px; }
.fb-row-top { padding: 2px 4px; border-bottom: 1px solid rgba(255,255,255,0.06); width: 100%; }
.fb-rsv-icon { font-size: 0.7rem; }
.fb-slider {
    flex: 1; min-width: 60px; height: 3px; -webkit-appearance: none; appearance: none;
    background: rgba(255,255,255,0.15); border-radius: 2px; outline: none; cursor: pointer;
}
.fb-slider::-webkit-slider-thumb {
    -webkit-appearance: none; width: 9px; height: 9px;
    background: var(--text-accent); border-radius: 50%; cursor: pointer;
}
.fb-rsv-val { color: var(--text-accent); font-weight: 700; font-size: 0.65rem; min-width: 22px; }
.fb-rsv-pool { font-size: 0.58rem; color: var(--text-secondary); }
.fb-rsv-pool strong { color: var(--text-accent); font-family: var(--font-title); }
.fb-sep { width: 1px; height: 14px; background: var(--border-glass); margin: 0 4px; }
.fb-unit-btn {
    padding: 2px 8px; border-radius: 5px; font-size: 0.6rem; font-weight: 700;
    background: rgba(56,189,248,0.12); border: 1px solid var(--border-glass);
    color: var(--text-accent); cursor: pointer; transition: all 0.15s;
    font-family: var(--font-ui); display: flex; align-items: center; gap: 4px;
}
.fb-unit-btn:hover { background: rgba(56,189,248,0.25); }
.fb-cost { font-size: 0.52rem; color: var(--gold); }
.bb-sep { width: 1px; height: 28px; background: var(--border-glass); margin: 0 2px; flex-shrink: 0; }
.nuke-btn { position: relative; }
.nuke-btn.armed { background: rgba(239,68,68,0.25) !important; border-color: rgba(239,68,68,0.6) !important; }
.nuke-count { font-family: var(--font-title); }

/* ── Help Button + Guide ── */
/* ── Left Cards (Armies + Fleets) ── */
#leftCards {
    position: fixed; top: 70px; left: 8px; z-index: 10;
    display: flex; flex-direction: column; gap: 6px;
    width: 170px;
}
.lc-section {
    background: rgba(15,23,42,0.8); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border: 1px solid var(--border-glass); border-radius: 8px;
    overflow: hidden;
}
.lc-section-title {
    font-size: 0.6rem; font-weight: 700; color: var(--text-accent);
    padding: 4px 8px; border-bottom: 1px solid var(--border-glass);
    letter-spacing: 0.05em; text-transform: uppercase;
}
.lc-scroll {
    max-height: 180px; overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent;
}
/* Fleet manager drag zones */
.fm-fleet-zone {
    padding: 6px; border-bottom: 1px solid var(--border-glass);
    font-size: 0.7rem; transition: background 0.15s;
}
.fm-ship-chip { user-select: none; }
.fm-ship-chip:hover { background: rgba(56,189,248,0.2) !important; }

.fb-ship-btn { min-width: 32px !important; padding: 3px 4px !important; }
.fb-ship-btn .bb-icon { font-size: 0.8rem; }
.fb-ship-btn .bb-cost { font-size: 0.5rem; }
.lc-card {
    background: rgba(15,23,42,0.85); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border: 1px solid var(--border-glass); border-radius: 8px;
    padding: 5px 7px; cursor: pointer; transition: all 0.15s;
    font-size: 0.6rem;
}
.lc-card:hover { border-color: var(--text-accent); background: rgba(15,23,42,0.95); }
.lc-card.selected { border-color: var(--text-accent); box-shadow: 0 0 6px rgba(56,189,248,0.3); }
.lc-header { display: flex; align-items: center; gap: 4px; margin-bottom: 2px; }
.lc-icon { font-size: 0.75rem; cursor: pointer; }
.lc-name { font-weight: 700; color: var(--text-primary); font-size: 0.62rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-name:hover { text-decoration: underline; }
.lc-count { font-family: var(--font-title); color: var(--text-accent); font-size: 0.65rem; font-weight: 700; }
.lc-status { color: var(--text-secondary); font-size: 0.55rem; }
.lc-status .lc-fighting { color: var(--red); }
.lc-actions { display: flex; gap: 2px; margin-top: 3px; }
.lc-btn {
    padding: 1px 5px; border-radius: 3px; font-size: 0.5rem; font-weight: 600;
    background: var(--bg-glass); border: 1px solid var(--border-glass);
    color: var(--text-secondary); cursor: pointer; transition: all 0.1s;
    font-family: var(--font-ui);
}
.lc-btn:hover { color: var(--text-primary); background: rgba(56,189,248,0.15); }
.lc-fleet-ships { display: flex; gap: 2px; flex-wrap: wrap; margin-top: 2px; }
.lc-ship-icon { font-size: 0.6rem; }

/* ── Toast Alerts ── */
#toastContainer {
    position: fixed; top: 65px; right: 12px; z-index: 550;
    display: flex; flex-direction: column; gap: 4px;
    max-width: 240px; pointer-events: none;
}
.toast-alert {
    padding: 6px 10px; border-radius: 6px; font-size: 0.65rem; font-weight: 600;
    color: #fff; pointer-events: all; cursor: pointer;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 4.7s forwards;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4); display: flex; align-items: center; gap: 5px;
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.toast-alert.nuclear { background: rgba(249,115,22,0.9); border-left: 3px solid #f97316; }
.toast-alert.military { background: rgba(239,68,68,0.85); border-left: 3px solid #ef4444; }
.toast-alert.economy { background: rgba(234,179,8,0.85); border-left: 3px solid #eab308; }
.toast-alert.diplomacy { background: rgba(168,85,247,0.85); border-left: 3px solid #a855f7; }
.toast-alert.info { background: rgba(56,189,248,0.85); border-left: 3px solid #38bdf8; }
.toast-alert.naval { background: rgba(6,182,212,0.85); border-left: 3px solid #06b6d4; }
@keyframes toastIn { from { opacity:0; transform:translateX(30px); } to { opacity:1; transform:none; } }
@keyframes toastOut { from { opacity:1; } to { opacity:0; transform:translateX(30px); } }
@keyframes redPulse { 0%,100% { border-color:rgba(239,68,68,0.1); } 50% { border-color:rgba(239,68,68,0.8); } }

#helpBtn {
    position: fixed; top: 8px; right: 8px; z-index: 20;
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--bg-panel); border: 1px solid var(--border-glass);
    color: var(--text-accent); font-size: 0.85rem; font-weight: 800;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3); transition: all 0.15s;
    font-family: var(--font-title);
}
#helpBtn:hover { background: rgba(56,189,248,0.2); transform: scale(1.1); }
.help-section { margin-bottom: 16px; }
.help-section h4 { font-size: 0.85rem; font-weight: 700; color: var(--text-accent); margin: 0 0 6px 0; }
.help-section p { margin: 4px 0; color: var(--text-secondary); }
.help-section ul { margin: 4px 0; padding-left: 16px; color: var(--text-secondary); }
.help-section li { margin: 3px 0; }
.help-table { width: 100%; border-collapse: collapse; font-size: 0.72rem; margin: 6px 0; }
.help-table td { padding: 4px 8px; border-bottom: 1px solid var(--border-glass); }
.help-table td:first-child { font-weight: 700; white-space: nowrap; color: var(--text-primary); width: 100px; }
.help-table td:last-child { color: var(--text-secondary); }

.build-bar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 4px 8px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-ui);
    min-width: 48px;
}
.build-bar-btn:hover {
    background: rgba(56,189,248,0.15);
    border-color: var(--text-accent);
    transform: translateY(-1px);
}
.build-bar-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.build-bar-btn.active {
    background: rgba(56,189,248,0.25);
    border-color: var(--text-accent);
    box-shadow: 0 0 8px rgba(56,189,248,0.3);
}
.bb-icon { font-size: 0.95rem; }
.bb-label { font-size: 0.58rem; font-weight: 600; }
.bb-cost { font-size: 0.52rem; color: var(--gold); }

/* ── Radial Action Menu ── */
#radialMenu {
    position: fixed; z-index: 50; pointer-events: none;
}
#radialMenu.hidden { display: none; }
#radialMenu .radial-center {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(15,23,42,0.9); border: 2px solid var(--text-accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; color: var(--text-accent); font-weight: 700;
    pointer-events: none;
}
.radial-btn {
    position: absolute; width: 38px; height: 38px; border-radius: 50%;
    background: rgba(15,23,42,0.92); border: 1.5px solid var(--border-glass);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; color: var(--text-primary); cursor: pointer;
    pointer-events: all; transition: all 0.15s;
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.radial-btn:hover {
    background: rgba(56,189,248,0.25); border-color: var(--text-accent);
    transform: scale(1.15);
}
.radial-btn .radial-tip {
    display: none; position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%);
    font-size: 0.55rem; white-space: nowrap; color: var(--text-secondary);
    background: rgba(15,23,42,0.9); padding: 1px 5px; border-radius: 3px;
}
.radial-btn:hover .radial-tip { display: block; }

/* ── Right Panel Tabs (bottom-right with minimap) ── */
#rightTabPanel {
    position: fixed; bottom: 12px; right: 12px; z-index: 10;
    width: 240px; max-height: 340px;
    display: flex; flex-direction: column;
    background: var(--bg-panel); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass); border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3); overflow: hidden;
}
.rtp-tabs {
    display: flex; border-bottom: 1px solid var(--border-glass);
}
.rtp-tab {
    flex: 1; padding: 6px 0; text-align: center; font-size: 0.65rem; font-weight: 700;
    color: var(--text-secondary); cursor: pointer; transition: all 0.15s;
    background: none; border: none; font-family: var(--font-ui);
}
.rtp-tab.active { color: var(--text-accent); border-bottom: 2px solid var(--text-accent); }
.rtp-tab:hover { color: var(--text-primary); }
.rtp-content { flex: 1; overflow-y: auto; max-height: calc(100vh - 130px); }
.rtp-content.hidden { display: none; }

/* Event feed filters */
.evt-filters {
    display: flex; gap: 2px; padding: 4px 6px; border-bottom: 1px solid var(--border-glass);
    flex-wrap: wrap;
}
.evt-filter-btn {
    padding: 2px 6px; border-radius: 4px; font-size: 0.55rem; font-weight: 600;
    background: var(--bg-glass); border: 1px solid var(--border-glass);
    color: var(--text-secondary); cursor: pointer; transition: all 0.15s;
    font-family: var(--font-ui);
}
.evt-filter-btn.active { background: rgba(56,189,248,0.2); color: var(--text-accent); border-color: var(--text-accent); }
.evt-filter-btn:hover { color: var(--text-primary); }

.evt-item {
    padding: 4px 8px; border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 0.62rem; color: var(--text-secondary); cursor: pointer;
    transition: background 0.1s;
}
.evt-item:hover { background: rgba(56,189,248,0.06); }
.evt-item .evt-time { font-size: 0.55rem; color: var(--text-secondary); margin-right: 4px; }
.evt-item .evt-icon { margin-right: 3px; }
.evt-item.evt-build { border-left: 2px solid #22c55e; }
.evt-item.evt-military { border-left: 2px solid #ef4444; }
.evt-item.evt-diplomacy { border-left: 2px solid #a855f7; }
.evt-item.evt-nuclear { border-left: 2px solid #f97316; }
.evt-item.evt-capital { border-left: 2px solid #eab308; }

.build-hint, .troop-hint {
    font-size: 0.62rem; color: var(--text-secondary);
    text-align: center; margin-top: 5px; font-style: italic;
}

/* ═══════════════════════════════════════════
   Military Panel
═══════════════════════════════════════════ */
.mil-row {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 4px;
}
.mil-label { }
.value-accent { color: var(--text-accent); font-weight: 700; font-size: 0.82rem; }

.conscript-row label {
    display: block; font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 2px;
}
.conscript-row label span { color: var(--text-accent); font-weight: 700; }
#conscriptSlider { width: 100%; margin: 3px 0; accent-color: var(--text-accent); }

.panel-divider { border: none; border-top: 1px solid var(--border-glass); margin: 8px 0; }

.create-army-btn {
    width: 100%; padding: 6px; font-size: 0.78rem;
    background: linear-gradient(135deg, #064e3b, #059669);
    border: none; border-radius: 6px;
}
.create-army-btn:hover { filter: brightness(1.2); }

/* ═══════════════════════════════════════════
   Armies Panel
═══════════════════════════════════════════ */
.army-item {
    background: var(--bg-glass); border: 1px solid var(--border-glass);
    border-radius: 6px; padding: 6px 8px; margin-bottom: 5px;
    transition: border-color 0.2s;
}
.army-item.fighting { border-color: rgba(248,113,113,0.5); animation: army-pulse 0.8s ease-in-out infinite; }
@keyframes army-pulse { 0%, 100% { box-shadow: none; } 50% { box-shadow: 0 0 8px rgba(248,113,113,0.3); } }

.army-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 2px;
}
.army-name { font-weight: 700; font-size: 0.8rem; color: var(--text-primary); }
.army-count { font-size: 0.75rem; color: var(--text-accent); font-family: var(--font-title); }
.army-status { font-size: 0.7rem; color: var(--text-secondary); margin-bottom: 4px; }
.army-actions { display: flex; gap: 3px; }

/* ═══════════════════════════════════════════
   Front Lines & Diplomacy
═══════════════════════════════════════════ */
.fl-item {
    background: var(--bg-glass); border: 1px solid var(--border-glass);
    border-radius: 6px; padding: 8px 10px; margin-bottom: 5px;
    pointer-events: auto;
    position: relative;
    z-index: 2;
}
.fl-header {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.78rem; margin-bottom: 2px; flex-wrap: wrap;
}
.fl-dot {
    width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.2);
}
.fl-name { flex: 1; font-weight: 600; font-size: 0.75rem; }
.fl-troops { font-size: 0.68rem; color: var(--text-secondary); }
.fl-tag {
    font-size: 0.6rem; padding: 1px 5px; border-radius: 3px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.fl-tag.allied   { background: rgba(74,222,128,0.2); color: var(--green); }
.fl-tag.neutral  { background: rgba(148,163,184,0.2); color: var(--text-secondary); }
.fl-tag.enemy    { background: rgba(248,113,113,0.2); color: var(--red); }
.fl-tag.embargoed { background: rgba(248,113,113,0.2); color: var(--red); }

.fl-actions { display: flex; gap: 3px; margin-top: 3px; pointer-events: auto; }
.fl-btn {
    flex: 1; padding: 6px 8px; background: var(--bg-glass);
    border: 1px solid var(--border-glass); border-radius: 4px;
    cursor: pointer; font-size: 0.72rem; transition: all 0.2s;
    color: var(--text-primary);
    pointer-events: auto;
    position: relative;
    z-index: 1;
    min-height: 28px;
}
.fl-btn:hover { background: rgba(56,189,248,0.2); border-color: var(--text-accent); }
.fl-btn.danger-btn:hover { background: rgba(248,113,113,0.2) !important; border-color: var(--red) !important; }
.fl-empty {
    color: var(--text-secondary); font-size: 0.75rem;
    text-align: center; font-style: italic; padding: 8px;
}

.fl-troops-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    margin: 3px 0;
}
.fl-yours { color: var(--green); }
.fl-theirs { color: var(--red); }
.fl-armies-list {
    font-size: 0.62rem;
    color: var(--text-secondary);
    margin-bottom: 3px;
}

.diplo-item {
    display: flex; align-items: center; gap: 6px;
    background: var(--bg-glass); border: 1px solid var(--border-glass);
    border-radius: 6px; padding: 8px 10px; margin-bottom: 5px; font-size: 0.78rem;
    pointer-events: auto;
    position: relative;
    z-index: 2;
}
.diplo-item span:nth-child(2) { flex: 1; font-size: 0.72rem; }
.diplo-item.pending  { border-color: var(--gold); }
.diplo-item.ally       { border-color: var(--green); }
.diplo-item.trade-deal { border-color: #c084fc; }
.diplo-item.embargo    { border-color: var(--red); }

/* Pulsing highlight for incoming proposals */
.diplo-item.incoming-proposal {
    border-color: var(--gold);
    border-width: 2px;
    background: rgba(250, 204, 21, 0.12);
    animation: pulse-proposal 1.5s ease-in-out infinite;
}
@keyframes pulse-proposal {
    0%, 100% { box-shadow: 0 0 4px rgba(250, 204, 21, 0.3); }
    50%      { box-shadow: 0 0 12px rgba(250, 204, 21, 0.6); }
}

/* Outgoing pending proposals */
.diplo-item.outgoing-proposal {
    border-color: var(--text-secondary);
    border-style: dashed;
    opacity: 0.85;
}
.diplo-item.outgoing-proposal span small,
.diplo-item.incoming-proposal span small {
    color: var(--text-secondary);
    font-size: 0.65rem;
    margin-left: 4px;
}

.break-btn:hover { background: rgba(248,113,113,0.3) !important; border-color: var(--red) !important; }

/* ═══════════════════════════════════════════
   Right-Click Context Menu
═══════════════════════════════════════════ */
#contextMenu {
    position: fixed; z-index: 100;
    background: var(--bg-panel); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass); border-radius: 10px;
    padding: 10px; min-width: 210px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
#contextMenu.hidden { display: none; }

.ctx-header {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.85rem; font-weight: 700; color: var(--text-primary);
    margin-bottom: 6px;
}

.ctx-divider { border: none; border-top: 1px solid var(--border-glass); margin: 6px 0; }

.ctx-section-label {
    font-size: 0.62rem; text-transform: uppercase; letter-spacing: 1.5px;
    color: var(--text-secondary); margin-bottom: 4px;
}

#contextMenu button {
    display: block; width: 100%; padding: 6px 8px;
    background: var(--bg-glass); border: 1px solid var(--border-glass);
    border-radius: 6px; color: var(--text-primary);
    cursor: pointer; font-family: var(--font-ui); font-size: 0.8rem;
    text-align: left; margin-bottom: 3px; transition: all 0.2s;
}
#contextMenu button:hover { background: rgba(56,189,248,0.15); border-color: var(--text-accent); }
#contextMenu button.hidden { display: none; }

.ctx-army-row {
    display: flex; align-items: center; gap: 6px; margin-bottom: 5px;
}
.ctx-tiny { font-size: 0.7rem; color: var(--text-secondary); white-space: nowrap; }
#ctxArmySelect {
    flex: 1; background: var(--bg-glass); border: 1px solid var(--border-glass);
    border-radius: 4px; color: var(--text-primary); font-family: var(--font-ui);
    font-size: 0.72rem; padding: 3px 4px;
}

/* ═══════════════════════════════════════════
   Create Army Dialog
═══════════════════════════════════════════ */
.dialog-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,0.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
}
.dialog-overlay.hidden { display: none; }

.end-screen-box {
    text-align: center; min-width: 340px; max-width: 440px;
}
.end-screen-box h2 {
    font-family: var(--font-title); font-size: 1.8rem;
    letter-spacing: 3px; margin-bottom: 16px;
}
.end-screen-box .victory { color: #4ade80; }
.end-screen-box .defeat  { color: #f87171; }
#endStats {
    text-align: left; font-size: 0.82rem; color: var(--text-muted);
    line-height: 1.7; margin-bottom: 18px; padding: 0 8px;
}
#endStats .stat-label { color: var(--text-secondary); }
#endStats .stat-value { color: #fff; font-weight: 600; float: right; }

.dialog-box {
    background: var(--bg-panel); border: 1px solid var(--border-glass);
    border-radius: 14px; padding: 20px; min-width: 280px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.6);
}
.dialog-box h3 {
    font-family: var(--font-title); font-size: 0.85rem;
    color: var(--text-accent); letter-spacing: 2px;
    text-transform: uppercase; margin-bottom: 14px;
}
.dlg-label {
    display: block; font-size: 0.75rem; color: var(--text-secondary);
    margin-bottom: 4px; margin-top: 10px;
}
.dlg-input {
    width: 100%; padding: 6px 10px;
    background: var(--bg-glass); border: 1px solid var(--border-glass);
    border-radius: 6px; color: var(--text-primary);
    font-family: var(--font-ui); font-size: 0.85rem;
}
.dlg-input:focus { outline: none; border-color: var(--text-accent); }
#armyRecruitSlider { width: 100%; margin: 6px 0; accent-color: var(--text-accent); }
#armyRecruitAmount { font-size: 0.8rem; color: var(--text-accent); font-weight: 700; }

.dlg-actions { display: flex; gap: 8px; margin-top: 14px; }
.dlg-actions .action-btn { flex: 1; padding: 7px; font-size: 0.8rem; }
.cancel-btn { background: var(--bg-glass) !important; color: var(--text-secondary); }
.cancel-btn:hover { background: rgba(248,113,113,0.15) !important; }

/* ═══════════════════════════════════════════
   Action Buttons (general)
═══════════════════════════════════════════ */
.action-btn {
    width: 100%; padding: 6px;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    border: none; border-radius: 6px; color: white;
    font-family: var(--font-ui); font-weight: 700; font-size: 0.8rem;
    cursor: pointer; transition: all 0.2s; text-transform: uppercase; letter-spacing: 1px;
}
.action-btn:hover { filter: brightness(1.2); transform: scale(1.02); }
.action-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; filter: none; }

/* ═══════════════════════════════════════════
   Minimap
═══════════════════════════════════════════ */
#minimapCanvas { display: block; }

/* ═══════════════════════════════════════════
   Notifications
═══════════════════════════════════════════ */
#notifications {
    position: fixed; top: 12px; right: 220px;
    display: flex; flex-direction: column; gap: 4px;
    z-index: 15; max-width: 260px;
}
.notification {
    padding: 8px 14px; background: var(--bg-panel); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass); border-radius: 8px; font-size: 0.8rem;
    animation: notif-in 0.3s ease, notif-out 0.5s ease 3s forwards;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
@keyframes notif-in  { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes notif-out { to { opacity: 0; transform: translateX(20px); } }

/* ═══════════════════════════════════════════
   Game Controls
═══════════════════════════════════════════ */
#gameControls {
    position: fixed; bottom: 12px; left: 12px;
    display: flex; gap: 6px; z-index: 10;
}
.ctrl-btn {
    width: 36px; height: 36px; background: var(--bg-panel); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass); border-radius: 8px; font-size: 1rem;
    cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.ctrl-btn:hover { background: var(--bg-glass); border-color: var(--text-accent); }

/* ═══════════════════════════════════════════
   Context Menu — Emoji Picker
═══════════════════════════════════════════ */
.ctx-emoji-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2px;
    padding: 4px 0;
    max-height: 160px;
    overflow-y: auto;
}
.ctx-emoji-grid button {
    width: 32px; height: 32px; background: none; border: 1px solid transparent;
    border-radius: 4px; font-size: 1.1rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.12s; filter: grayscale(0.25);
    padding: 0;
}
.ctx-emoji-grid button:hover {
    background: var(--bg-glass); border-color: var(--text-accent);
    transform: scale(1.2); filter: grayscale(0);
}

/* ═══════════════════════════════════════════
   Tooltip
═══════════════════════════════════════════ */
#tooltip {
    position: fixed; padding: 8px 12px; background: var(--bg-panel); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass); border-radius: 6px; font-size: 0.8rem;
    pointer-events: none; z-index: 20; max-width: 200px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
#tooltip.hidden { display: none; }

/* ═══════════════════════════════════════════
   Ship Context Menu
═══════════════════════════════════════════ */
.ship-context-menu {
    position: fixed; z-index: 100;
    background: var(--bg-panel); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass); border-radius: 10px;
    padding: 10px; min-width: 210px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.ship-context-menu .ctx-header {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.85rem; font-weight: 700; color: var(--text-primary);
    margin-bottom: 6px;
}
.ship-context-menu .ctx-divider { border: none; border-top: 1px solid var(--border-glass); margin: 6px 0; }
.ship-context-menu button {
    display: block; width: 100%; padding: 6px 8px;
    background: var(--bg-glass); border: 1px solid var(--border-glass);
    border-radius: 6px; color: var(--text-primary);
    cursor: pointer; font-family: var(--font-ui); font-size: 0.8rem;
    text-align: left; margin-bottom: 3px; transition: all 0.2s;
}
.ship-context-menu button:hover { background: rgba(56,189,248,0.15); border-color: var(--text-accent); }
.ship-context-menu button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ═══════════════════════════════════════════
   Multi-Select Menu
═══════════════════════════════════════════ */
.multi-select-menu .ctx-section-label {
    font-size: 0.62rem; text-transform: uppercase; letter-spacing: 1.5px;
    color: var(--text-secondary); margin-bottom: 4px; padding: 0 4px;
}

/* ═══════════════════════════════════════════
   Army Manager Overlay
═══════════════════════════════════════════ */
.army-manager-box {
    min-width: 450px;
    max-width: 550px;
    max-height: 70vh;
    overflow-y: auto;
}

.am-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    margin-bottom: 8px;
}

.am-info { flex: 1; }
.am-name {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 2px;
}
.am-status {
    font-size: 0.72rem;
    color: var(--text-secondary);
}
.am-count {
    font-family: var(--font-title);
    font-size: 1.1rem;
    color: var(--text-accent);
    min-width: 60px;
    text-align: right;
}

.am-controls {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.am-size-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
}
.am-size-row input[type="range"] {
    width: 100px;
    accent-color: var(--text-accent);
}
.am-size-row .am-target {
    color: var(--text-accent);
    font-weight: 700;
    min-width: 45px;
}
.am-btn-row {
    display: flex;
    gap: 4px;
}
.am-btn {
    padding: 3px 8px;
    font-size: 0.68rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 4px;
    color: var(--text-primary);
    cursor: pointer;
    font-family: var(--font-ui);
}
.am-btn:hover { background: rgba(56,189,248,0.2); border-color: var(--text-accent); }
.am-btn.danger:hover { background: rgba(248,113,113,0.2); border-color: var(--red); }

/* ═══════════════════════════════════════════
   Responsive
═══════════════════════════════════════════ */
@media (max-width: 768px) {
    .left-panels { width: 155px; }
    .right-panels { width: 165px; }
    .side-panel { padding: 8px; }
    .resource { padding: 5px 8px; font-size: 0.75rem; }
}
