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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
    color: #fff;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.game-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.game-header {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px 10px 0 0;
    font-size: 1.2em;
    font-weight: bold;
    align-items: center;
}

.score, .high-score {
    color: #00ff88;
    text-shadow: 0 0 10px #00ff88;
}

#gameCanvas {
    display: block;
    background: #000;
    border: 2px solid #00ff88;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    width: 100%;
    max-width: 800px;
    height: auto;
}

.drag-hint {
    margin-top: 12px;
    text-align: center;
    font-size: 1em;
    color: rgba(0, 255, 136, 0.85);
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
    letter-spacing: 1px;
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 30px;
    border-radius: 20px;
    border: 3px solid #ff4444;
    box-shadow: 0 0 30px rgba(255, 68, 68, 0.5);
    display: none;
    z-index: 100;
}

.game-over h2 {
    color: #ff4444;
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #ff4444;
}

.game-over p {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #fff;
}

#restartBtn {
    padding: 15px 30px;
    font-size: 1.2em;
    background: linear-gradient(45deg, #00ff88, #00cc66);
    border: none;
    color: #000;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}

#restartBtn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.8);
}

/* 开始屏幕样式 */
.start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.start-content {
    text-align: center;
    animation: fadeIn 1s ease-in;
}

.start-content h1 {
    color: #00ff88;
    font-size: 4em;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.6);
    animation: pulse 2s ease-in-out infinite;
}

.start-hint {
    color: #fff;
    font-size: 1.2em;
    margin-bottom: 30px;
    opacity: 0.8;
    animation: blink 1.5s ease-in-out infinite;
}

.start-button {
    position: relative;
    padding: 20px 40px;
    font-size: 1.5em;
    background: linear-gradient(45deg, #00ff88, #00cc66);
    border: none;
    border-radius: 50px;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
    transition: all 0.3s ease;
    animation: buttonGlow 2s ease-in-out infinite;
}

.start-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.8);
}

.start-button:active {
    transform: scale(0.98);
}

.button-text {
    position: relative;
    z-index: 2;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

/* 武器选择界面样式 */
.weapon-select {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.weapon-content {
    text-align: center;
    animation: fadeIn 1s ease-in;
}

.weapon-content h2 {
    color: #00ff88;
    font-size: 3em;
    margin-bottom: 30px;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.6);
}

.weapon-options {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}

.weapon-option {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ff88;
    border-radius: 20px;
    padding: 25px;
    width: 250px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

.weapon-option:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.6);
    background: rgba(0, 255, 136, 0.1);
}

.weapon-option.unlocked {
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.weapon-option.unlocked:hover {
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
    background: rgba(255, 215, 0, 0.1);
}

.weapon-icon {
    font-size: 4em;
    margin-bottom: 15px;
    animation: pulse 2s ease-in-out infinite;
}

.weapon-option h3 {
    color: #00ff88;
    font-size: 1.5em;
    margin-bottom: 10px;
}

.weapon-option p {
    color: #fff;
    opacity: 0.8;
    margin-bottom: 15px;
}

.unlock-condition {
    color: #ff4444;
    font-size: 0.9em;
    opacity: 0.8;
}

.weapon-option.unlocked .unlock-condition {
    display: none;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { text-shadow: 0 0 20px rgba(0, 255, 136, 0.6); }
    50% { text-shadow: 0 0 30px rgba(0, 255, 136, 0.9); }
}

@keyframes blink {
    0%, 50% { opacity: 0.8; }
    51%, 100% { opacity: 0.4; }
}

@keyframes buttonGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 255, 136, 0.5); }
    50% { box-shadow: 0 0 30px rgba(0, 255, 136, 0.8); }
}

@media (max-width: 768px) {
    .game-header {
        font-size: 1em;
        padding: 8px 15px;
    }
    
    .control-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5em;
    }
    
    .game-over h2 {
        font-size: 2em;
    }
    
    .game-over p {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 0 10px;
    }
    
    .control-buttons {
        gap: 10px;
    }
    
    .control-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2em;
    }
}

/* 管理员功能样式 */
.admin-btn {
    position: absolute;
    top: 60px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 1.5em;
    background: rgba(255, 215, 0, 0.2);
    border: 2px solid #ffd700;
    color: #ffd700;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 50;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.admin-btn:hover {
    background: rgba(255, 215, 0, 0.4);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 300;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #1a1a2e;
    margin: 15% auto;
    padding: 30px;
    border: 2px solid #00ff88;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
    animation: fadeIn 0.5s ease-in;
}

.modal-content h2 {
    color: #00ff88;
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.6);
}

.modal-content p {
    color: #fff;
    margin-bottom: 20px;
    opacity: 0.9;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #00ff88;
    text-decoration: none;
}

.password-input {
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ff88;
    border-radius: 10px;
    color: #00ff88;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: inset 0 0 10px rgba(0, 255, 136, 0.2);
}

.password-input:focus {
    outline: none;
    box-shadow: inset 0 0 15px rgba(0, 255, 136, 0.4);
    border-color: #ffd700;
}

.verify-btn,
.set-score-btn {
    padding: 15px 30px;
    font-size: 1.2em;
    background: linear-gradient(45deg, #00ff88, #00cc66);
    border: none;
    color: #000;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
    margin-top: 10px;
}

.verify-btn:hover,
.set-score-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.8);
}

.error-message {
    color: #ff4444;
    margin-top: 15px;
    font-size: 0.9em;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.error-message.show {
    opacity: 1;
}

.success-message {
    color: #00ff88;
    margin-top: 15px;
    font-size: 0.9em;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.success-message.show {
    opacity: 1;
}

/* 管理员面板样式 */
.admin-panel {
    display: none;
    position: fixed;
    z-index: 300;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.admin-content {
    background-color: #1a1a2e;
    margin: 10% auto;
    padding: 30px;
    border: 2px solid #ffd700;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    animation: fadeIn 0.5s ease-in;
}

.admin-content h2 {
    color: #ffd700;
    margin-bottom: 30px;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

.admin-section {
    margin-bottom: 30px;
}

.admin-section h3 {
    color: #00ff88;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.score-control {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.score-control label {
    color: #fff;
    font-size: 1.2em;
    font-weight: bold;
}

.score-input {
    width: 70%;
    padding: 15px;
    font-size: 1.5em;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #ffd700;
    border-radius: 10px;
    color: #ffd700;
    text-align: center;
    box-shadow: inset 0 0 10px rgba(255, 215, 0, 0.2);
}

.score-input:focus {
    outline: none;
    box-shadow: inset 0 0 15px rgba(255, 215, 0, 0.4);
    border-color: #00ff88;
}