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

body {
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    background: #000;
}

#gameContainer {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#gameCanvas {
    position: absolute;
    top: 0;
    left: 0;
    background: #1a1a1a;
    cursor: crosshair;
}

/* HUD 样式 */
#hud {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 10;
}

.health-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 200px;
    height: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #333;
    border-radius: 10px;
    overflow: hidden;
}

.health-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff3333, #ff6666);
    transition: width 0.3s ease;
}

.health-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.ammo-display {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 15px;
    border-radius: 5px;
    color: white;
    font-size: 18px;
    font-weight: bold;
}

.equipment-slots {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
}

.slot {
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #444;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    cursor: pointer;
}

.slot:hover {
    border-color: #888;
}

/* 小地图样式 */
#minimap {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 200px;
    height: 200px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #444;
    border-radius: 10px;
}

/* 库存样式 */
#inventory {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #444;
    border-radius: 10px;
    padding: 20px;
    z-index: 20;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(10, 40px);
    grid-template-rows: repeat(6, 40px);
    gap: 2px;
}

.inventory-slot {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #333;
    border-radius: 3px;
    cursor: pointer;
}

.inventory-slot:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 游戏菜单样式 */
#gameMenu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.menu-content {
    text-align: center;
    color: white;
}

.menu-content h1 {
    font-size: 48px;
    margin-bottom: 30px;
    color: #ff4444;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.menu-content button {
    display: block;
    width: 250px;
    margin: 15px auto;
    padding: 15px;
    background: linear-gradient(135deg, #444, #666);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-content button:hover {
    background: linear-gradient(135deg, #666, #888);
    transform: translateY(-2px);
}

.hidden {
    display: none !important;
}

/* 设置菜单样式 */
.settings-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.settings-content {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 2px solid #4a5568;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid #4a5568;
}

.settings-header h2 {
    color: #ffffff;
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.close-settings {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-settings:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.settings-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #4a5568;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.tab-btn.active {
    color: #ffffff;
    background: rgba(74, 85, 104, 0.5);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #4CAF50;
}

.settings-panels {
    padding: 20px 30px;
    max-height: 400px;
    overflow-y: auto;
}

.settings-panel {
    display: none;
}

.settings-panel.active {
    display: block;
}

.setting-group {
    margin-bottom: 20px;
}

.setting-group label {
    display: block;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.setting-group select,
.setting-group input[type="range"] {
    width: 100%;
    background: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 6px;
    color: #ffffff;
    padding: 10px;
    font-size: 14px;
}

.setting-group select:focus,
.setting-group input[type="range"]:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.setting-group input[type="range"] {
    padding: 5px 0;
    height: 40px;
    cursor: pointer;
}

.setting-group input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: #4CAF50;
    border-radius: 50%;
    cursor: pointer;
    margin-top: -8px;
}

.setting-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #4CAF50;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.volume-value,
.sensitivity-value {
    display: inline-block;
    margin-left: 10px;
    color: #4CAF50;
    font-weight: 600;
    min-width: 50px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 10px;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label span {
    color: #e2e8f0;
    font-size: 14px;
    user-select: none;
}

.settings-footer {
    padding: 20px 30px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid #4a5568;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.btn-primary {
    background: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* 设置通知动画 */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 设置通知样式 */
.settings-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    z-index: 10000;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 滚动条样式 */
.settings-panels::-webkit-scrollbar {
    width: 8px;
}

.settings-panels::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.settings-panels::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 4px;
}

.settings-panels::-webkit-scrollbar-thumb:hover {
    background: #5a6578;
}

/* 撤离动画 */
.extraction-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0, 100, 0, 0.9), rgba(0, 200, 0, 0.9));
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: extractionPulse 2s ease-in-out infinite;
}

@keyframes extractionPulse {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
}

.extraction-content {
    text-align: center;
    color: white;
    animation: extractionScale 2s ease-in-out infinite;
}

@keyframes extractionScale {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.extraction-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.extraction-timer {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.extraction-progress {
    width: 400px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    overflow: hidden;
    margin: 0 auto 20px;
}

.extraction-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00ff00, #00cc00);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 15px;
}

.extraction-message {
    font-size: 18px;
    opacity: 0.9;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .health-bar {
        width: 150px;
        height: 15px;
    }
    
    .equipment-slots {
        bottom: 10px;
        left: 10px;
    }
    
    .slot {
        width: 45px;
        height: 45px;
    }
    
    #minimap {
        width: 150px;
        height: 150px;
    }
    
    .inventory-grid {
        grid-template-columns: repeat(8, 35px);
        grid-template-rows: repeat(5, 35px);
    }
    
    .settings-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .settings-header {
        padding: 15px 20px;
    }
    
    .settings-header h2 {
        font-size: 20px;
    }
    
    .settings-panels {
        padding: 15px 20px;
        max-height: 300px;
    }
    
    .extraction-content h2 {
        font-size: 36px;
    }
    
    .extraction-timer {
        font-size: 28px;
    }
    
    .extraction-progress {
        width: 300px;
    }
}