/* ==========================================================================
   Cannon Clash (巨炮大决战) - Real-Time Simultaneous Tactical Arcade Theme
   ========================================================================== */

:root {
    --bg-page: #0a0e17;
    --bg-surface: #111726;
    --bg-card: rgba(18, 25, 41, 0.88);
    --border-color: rgba(0, 229, 255, 0.25);
    --border-glow: rgba(0, 229, 255, 0.5);

    --p1-color: #00e5ff;
    --p1-glow: rgba(0, 229, 255, 0.45);
    --p2-color: #ff1744;
    --p2-glow: rgba(255, 23, 68, 0.45);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --btn-fire: #ff3d00;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-page);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-primary);
}

#gameContainer {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #050811;
    overflow: hidden;
}

/* ================= 1. Battlefield Arena (Combat Canvas) ================= */
.battle-arena {
    flex: 1;
    min-height: 0;
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: #050811;
}

canvas#gameCanvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 12 / 7;
    object-fit: contain;
    margin: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.9);
    background-color: #050811;
    touch-action: none;
}

/* Floating Ultra-Slim Top Status Bar */
.hud-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    pointer-events: none;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: max(4px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 0 max(10px, env(safe-area-inset-left));
    z-index: 10;
}

.hud-top-bar.hidden {
    display: none !important;
}

.player-status-card {
    pointer-events: auto;
    background: rgba(10, 15, 26, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 3px 8px;
    min-width: 105px;
    max-width: 140px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
}

.player-status-card.p1 {
    border-left: 3px solid var(--p1-color);
}

.player-status-card.p2 {
    border-right: 3px solid var(--p2-color);
    text-align: right;
}

.player-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 2px;
}

.player-status-card.p2 .player-badge {
    justify-content: flex-end;
}

/* Minimal 3px HP Bar */
.hp-bar-bg {
    width: 100%;
    height: 3px !important;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    border: none;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

.hp-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.player-status-card.p1 .hp-bar-fill {
    background: #00e5ff;
    box-shadow: 0 0 8px #00e5ff;
}

.player-status-card.p2 .hp-bar-fill {
    background: #ff1744;
    box-shadow: 0 0 8px #ff1744;
}

.bar-sub-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 1px;
}

.hp-num {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-secondary);
}

.shield-val {
    font-size: 9px;
    font-weight: 800;
    color: #00e5ff;
    margin-left: 2px;
}

.top-actions {
    pointer-events: auto;
    display: flex;
    gap: 4px;
    align-items: center;
}

.icon-btn {
    background: rgba(10, 15, 26, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cfd8dc;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border-color: #00e5ff;
}

.icon-btn.lang-toggle-btn {
    width: auto;
    padding: 0 6px;
    gap: 3px;
    font-size: 10px;
    font-weight: 800;
    background: rgba(0, 229, 255, 0.12);
    border-color: rgba(0, 229, 255, 0.35);
    color: #e0f7fa;
}

/* ================= 2. Tactical Controls Dock (Strictly Outside Battle Map) ================= */
#hudContainer.controls-dock {
    flex-shrink: 0;
    width: 100%;
    background: linear-gradient(180deg, #090e1a 0%, #040710 100%);
    border-top: 1px solid rgba(0, 229, 255, 0.22);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.7);
    padding: 4px 8px max(4px, env(safe-area-inset-bottom));
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#hudContainer.hidden {
    display: none !important;
}

.hud-bottom-dual-zone {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.hud-bottom-dual-zone:not(:has(.player-pod.p2.hidden)) {
    justify-content: space-between;
}

.player-pod {
    flex: 1;
    background: rgba(14, 20, 34, 0.88);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 4px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    max-width: 580px;
}

.player-pod.p1 {
    border-left: 3px solid var(--p1-color);
}

.player-pod.p2 {
    border-right: 3px solid var(--p2-color);
}

.player-pod.hidden {
    display: none !important;
}

/* Single Player Mode: Center and Expand */
.player-pod.single-player-mode {
    max-width: 780px;
    width: 100%;
    margin: 0 auto;
}

/* Weapon Selection Chips */
.weapon-chips-scroll {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 1px 0;
    justify-content: center;
    align-items: center;
    scrollbar-width: none;
}

.weapon-chips-scroll::-webkit-scrollbar {
    display: none;
}

.weapon-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 7px;
    padding: 3px 6px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s ease;
    flex-shrink: 0;
}

