/* 基础样式 */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Arial', sans-serif;
}

#header {
    background: #2c3e50;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

#header h1 {
    margin: 0;
    font-size: 24px;
}

#controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

#controls button {
    padding: 8px 16px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

#controls button:hover {
    background: #2980b9;
}

#missileCounter {
    background: #e74c3c;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: bold;
}

#map {
    height: calc(100vh - 80px);
    width: 100%;
}

.info.legend {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
}

.info.legend h4 {
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
    color: #1f2937;
}

.info.legend div {
    margin: 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info.legend span {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.unit-popup {
    min-width: 200px;
    max-width: 300px;
}

.unit-popup h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 16px;
}

.unit-popup p {
    margin: 4px 0;
    font-size: 13px;
    line-height: 1.4;
}

.unit-popup strong {
    color: #374151;
}

.control-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin: 10px;
    position: absolute;
    z-index: 1000;
}

.layer-switcher {
    position: absolute;
    top: 100px;
    right: 10px;
}

.timeline-control {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
}

.control-panel h4 {
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
    color: #1f2937;
    font-size: 16px;
}

.control-panel label {
    display: block;
    margin: 6px 0;
    font-size: 14px;
    color: #374151;
}

.control-panel input[type="checkbox"] {
    margin-right: 8px;
}

.timeline-slider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.timeline-slider input[type="range"] {
    width: 150px;
}

.auto-launch {
    margin-top: 10px;
}

@media (max-width: 768px) {
    .layer-switcher {
        top: 120px;
        right: 10px;
        width: 200px;
    }
    
    .timeline-control {
        bottom: 120px;
        left: 10px;
        transform: none;
        width: calc(100% - 20px);
    }
}