* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: Arial, sans-serif; background-color: #f0f0f0; overflow: hidden; }
#container { display: flex; height: 100vh; width: 100vw; }
#canvas-container { flex: 1; position: relative; min-height: 0; min-width: 0; overflow: hidden; }
#controls-panel { width: 450px; background: white; padding: 15px; overflow-y: auto; box-shadow: -2px 0 10px rgba(0,0,0,0.1); }
/* 鎴樻枟妯″紡涓媍ontrols-panel闅愯棌鏃讹紝canvas-container鍗犳弧鍏ㄥ睆 */
#container:has(#controls-panel[style*="display: none"]) #canvas-container,
#container:has(#controls-panel[style*="display:none"]) #canvas-container {
    width: 100vw;
}
#canvas3d { display: block; width: 100%; height: 100%; min-height: 0; min-width: 0; background: linear-gradient(to bottom, #87CEEB 0%, #98D8E8 100%); }
.hud-info { position: absolute; top: 10px; left: 10px; background: rgba(0, 0, 0, 0.7); color: white; padding: 10px; border-radius: 5px; font-size: 12px; z-index: 100; }
.controls-title { font-size: 16px; font-weight: bold; margin-bottom: 10px; color: #333; border-bottom: 2px solid #2196F3; padding-bottom: 5px; }
.control-group { margin-bottom: 15px; padding: 10px; background: #f9f9f9; border-radius: 5px; }
.control-group h3 { margin-top: 0; margin-bottom: 10px; font-size: 14px; color: #555; }
select, button, input { width: 100%; padding: 6px; margin: 5px 0; border: 1px solid #ddd; border-radius: 4px; }
button { background: #2196F3; color: white; border: none; cursor: pointer; transition: background 0.3s; }
button:hover { background: #1976D2; }
button.danger { background: #f44336; }
button.danger:hover { background: #d32f2f; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 10px 0; }
.stat-item { background: #e3f2fd; padding: 8px; border-radius: 4px; text-align: center; font-size: 12px; }
.stat-item .value { font-size: 16px; font-weight: bold; color: #1976D2; }
.log { height: 150px; overflow-y: auto; border: 1px solid #ccc; padding: 8px; background-color: #1a1a1a; color: #0f0; font-family: monospace; font-size: 11px; border-radius: 4px; }
.log .success { color: #4caf50; }
.log .failure { color: #f44336; }
.log .info { color: #2196F3; }
.log .warning { color: #ff9800; }
.log .danger { color: #ff0000; font-weight: bold; }
.defense-status { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-left: 5px; }
.ready { background-color: #4caf50; }
.cooling { background-color: #f44336; }
.charging { background-color: #ff9800; }
.defense-controls { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 10px 0; }
.defense-system-control { border: 1px solid #ddd; padding: 8px; border-radius: 4px; background: white; font-size: 12px; }
.ai-status { background-color: #e3f2fd; padding: 10px; border-radius: 4px; margin: 10px 0; font-size: 12px; }
.toggle-button { background-color: #4CAF50; color: white; border: none; padding: 8px 15px; border-radius: 4px; cursor: pointer; }
.toggle-button.off { background-color: #f44336; }
.simulation-speed { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.speed-slider { flex: 1; }
.target-status { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; }
.target-status-item { background: #f5f5f5; padding: 5px; border-radius: 3px; font-size: 10px; }
.target-status-item.destroyed { background: #ffebee; color: #c62828; }
.target-status-item.healthy { background: #e8f5e9; color: #2e7d32; }
.map-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.map-button { background: white; border: 2px solid #ddd; padding: 8px 12px; border-radius: 6px; cursor: pointer; font-size: 12px; transition: all 0.3s ease; }
.map-button:hover { border-color: #2196F3; }
.map-button.selected { border-color: #2196F3; background: #E3F2FD; }
#main-menu .logo-container {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
}
#main-menu .logo-container img {
    height: 70px;
    width: auto;
    border-radius: 6px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}
.version-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(45deg, #ff0000, #ff8800);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.missile-type-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(45deg, #32CD32, #228B22);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.laser-type-badge.laser-type-badge {
    position: absolute;
    top: 40px;
    left: 10px;
    background: linear-gradient(45deg, #FF0000, #FF4500);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.missile-view-btn {
    position: absolute;
    top: 70px;
    left: 10px;
    background: linear-gradient(45deg, #4444ff, #8844ff);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    user-select: none;
}
.missile-view-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}
.missile-view-btn.active {
    background: linear-gradient(45deg, #ff4444, #ff8800);
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0); }
}

/* 涓婚〉鎸夐挳鏍峰紡 */
.menu-bottom-buttons {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 15px;
    z-index: 1000;
}
#main-menu .dev-info-btn {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: linear-gradient(45deg, #2196F3, #21CBF3);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    z-index: 100;
    width: auto;
    display: inline-block;
}
#main-menu .dev-info-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0,0,0,0.4);
}
#main-menu .dev-info-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}
#main-menu .dev-info-modal.active {
    display: flex;
}
.dev-info-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
}
.dev-info-content h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
}
.dev-info-content p {
    margin: 10px 0;
    color: #666;
    font-size: 16px;
}
.dev-info-content a {
    color: #2196F3;
    text-decoration: none;
}
.dev-info-content a:hover {
    text-decoration: underline;
}
.dev-info-close {
    margin-top: 20px;
    background: #f44336;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}
.dev-info-close:hover {
    background: #d32f2f;
}

.menu-bottom-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.menu-bottom-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.menu-bottom-button.changelog {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.menu-bottom-button.changelog:hover {
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.6);
}

.menu-bottom-button.database {
    background: linear-gradient(135deg, #9c27b0 0%, #673ab7 100%);
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.4);
}

.menu-bottom-button.database:hover {
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.6);
}

/* 鏁欑▼鍜屾洿鏂版棩蹇楀脊绐楁牱寮?*/
.tutorial-modal, .changelog-modal, .database-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 30px;
    border-radius: 16px;
    width: 600px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 10000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: none;
}

.tutorial-modal.active, .changelog-modal.active {
    display: block;
}

.modal-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.changelog-modal .modal-title {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.modal-section {
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
}

.modal-section:last-child {
    border-bottom: none;
}

.modal-section-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #4CAF50;
}

.modal-content-list {
    list-style: none;
    padding: 0;
}

.modal-content-list li {
    margin: 10px 0;
    line-height: 1.6;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.changelog-modal .modal-content-list li {
    border-left-color: #f5576c;
}

/* 娓告垙鏁版嵁搴撳脊绐楁牱寮?*/
.database-modal .modal-title {
    background: linear-gradient(135deg, #9c27b0 0%, #673ab7 100%);
}

.database-modal.active {
    display: block;
}

.database-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.database-tab {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(156, 39, 176, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
}

.database-tab:hover {
    background: rgba(156, 39, 176, 0.3);
}

.database-tab.active {
    background: linear-gradient(135deg, #9c27b0 0%, #673ab7 100%);
    border-color: transparent;
}

.tutorial-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.tutorial-tab {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: white;
    padding: 7px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    white-space: nowrap;
}

.tutorial-tab:hover {
    background: rgba(102, 126, 234, 0.3);
}

.tutorial-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
}

.tutorial-content {
    max-height: 55vh;
    overflow-y: auto;
}

.tutorial-content .modal-section {
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
}

.tutorial-content .modal-section:last-child {
    border-bottom: none;
}

.tutorial-content .modal-section-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #4CAF50;
}

.tutorial-content .modal-content-list {
    list-style: none;
    padding: 0;
}

.tutorial-content .modal-content-list li {
    margin: 10px 0;
    line-height: 1.6;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.tutorial-content .modal-content-list li:last-child {
    margin-bottom: 0;
}

.database-content {
    max-height: 55vh;
    overflow-y: auto;
}

.database-category {
    display: none;
}

.database-category.active {
    display: block;
}

.weapon-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(156, 39, 176, 0.2);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.weapon-card:hover {
    background: rgba(156, 39, 176, 0.1);
    border-color: rgba(156, 39, 176, 0.4);
    transform: translateX(5px);
}

.weapon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.weapon-name {
    font-size: 16px;
    font-weight: bold;
    color: #e1bee7;
}

.weapon-type {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 10px;
    background: rgba(156, 39, 176, 0.3);
    color: #ce93d8;
}

.weapon-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.weapon-stat {
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px;
    border-radius: 8px;
}

.weapon-stat-value {
    font-size: 14px;
    font-weight: bold;
    color: #ba68c8;
}

.weapon-stat-label {
    font-size: 10px;
    color: #aaa;
    margin-top: 2px;
}

.weapon-desc {
    font-size: 12px;
    color: #bbb;
    line-height: 1.5;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.changelog-date {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 5px;
}

.changelog-title {
    font-size: 16px;
    font-weight: bold;
    color: #f093fb;
    margin-bottom: 10px;
}

.modal-close-button {
    position: fixed;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
    width: auto;
    display: inline-block;
}

.modal-close-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.6);
}

/* 鏁屾柟鏀诲嚮璀﹀憡鍔ㄧ敾 */
@keyframes warningPulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 0 20px rgba(255,0,0,0.8);
    }
    50% { 
        transform: scale(1.05); 
        box-shadow: 0 0 30px rgba(255,0,0,1);
    }
}

/* 閿佸畾鏍囪瘑鏍峰紡 */
.lock-reticle {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 3px dashed rgba(255, 50, 50, 0.9);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1000;
    animation: rotateLock 2s linear infinite;
    box-shadow: 0 0 20px rgba(255, 50, 50, 0.5), inset 0 0 20px rgba(255, 50, 50, 0.3);
}

.lock-reticle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    border: 2px dashed rgba(255, 150, 50, 0.7);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: rotateLockReverse 3s linear infinite;
}

.lock-reticle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 50, 0.8);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.lock-reticle.locked {
    border-color: rgba(50, 255, 50, 0.9);
    box-shadow: 0 0 30px rgba(50, 255, 50, 0.6), inset 0 0 20px rgba(50, 255, 50, 0.4);
    animation: rotateLock 1s linear infinite, pulseLock 0.5s ease-in-out infinite alternate;
}

@keyframes rotateLock {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes rotateLockReverse {
    from { transform: translate(-50%, -50%) rotate(360deg); }
    to { transform: translate(-50%, -50%) rotate(0deg); }
}

@keyframes pulseLock {
    from { transform: translate(-50%, -50%) scale(1); }
    to { transform: translate(-50%, -50%) scale(1.1); }
}

.lock-progress-ring {
    position: absolute;
    width: 90px;
    height: 90px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 999;
}

.lock-progress-ring svg {
    transform: rotate(-90deg);
}

.lock-progress-ring circle {
    fill: none;
    stroke-width: 4;
}

.lock-progress-ring .bg {
    stroke: rgba(255, 255, 255, 0.2);
}

.lock-progress-ring .progress {
    stroke: #00ff00;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s;
    filter: drop-shadow(0 0 5px #00ff00);
}

.lock-status-text {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    color: #ff3232;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 50, 50, 0.8);
    pointer-events: none;
    white-space: nowrap;
}

.lock-status-text.locked {
    color: #32ff32;
    text-shadow: 0 0 10px rgba(50, 255, 50, 0.8);
}

/* 闃茬┖绯荤粺浣嶇疆璋冩暣鏍峰紡 */
.defense-position-control {
    margin-top: 8px;
    padding: 8px;
    background: #f5f5f5;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}
.defense-position-control label {
    font-size: 11px;
    color: #666;
    display: block;
    margin-bottom: 4px;
}
.position-slider-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.position-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #ddd;
    border-radius: 3px;
    outline: none;
}
.position-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #2196F3;
    border-radius: 50%;
    cursor: pointer;
}
.position-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #2196F3;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}
.position-value {
    font-size: 11px;
    color: #333;
    min-width: 35px;
    text-align: right;
}
.position-buttons {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}
.position-btn {
    flex: 1;
    padding: 3px 8px;
    font-size: 10px;
    background: #e3f2fd;
    border: 1px solid #2196F3;
    color: #2196F3;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
}
.position-btn:hover {
    background: #2196F3;
    color: white;
}
.defense-position-section {
    margin-top: 10px;
    padding: 10px;
    background: #fafafa;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}
.defense-position-section h4 {
    font-size: 12px;
    color: #333;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.global-position-btns {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.global-position-btns button {
    flex: 1;
    padding: 6px;
    font-size: 11px;
}

/* 鎴樻枟妯″紡瀵煎脊妲戒綅鏍峰紡 */
.battle-slot {
    position: relative;
    user-select: none;
}
.battle-slot:hover {
    background: rgba(0,0,0,0.8) !important;
    transform: translateY(-2px);
}
.battle-slot.active {
    border-color: #4CAF50 !important;
    background: rgba(76,175,80,0.2) !important;
    box-shadow: 0 0 15px rgba(76,175,80,0.5);
}
.battle-slot.active .slot-missile-name {
    color: #4CAF50 !important;
}
.battle-slot.empty {
    opacity: 0.6;
}
.battle-slot.empty .slot-status {
    color: #888 !important;
}
.battle-slot.reloading {
    border-color: #FF9800 !important;
}
.battle-slot.reloading .slot-status {
    color: #FF9800 !important;
}
.battle-slot.ready {
    border-color: #4CAF50 !important;
}
.battle-slot.ready .slot-status {
    color: #4CAF50 !important;
}

#main-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    background: transparent;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 9999;
}

#main-menu h1 {
    font-size: 52px;
    font-weight: 900;
    background: linear-gradient(135deg, #ff6b6b 0%, #e94560 25%, #ffd93d 50%, #e94560 75%, #ff6b6b 100%);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 60px;
    text-align: center;
    animation: titleShimmer 4s ease-in-out infinite, titleGlow 2s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(233, 69, 96, 0.6)) drop-shadow(0 0 60px rgba(255, 217, 61, 0.3)) drop-shadow(0 0 100px rgba(233, 69, 96, 0.2));
    transform-origin: center;
    letter-spacing: 4px;
    position: relative;
    z-index: 2;
}

#main-menu h1::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    background: linear-gradient(135deg, #ff6b6b 0%, #e94560 25%, #ffd93d 50%, #e94560 75%, #ff6b6b 100%);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleShimmer 4s ease-in-out infinite, titleBlurPulse 2s ease-in-out infinite;
    filter: blur(20px) brightness(1.5);
}

#main-menu h1::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(233, 69, 96, 0.15) 0%, transparent 70%);
    z-index: -2;
    animation: titleBgPulse 3s ease-in-out infinite;
    pointer-events: none;
}

#main-menu h2 {
    font-size: 24px;
    color: #eee;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    z-index: 2;
}

/* ===== 鑳屾櫙鍥捐疆鎾?===== */
#main-menu .bg-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}
#main-menu .bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: bgFadeCycle 35s ease-in-out infinite;
}
#main-menu .bg-slide:nth-child(1) { animation-delay: 0s; }
#main-menu .bg-slide:nth-child(2) { animation-delay: 5s; }
#main-menu .bg-slide:nth-child(3) { animation-delay: 10s; }
#main-menu .bg-slide:nth-child(4) { animation-delay: 15s; }
#main-menu .bg-slide:nth-child(5) { animation-delay: 20s; }
#main-menu .bg-slide:nth-child(6) { animation-delay: 25s; }
#main-menu .bg-slide:nth-child(7) { animation-delay: 30s; }
#main-menu .bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}
@keyframes bgFadeCycle {
    0%   { opacity: 0; }
    5.7% { opacity: 1; }   /* 2s 娣″叆 */
    8.6% { opacity: 1; }   /* 3s 鍋滅暀 */
    14.3% { opacity: 0; }  /* 2s 娣″嚭 */
    100% { opacity: 0; }
}

.menu-buttons {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 900px;
    position: relative;
    z-index: 2;
}

.mode-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-option input[type="radio"] {
    display: none;
}

.mode-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 3px solid transparent;
}

.mode-label {
    margin-top: 10px;
    font-size: 14px;
    color: #eee;
    font-weight: bold;
    text-align: center;
}

.mode-option:hover .mode-circle {
    transform: scale(1.1);
}

.mode-option input[type="radio"]:checked + .mode-circle {
    border-color: #fff;
    box-shadow: 0 0 25px rgba(255,255,255,0.5);
    transform: scale(1.15);
}

.mode-circle.simulation {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.mode-circle.realistic {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
}

.mode-circle.battle {
    background: linear-gradient(135deg, #f44336, #d32f2f);
}

.mode-circle.team5v5 {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
}

.mode-circle.team2v2 {
    background: linear-gradient(135deg, #ff9800, #f57c00);
}

.mode-circle.joint-combat {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
}

.mode-circle.tank {
    background: linear-gradient(135deg, #795548, #5D4037);
}

/* 鍦板浘澶у皬閫夋嫨鎸夐挳鏍峰紡 */
.map-size-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: bold;
    border: 2px solid #666;
    border-radius: 8px;
    background: linear-gradient(135deg, #444, #333);
    color: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 70px;
}

.map-size-btn:hover {
    background: linear-gradient(135deg, #555, #444);
    border-color: #888;
    transform: translateY(-2px);
}

.map-size-btn.active {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
    border-color: #fff;
    color: white;
    box-shadow: 0 0 15px rgba(156, 39, 176, 0.5);
}

.menu-author {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 9999;
}

#joint-combat-submenu {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

#joint-combat-submenu h2 {
    font-size: 28px;
    color: #eee;
    margin-bottom: 40px;
    text-align: center;
}

.submode-selection {
    display: flex;
    flex-direction: row;
    gap: 30px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.submode-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submode-option input[type="radio"] {
    display: none;
}

.submode-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 3px solid transparent;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
}

.submode-circle.locked {
    background: linear-gradient(135deg, #555, #444);
    color: #888;
    cursor: not-allowed;
    opacity: 0.6;
}

.submode-label {
    margin-top: 10px;
    font-size: 14px;
    color: #eee;
    font-weight: bold;
    text-align: center;
}

.submode-option:hover .submode-circle:not(.locked) {
    transform: scale(1.1);
}

.submode-option input[type="radio"]:checked + .submode-circle {
    border-color: #fff;
    box-shadow: 0 0 25px rgba(255,255,255,0.5);
    transform: scale(1.15);
}

.submode-option input[type="radio"]:disabled + .submode-circle {
    cursor: not-allowed;
}

.menu-version {
    position: absolute;
    bottom: 30px;
    color: #888;
    font-size: 14px;
    z-index: 2;
}

.menu-author {
    position: absolute;
    bottom: 60px;
    color: #aaa;
    font-size: 12px;
    z-index: 2;
}

.back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 10px 20px;
    font-size: 16px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    width: auto;
}

.back-button:hover {
    background: rgba(255,255,255,0.3);
}

#missile-select {
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    height: 100vh;
    width: 100vw;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 9999;
    overflow-y: auto;
    padding: 20px 0;
}

#missile-select h1 {
    font-size: 36px;
    color: #e94560;
    text-shadow: 0 0 20px rgba(233, 69, 96, 0.5);
    margin-bottom: 40px;
    text-align: center;
}

.missile-cards,
.rocket-cards,
.torpedo-cards,
.map-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    justify-content: center;
    margin-bottom: 40px;
    height: 300px;
    min-height: 300px;
    max-height: 95vh;
    overflow-y: auto;
    padding: 25px;
    width: 95%;
    max-width: 1800px;
}

.map-card {
    background: linear-gradient(135deg, #1a2a3a, #2a3a4a);
    border: 2px solid #3a5a7a;
    border-radius: 12px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    text-align: center;
    user-select: none;
}
.map-card:hover {
    border-color: #5a9aff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(90, 154, 255, 0.3);
}
.map-card.selected {
    border-color: #5a9aff;
    background: linear-gradient(135deg, #1a3a5a, #2a4a6a);
    box-shadow: 0 0 20px rgba(90, 154, 255, 0.5);
}
.map-card .map-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 6px;
}
.map-card .map-desc {
    font-size: 13px;
    color: #aac;
    line-height: 1.4;
}
.map-card .map-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
}
.map-card .map-badge.ocean {
    background: rgba(0, 105, 148, 0.6);
    color: #6af;
}
.map-card .map-badge.greenland {
    background: rgba(107, 142, 35, 0.6);
    color: #8d4;
}
.map-card .map-badge.polar-night {
    background: rgba(10, 42, 74, 0.6);
    color: #6af;
}

.missile-card {
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid transparent;
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(1.03);
    transform-origin: center;
}

.missile-card:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.missile-card.selected {
    border-color: #e94560;
    background: rgba(233, 69, 96, 0.2);
    box-shadow: 0 0 25px rgba(233, 69, 96, 0.5);
}

.missile-card h3 {
    font-size: 14px;
    color: #fff;
    margin-bottom: 8px;
    margin-left: 20px;
    text-align: center;
    line-height: 1.3;
}

.missile-card .stat-row {
    display: flex;
    justify-content: space-between;
    margin: 3px 0;
    color: #ccc;
    font-size: 12px;
    width: 100%;
}

.missile-card .stat-value {
    color: #4CAF50;
    font-weight: bold;
}

.missile-card .stat-value.damage {
    color: #ff5722;
}

.missile-card .missile-type-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    color: white;
    font-size: 11px;
    font-weight: bold;
    margin: 4px 0 8px 0;
    text-align: center;
}

.missile-card .description {
    margin-top: 8px;
    color: #aaa;
    font-size: 11px;
    line-height: 1.3;
    text-align: center;
}

.missile-card.selected-other {
    opacity: 0.5;
    border-color: #666;
}

/* 鎴樿埌閫夋嫨鍖哄煙鏍峰紡 */
.battleship-section {
    margin: 20px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    width: 90%;
    max-width: 1200px;
}

.battleship-section h2 {
    font-size: 24px;
    color: #2196F3;
    text-shadow: 0 0 15px rgba(33, 150, 243, 0.5);
    margin-bottom: 20px;
    text-align: center;
}

.battleship-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    justify-content: center;
    padding: 10px;
}

.battleship-card {
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid transparent;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.battleship-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.battleship-card.selected {
    border-color: #2196F3;
    background: rgba(33, 150, 243, 0.2);
    box-shadow: 0 0 25px rgba(33, 150, 243, 0.5);
}

.battleship-card.carrier-selected {
    border-color: #e94560;
    background: rgba(233, 69, 96, 0.2);
    box-shadow: 0 0 25px rgba(233, 69, 96, 0.5);
}

.battleship-card.submarine-selected {
    border-color: #00BCD4;
    background: rgba(0, 188, 212, 0.2);
    box-shadow: 0 0 25px rgba(0, 188, 212, 0.5);
}

.battleship-card h3 {
    font-size: 18px;
    color: #fff;
    margin-bottom: 10px;
    text-align: center;
    line-height: 1.3;
}

.battleship-card .battleship-type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    margin: 5px 0 12px 0;
    text-align: center;
}

.battleship-type-default {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.battleship-type-carrier {
    background: linear-gradient(135deg, #e94560, #c62828);
}

.battleship-type-submarine {
    background: linear-gradient(135deg, #00BCD4, #00838F);
}

.battleship-card .stat-row {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
    color: #ccc;
    font-size: 13px;
    width: 100%;
}

.battleship-card .stat-value {
    color: #4CAF50;
    font-weight: bold;
}

.battleship-card .description {
    margin-top: 10px;
    color: #aaa;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
}

.battleship-card .feature-tag {
    margin-top: 8px;
    padding: 4px 10px;
    background: rgba(233, 69, 96, 0.3);
    border: 1px solid #e94560;
    border-radius: 8px;
    color: #e94560;
    font-size: 11px;
    font-weight: bold;
}

/* 椋炴満閫夋嫨鍖哄煙鏍峰紡 */
.aircraft-section {
    margin: 20px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    width: 90%;
    max-width: 1200px;
    display: none;
}

.aircraft-section.visible {
    display: block;
}

.aircraft-section h2 {
    font-size: 24px;
    color: #4CAF50;
    text-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
    margin-bottom: 20px;
    text-align: center;
}

.aircraft-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    justify-content: center;
    padding: 10px;
}

.aircraft-card {
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid transparent;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.aircraft-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.aircraft-card.selected {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.2);
    box-shadow: 0 0 25px rgba(76, 175, 80, 0.5);
}

.aircraft-card h3 {
    font-size: 18px;
    color: #fff;
    margin-bottom: 10px;
    text-align: center;
    line-height: 1.3;
}

.aircraft-card .aircraft-type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    margin: 5px 0 12px 0;
    text-align: center;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
}

.aircraft-card .description {
    margin: 10px 0;
    color: #aaa;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
}

.aircraft-card .missiles-info {
    width: 100%;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.aircraft-card .missiles-info h4 {
    font-size: 13px;
    color: #4CAF50;
    margin-bottom: 8px;
    text-align: center;
}

.aircraft-card .missile-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    margin: 5px 0;
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    font-size: 12px;
}

.aircraft-card .missile-name {
    color: #fff;
}

.aircraft-card .missile-stats {
    color: #aaa;
    font-size: 11px;
}

/* 闃茬┖绯荤粺閫夋嫨鍖哄煙鏍峰紡 */
.defense-section {
    margin: 20px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    width: 90%;
    max-width: 1200px;
}

.defense-section h2 {
    font-size: 24px;
    color: #4CAF50;
    text-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
    margin-bottom: 20px;
    text-align: center;
}

.defense-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    justify-content: center;
    max-height: 40vh;
    overflow-y: auto;
    padding: 10px;
}

.defense-card {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.defense-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.defense-card.selected {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.2);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.4);
}

.defense-card h3 {
    font-size: 14px;
    color: #fff;
    margin-bottom: 8px;
    text-align: center;
    line-height: 1.3;
}

.defense-card .defense-type-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    color: white;
    font-size: 10px;
    font-weight: bold;
    margin: 3px 0 8px 0;
    text-align: center;
}

.defense-card .stat-row {
    display: flex;
    justify-content: space-between;
    margin: 3px 0;
    color: #ccc;
    font-size: 11px;
    width: 100%;
}

.defense-card .stat-value {
    color: #4CAF50;
    font-weight: bold;
}

.defense-card .effect-row {
    display: flex;
    justify-content: space-between;
    margin: 2px 0;
    color: #aaa;
    font-size: 10px;
    width: 100%;
}

.defense-card .effect-value {
    color: #FF9800;
    font-weight: bold;
}

.defense-card .ammo-value {
    color: #2196F3;
    font-weight: bold;
}



/* 闃茬┖绯荤粺绫诲瀷棰滆壊 */
.defense-type-sam { background: linear-gradient(135deg, #2196F3, #1976D2); }
.defense-type-short-range { background: linear-gradient(135deg, #4CAF50, #388E3C); }
.defense-type-naval { background: linear-gradient(135deg, #009688, #00796B); }
.defense-type-abm { background: linear-gradient(135deg, #9C27B0, #7B1FA2); }
.defense-type-aaa { background: linear-gradient(135deg, #795548, #5D4037); }

/* 瀵煎脊妲戒綅鏍峰紡 */
.missile-slots {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}

.slot-header {
    color: #fff;
    font-size: 18px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
}

.slots-container {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.missile-slot {
    width: 160px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
}

.missile-slot:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.missile-slot.active {
    border-color: #e94560;
    background: rgba(233, 69, 96, 0.2);
    box-shadow: 0 0 20px rgba(233, 69, 96, 0.4);
}

.missile-slot.filled {
    background: rgba(76, 175, 80, 0.2);
    border-color: #4CAF50;
}

.missile-slot.filled.active {
    background: rgba(76, 175, 80, 0.3);
    border-color: #e94560;
}

.missile-slot .slot-number {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 8px;
}

.missile-slot .slot-empty {
    font-size: 14px;
    color: #888;
}

.missile-slot .slot-missile-name {
    font-size: 13px;
    color: #4CAF50;
    font-weight: bold;
    line-height: 1.3;
}

.missile-slot .clear-slot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.missile-slot .clear-slot:hover {
    background: #d32f2f;
}

.missile-select-buttons {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 40px;
    position: sticky;
    bottom: 20px;
    background: rgba(0,0,0,0.5);
    padding: 20px;
    border-radius: 15px;
    z-index: 10;
}

.missile-select-button {
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.missile-select-button.confirm {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    color: white;
}

.missile-select-button.confirm:hover {
    background: linear-gradient(135deg, #66BB6A, #43A047);
    transform: translateY(-2px);
}

.missile-select-button.confirm:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
}

.missile-select-button.back {
    background: linear-gradient(135deg, #607D8B, #455A64);
    color: white;
}

.missile-select-button.back:hover {
    background: linear-gradient(135deg, #78909C, #546E7A);
    transform: translateY(-2px);
}

#battle-launch-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(244, 67, 54, 0.6);
}

#battle-launch-btn:active {
    transform: translateY(0);
}

#battle-launch-btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
}

/* ===== BOSS鎴?HUD ===== */
#boss-hud {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 100;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #00aaff;
    border-radius: 10px;
    padding: 12px 16px;
    min-width: 280px;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.3);
}
#boss-hud-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
#boss-name {
    font-size: 18px;
    font-weight: bold;
    color: #00ccff;
    text-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
}
#boss-wave-indicator {
    font-size: 14px;
    color: #ffcc00;
    background: rgba(255, 204, 0, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
}
#boss-health-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 6px 10px;
    margin-bottom: 8px;
    position: relative;
}
#boss-health-bar {
    height: 8px;
    background: #00ff44;
    border-radius: 4px;
    transition: width 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 0 8px rgba(0, 255, 68, 0.5);
}
#boss-health-text {
    font-size: 13px;
    color: #ccc;
    margin-top: 4px;
    display: block;
}
#boss-q-skill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 136, 0, 0.1);
    border: 1px solid rgba(255, 136, 0, 0.3);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
}
#boss-q-remaining {
    color: #ffaa00;
}
#boss-q-cooldown {
    color: #ff4444;
    font-size: 12px;
    margin-left: 4px;
}

/* ===== BOSS鎴?缁撴灉寮圭獥 ===== */
.game-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
}
.game-modal-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid #00aaff;
    border-radius: 20px;
    padding: 40px 50px;
    text-align: center;
    box-shadow: 0 0 60px rgba(0, 170, 255, 0.4);
    max-width: 500px;
    animation: modalIn 0.4s ease-out;
}
@keyframes modalIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes titleShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes titleGlow {
    0%, 100% { filter: drop-shadow(0 0 30px rgba(233, 69, 96, 0.6)) drop-shadow(0 0 60px rgba(255, 217, 61, 0.3)) drop-shadow(0 0 100px rgba(233, 69, 96, 0.2)); }
    50% { filter: drop-shadow(0 0 40px rgba(233, 69, 96, 0.9)) drop-shadow(0 0 80px rgba(255, 217, 61, 0.5)) drop-shadow(0 0 120px rgba(233, 69, 96, 0.4)) drop-shadow(0 0 160px rgba(255, 217, 61, 0.2)); }
}

@keyframes titleBgPulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes titleBlurPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.9; }
}
.game-modal-content h1 {
    font-size: 48px;
    margin-bottom: 16px;
}
.game-modal-content p {
    font-size: 18px;
    color: #ccc;
    margin-bottom: 30px;
    line-height: 1.6;
}
.game-modal-btn {
    background: linear-gradient(135deg, #2196F3, #1565C0);
    color: white;
    border: none;
    padding: 12px 36px;
    font-size: 18px;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.game-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.5);
}

/* ===== 鍧﹀厠瀵规垬妯″紡 ===== */
#tank-submenu {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
#tank-submenu h2 {
    color: #ff9800;
    font-size: 32px;
    margin-bottom: 20px;
}
#tank-config-container {
    background: rgba(30,30,30,0.95);
    padding: 30px;
    border-radius: 16px;
    border: 2px solid #ff9800;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}
.tank-config-section {
    margin-bottom: 20px;
}
.tank-config-section h3 {
    color: #ffa726;
    font-size: 18px;
    margin-bottom: 10px;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
}
.tank-mode-selection {
    display: flex;
    gap: 12px;
}
.tank-mode-option {
    flex: 1;
}
.tank-mode-option input { display: none; }
.tank-mode-btn {
    display: block;
    padding: 12px;
    background: #333;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}
.tank-mode-option input:checked + .tank-mode-btn {
    background: #e65100;
    border-color: #ff9800;
    box-shadow: 0 0 15px rgba(255,152,0,0.4);
}
.tank-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
}
.tank-grid-item {
    background: #2a2a2a;
    border: 2px solid #444;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}
.tank-grid-item:hover {
    border-color: #888;
    background: #333;
}
.tank-grid-item.selected {
    border-color: #ff9800;
    background: #3a2a00;
}
.tank-grid-item .tank-name {
    color: #fff;
    font-size: 13px;
    font-weight: bold;
}
.tank-grid-item .tank-country {
    color: #aaa;
    font-size: 11px;
}
.tank-grid-item .tank-stats {
    color: #888;
    font-size: 10px;
    margin-top: 4px;
}
.tank-reroll-btn {
    display: block;
    margin: 10px auto 0;
    padding: 8px 20px;
    background: #444;
    color: #fff;
    border: 1px solid #666;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
.tank-reroll-btn:hover {
    background: #555;
}
.tank-start-btn {
    display: block;
    margin: 20px auto 0;
    padding: 14px 48px;
    background: linear-gradient(135deg, #e65100, #ff9800);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}
.tank-start-btn:hover {
    transform: scale(1.05);
}
/* 鍧﹀厠HUD */
#tank-hud {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 100;
    display: none;
    pointer-events: none;
}
#tank-hud-left {
    position: absolute;
    bottom: 0;
    left: 0;
    background: rgba(0,0,0,0.75);
    border: 1px solid #555;
    border-radius: 10px;
    padding: 12px 16px;
    min-width: 220px;
    color: #fff;
    font-size: 13px;
    pointer-events: auto;
}
#tank-hud-bottom {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.75);
    border: 1px solid #555;
    border-radius: 10px;
    padding: 10px 20px;
    color: #fff;
    text-align: center;
    pointer-events: auto;
}
#tank-hud-right {
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(0,0,0,0.75);
    border: 1px solid #555;
    border-radius: 10px;
    padding: 12px 16px;
    color: #fff;
    font-size: 14px;
    pointer-events: auto;
}
.tank-hp-bar {
    width: 100%;
    height: 14px;
    background: #333;
    border-radius: 7px;
    overflow: hidden;
    margin-top: 4px;
}
.tank-hp-fill {
    height: 100%;
    border-radius: 7px;
    transition: width 0.3s;
    background: linear-gradient(90deg, #f44336, #ff9800, #4caf50);
}
.tank-reload-bar {
    width: 200px;
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 4px;
}
.tank-reload-fill {
    height: 100%;
    background: #ff9800;
    border-radius: 4px;
    transition: width 0.1s;
}
.tank-kill-counter {
    font-size: 24px;
    font-weight: bold;
    color: #ff9800;
}
.tank-skill-btn {
    display: inline-block;
    padding: 6px 14px;
    background: #333;
    border: 1px solid #666;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    margin-top: 4px;
    pointer-events: auto;
}
.tank-skill-btn:hover {
    background: #444;
}
.tank-skill-btn.on-cooldown {
    opacity: 0.5;
    cursor: not-allowed;
}
#tank-crosshair {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    pointer-events: none;
    z-index: 101;
}
.crosshair-line {
    position: absolute;
    background: rgba(255, 68, 68, 0.85);
}
.crosshair-h {
    width: 20px;
    height: 2px;
    top: 11px;
    left: 2px;
}
.crosshair-v {
    width: 2px;
    height: 20px;
    top: 2px;
    left: 11px;
}
.crosshair-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 68, 68, 0.9);
    border-radius: 50%;
    top: 10px;
    left: 10px;
}
#tank-result-panel {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 99999;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
#tank-result-panel .result-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
}
#tank-result-panel .result-title.win { color: #4caf50; }
#tank-result-panel .result-title.lose { color: #f44336; }
#tank-result-panel .result-stats {
    color: #ccc;
    font-size: 16px;
    margin-bottom: 30px;
}
#tank-result-panel .result-btn {
    padding: 12px 36px;
    margin: 0 10px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s;
}
#tank-result-panel .result-btn:hover { transform: scale(1.05); }
#tank-result-panel .result-btn.replay { background: #ff9800; color: #fff; }
#tank-result-panel .result-btn.menu { background: #555; color: #fff; }