.weapon-chip:hover {
    background: rgba(255, 255, 255, 0.12);
}

.weapon-chip.active {
    background: rgba(0, 229, 255, 0.22);
    border-color: #00e5ff;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.35);
}

.player-pod.p2 .weapon-chip.active {
    background: rgba(255, 23, 68, 0.22);
    border-color: #ff1744;
    box-shadow: 0 0 10px rgba(255, 23, 68, 0.35);
}

.weapon-chip.empty {
    opacity: 0.3;
    cursor: not-allowed;
}

.weapon-chip .w-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.weapon-chip .w-icon svg {
    display: block;
}

.w-ammo {
    color: #ffd54f;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.5);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 10px;
    min-width: 14px;
    text-align: center;
    border: 1px solid rgba(255, 213, 79, 0.3);
    transition: transform 0.15s ease, color 0.15s ease;
    display: inline-block;
}

.weapon-chip.empty .w-ammo {
    color: #78909c;
    border-color: rgba(120, 144, 156, 0.2);
}

@keyframes ammoPop {
    0% { transform: scale(1.45); color: #ff1744; border-color: #ff1744; text-shadow: 0 0 8px #ff1744; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.w-ammo.pop {
    animation: ammoPop 0.35s ease-out;
}

/* Control Inputs: Drive Buttons, Sliders, Fire */
.pod-control-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
    width: 100%;
}

.move-btns-pair {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.move-btn {
    width: 36px;
    height: 34px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.move-btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

.move-btn:active {
    transform: scale(0.92);
    background: rgba(0, 229, 255, 0.25);
    border-color: #00e5ff;
}

.player-pod.p2 .move-btn:active {
    background: rgba(255, 23, 68, 0.25);
    border-color: #ff1744;
}

.sliders-pair {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 60px;
    margin: 0 4px;
}

.slider-row {
    display: flex;
    align-items: center;
    gap: 5px;
}

.slider-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 800;
    color: #b0bec5;
    min-width: 38px;
    flex-shrink: 0;
}

.slider-badge b {
    color: #fff;
}

.slider-row input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 2px;
    outline: none;
    min-width: 40px;
}

.slider-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #00e5ff;
    cursor: pointer;
    box-shadow: 0 0 6px #00e5ff;
}

.player-pod.p2 .slider-row input[type="range"]::-webkit-slider-thumb {
    background: #ff1744;
    box-shadow: 0 0 6px #ff1744;
}

/* Textless High-Tech Fire Button */
.fire-btn {
    width: 46px;
    height: 34px;
    border: none;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}

.fire-btn.p1 {
    background: linear-gradient(135deg, #00b0ff, #0081cb);
    box-shadow: 0 0 10px rgba(0, 176, 255, 0.45);
}

.fire-btn.p2 {
    background: linear-gradient(135deg, #ff1744, #d50000);
    box-shadow: 0 0 10px rgba(255, 23, 68, 0.45);
}

.fire-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.65);
}

.player-pod.p2 .fire-btn:hover:not(:disabled) {
    box-shadow: 0 0 16px rgba(255, 23, 68, 0.65);
}

.fire-btn:active:not(:disabled) {
    transform: scale(0.92);
}

.fire-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    filter: grayscale(0.6);
    box-shadow: none;
}

.fire-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.5);
    box-shadow: none;
}

/* ================= Modals ================= */
.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 17, 0.88);
    backdrop-filter: blur(14px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    display: none !important;
}

.menu-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 20px;
    padding: 28px 38px 34px;
    max-width: 520px;
    width: 90%;
    text-align: center;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 229, 255, 0.15);
}

.menu-top-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.menu-lang-pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.35);
    color: #e0f7fa;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.menu-lang-pill:hover {
    background: rgba(0, 229, 255, 0.2);
    border-color: #00e5ff;
    box-shadow: 0 0 14px rgba(0, 229, 255, 0.3);
    transform: translateY(-1px);
}

.game-title {
    font-size: 38px;
    font-weight: 900;
    background: linear-gradient(135deg, #ffffff 20%, #00e5ff 60%, #ff1744 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.game-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 26px;
    line-height: 1.5;
}

.menu-actions-stack {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.menu-primary-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 229, 255, 0.35);
    color: #fff;
    padding: 13px 18px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.menu-primary-btn:hover {
    background: rgba(0, 229, 255, 0.2);
    border-color: #00e5ff;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.35);
    transform: translateY(-2px);
}

.menu-primary-btn.pvp:hover {
    border-color: #ff1744;
    box-shadow: 0 0 20px rgba(255, 23, 68, 0.35);
    background: rgba(255, 23, 68, 0.18);
}

/* Campaign Modal */
.campaign-modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 20px;
    padding: 24px 30px;
    max-width: 860px;
    width: 94%;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.campaign-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.stages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    overflow-y: auto;
    padding: 6px 4px;
    flex: 1;
}

.stage-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.stage-card.unlocked:hover {
    background: rgba(0, 229, 255, 0.12);
    border-color: #00e5ff;
    transform: translateY(-3px);
}

.stage-card.locked {
    opacity: 0.45;
    cursor: not-allowed;
}

.stage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stage-id {
    font-size: 11px;
    font-weight: 800;
    color: #00e5ff;
    letter-spacing: 1px;
}

.star-icon {
    font-size: 14px;
    color: #455a64;
}

.star-icon.active {
    color: #ffc107;
}

.stage-title {
    font-size: 15px;
    font-weight: 700;
}

.stage-desc {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.stage-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

.stage-enemy {
    font-size: 11px;
    color: #ff8a80;
    font-weight: 600;
}

.stage-play-btn {
    background: #00e5ff;
    border: none;
    color: #000;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.stage-card.locked .stage-play-btn {
    background: #37474f;
    color: #90a4ae;
}

/* Guide Modal */
.guide-content {
    max-height: 60vh;
    overflow-y: auto;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 13px;
    padding: 10px 4px;
}

.guide-item {
    background: rgba(255, 255, 255, 0.04);
    padding: 10px 14px;
    border-radius: 10px;
    border-left: 3px solid #00e5ff;
}

.guide-item-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #00e5ff;
}

.guide-item-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ==========================================================================
   Mobile Landscape & Orientation System (手机端专属体验与强制横屏适配)
   ========================================================================== */

/* Orientation Prompt Overlay */
.orientation-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(5, 8, 17, 0.96);
    backdrop-filter: blur(16px);
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.orientation-overlay.hidden {
    display: none !important;
}

.orientation-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 20px;
    padding: 28px 24px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.phone-rotate-anim {
    position: relative;
    width: 70px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 4px;
}

.phone-device {
    width: 32px;
    height: 52px;
    border: 2px solid #00e5ff;
    border-radius: 6px;
    position: relative;
    animation: rotatePhone 2.2s infinite ease-in-out;
    background: rgba(0, 229, 255, 0.08);
    box-shadow: 0 0 14px rgba(0, 229, 255, 0.4);
}

.phone-device::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #00e5ff;
}

@keyframes rotatePhone {
    0%, 15% {
        transform: rotate(0deg);
    }
    45%, 75% {
        transform: rotate(-90deg);
    }
    90%, 100% {
        transform: rotate(0deg);
    }
}

.rotate-glow-arrows {
    position: absolute;
    font-size: 32px;
    color: #ff1744;
    animation: pulseArrow 1.5s infinite ease-in-out;
    pointer-events: none;
}

@keyframes pulseArrow {
    0%, 100% { opacity: 0.4; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.15); }
}

.orientation-title {
    font-size: 16px;
    font-weight: 900;
    color: #00e5ff;
    letter-spacing: 1px;
}

.orientation-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.orientation-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 6px;
}

.orient-btn {
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.orient-btn.primary {
    background: linear-gradient(135deg, #00b0ff, #0091ea);
    color: #fff;
    box-shadow: 0 0 14px rgba(0, 176, 255, 0.4);
}

.orient-btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e0f7fa;
}

/* Auto-show Orientation Overlay when portrait on mobile/tablet */
@media screen and (orientation: portrait) and (max-width: 1024px) {
    body:not(.forced-landscape) #orientationPrompt:not(.hidden) {
        display: flex !important;
    }
}

/* Forced Landscape CSS Mode (旋转渲染与全屏横屏居中) */
body.forced-landscape {
    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden !important;
    position: fixed !important;
    inset: 0 !important;
}

body.forced-landscape #gameContainer {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) rotate(90deg) !important;
    transform-origin: center center !important;
    overflow: hidden !important;
    margin: 0 !important;
}

body.forced-landscape canvas#gameCanvas {
    max-width: 100% !important;
    max-height: 100% !important;
    margin: auto !important;
}

body.forced-landscape #hudContainer {
    padding: 6px 12px !important;
}

body.forced-landscape #orientationPrompt {
    display: none !important;
}

/* ================= Mobile Landscape Layout Optimization ================= */
@media (max-height: 540px), (max-width: 950px) {
    /* Compact Floating Top Status Bar */
    .hud-top-bar {
        padding: 2px 6px;
        gap: 6px;
        align-items: center;
    }

    .player-status-card {
        min-width: 95px;
        max-width: 135px;
        padding: 3px 6px;
        border-radius: 8px;
    }

    .player-badge {
        font-size: 10px;
        gap: 4px;
        margin-bottom: 2px;
    }

    .hp-bar-bg {
        height: 3px !important;
        border-radius: 2px;
    }

    .bar-sub-row {
        margin-top: 1px;
        gap: 4px;
    }

    .reload-track {
        height: 2px;
    }

    .hp-num {
        font-size: 8px;
    }

    .shield-val {
        font-size: 8px;
    }

    .top-actions {
        gap: 3px;
    }

    .icon-btn {
        width: 26px;
        height: 26px;
        font-size: 11px;
        border-radius: 6px;
    }

    .icon-btn.lang-toggle-btn {
        padding: 0 5px;
        font-size: 10px;
    }

    /* Bottom Dual Zone: ALWAYS Row layout, never stack vertically! */
    .hud-bottom-dual-zone {
        flex-direction: row !important;
        justify-content: center !important;
        gap: 6px;
        padding: 0 2px;
        align-items: center;
    }

    .hud-bottom-dual-zone:not(:has(.player-pod.p2.hidden)) {
        justify-content: space-between !important;
    }

    .player-pod {
        padding: 3px 6px;
        gap: 3px;
        border-radius: 8px;
        background: rgba(11, 17, 30, 0.9);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    }

    /* Streamlined Weapon Arsenal Dock */
    .weapon-chips-scroll {
        gap: 3px;
        padding: 1px 0;
        justify-content: center;
    }

    .weapon-chip {
        padding: 2px 5px;
        height: 26px;
        border-radius: 6px;
        gap: 3px;
    }

    .weapon-chip .w-ammo {
        font-size: 9px;
        padding: 0 4px;
        min-width: 11px;
        border-radius: 4px;
    }

    /* Ergonomic Thumb Inputs */
    .pod-control-inputs {
        gap: 4px;
    }

    .move-btns-pair {
        gap: 3px;
    }

    .move-btn {
        width: 32px;
        min-width: 32px;
        height: 30px;
        padding: 0;
        border-radius: 7px;
        background: rgba(255, 255, 255, 0.12);
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .move-btn svg {
        width: 16px;
        height: 16px;
    }

    .move-btn:active {
        transform: scale(0.92);
        background: rgba(0, 229, 255, 0.3);
    }

    .sliders-pair {
        min-width: 50px;
        gap: 2px;
        margin: 0 2px;
    }

    .slider-row {
        gap: 3px;
    }

    .slider-badge {
        font-size: 9px;
        min-width: 32px;
        gap: 2px;
    }

    .slider-badge svg {
        width: 12px;
        height: 12px;
    }

    .slider-row input[type="range"] {
        height: 3px;
    }

    .slider-row input[type="range"]::-webkit-slider-thumb {
        width: 12px;
        height: 12px;
    }

    .fire-btn {
        width: 42px;
        min-width: 42px;
        height: 30px;
        padding: 0;
        border-radius: 7px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .fire-btn svg {
        width: 20px;
        height: 20px;
    }

    .fire-btn:active:not(:disabled) {
        transform: scale(0.92);
    }

    /* Single Player (Campaign) mode: neat centered bottom dock */
    .player-pod.single-player-mode {
        max-width: 680px !important;
        width: 100%;
        margin: 0 auto;
    }

    .player-pod.single-player-mode .weapon-chips-scroll {
        justify-content: center;
    }

    .player-pod.single-player-mode .pod-control-inputs {
        justify-content: space-between;
        max-width: 660px;
        margin: 0 auto;
        width: 100%;
    }

    /* 2-Player Local Duel mode: Left/Right flanks */
    .hud-bottom-dual-zone:not(:has(.player-pod.p2.hidden)) .player-pod {
        max-width: calc(50% - 3px);
        flex: 1;
    }

    /* Responsive Mobile Modals */
    .menu-card {
        max-height: 94vh;
        padding: 12px 18px;
        max-width: 420px;
        border-radius: 16px;
    }

    .menu-top-bar {
        margin-bottom: 4px;
    }

    .menu-lang-pill {
        padding: 3px 10px;
        font-size: 11px;
    }

    .game-title {
        font-size: 22px;
        margin-bottom: 2px;
        letter-spacing: 1px;
    }

    .game-subtitle {
        font-size: 10px;
        margin-bottom: 8px;
        line-height: 1.3;
    }

    .menu-actions-stack {
        gap: 6px;
    }

    .menu-primary-btn {
        padding: 7px 12px;
        font-size: 12px;
        border-radius: 8px;
        gap: 6px;
    }

    /* Campaign Mission Modal */
    .campaign-modal-card {
        max-height: 92vh;
        padding: 10px 14px;
        border-radius: 16px;
    }

    .campaign-header-row {
        margin-bottom: 6px;
    }

    .campaign-header-row h2 {
        font-size: 16px !important;
    }

    .stages-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        padding: 2px;
    }

    .stage-card {
        padding: 6px 8px;
        gap: 2px;
        border-radius: 8px;
    }

    .stage-id {
        font-size: 9px;
    }

    .star-icon {
        font-size: 11px;
    }

    .stage-title {
        font-size: 11px;
    }

    .stage-desc {
        font-size: 9px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.2;
    }

    .stage-footer {
        margin-top: 2px;
    }

    .stage-enemy {
        font-size: 9px;
    }

    .stage-play-btn {
        font-size: 9px;
        padding: 2px 6px;
        border-radius: 4px;
    }

    /* Weapons Guide Modal */
    .guide-content {
        max-height: 60vh;
        gap: 8px;
        padding: 4px 2px;
    }

    .guide-item {
        padding: 6px 10px;
        border-radius: 8px;
    }

    .guide-item-title {
        font-size: 12px;
        margin-bottom: 2px;
    }

    .guide-item-desc {
        font-size: 10px;
        line-height: 1.4;
    }

    /* Game Over Modal */
    #gameOverModal .menu-card {
        padding: 12px 18px;
    }

    #gameOverModal #gameOverTitle {
        font-size: 20px !important;
        margin-bottom: 4px;
    }

    #gameOverModal #gameOverDesc {
        font-size: 12px !important;
        margin-bottom: 12px;
    }

    #gameOverModal .menu-actions-stack {
        flex-direction: row;
        gap: 6px;
    }

    #gameOverModal .menu-primary-btn {
        flex: 1;
        padding: 7px 8px;
        font-size: 11px;
    }

    @media (max-width: 760px) {
        #langToggleBtn .lang-label {
            display: none;
        }
        #langToggleBtn {
            width: 28px !important;
            padding: 0 !important;
            justify-content: center;
        }
    }
}
