/* 飞机大战游戏专用样式文件 */

/* 游戏容器主体样式 */
.game-container {
    max-width: 1200px;
    width: 95%;
    margin: 10px auto;
    padding: 10px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    min-height: 80vh;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.game-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.game-header h1 {
    font-size: 3rem;
    font-weight: bold;
    margin: 0;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #fff, #f0f8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.game-header .header-content {
    position: relative;
    z-index: 1;
}

.game-controls {
    display: flex;
    gap: 10px;
}

.game-controls button {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.game-controls .button {
    background: #10b981;
    color: white;
}

.game-controls .button:hover {
    background: #059669;
    transform: translateY(-2px);
}

.game-controls .secondary {
    background: #f59e0b;
    color: white;
}

.game-controls .secondary:hover {
    background: #d97706;
}

.game-controls .third {
    background: #ef4444;
    color: white;
}

.game-controls .third:hover {
    background: #dc2626;
}

.game-controls button:disabled {
    background: #6b7280;
    cursor: not-allowed;
    transform: none;
}

.score-display {
    display: flex;
    gap: 20px;
    font-size: 16px;
    font-weight: 600;
}

.game-area {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

#gameCanvas {
    border: 4px solid #4f46e5;
    border-radius: 15px;
    background: linear-gradient(180deg, #1e40af 0%, #3730a3 50%, #1e1b4b 100%);
    box-shadow: 0 15px 35px rgba(79, 70, 229, 0.4);
    max-width: 100%;
    height: auto;
    transition: all 0.3s ease;
}

#gameCanvas:hover {
    box-shadow: 0 20px 45px rgba(79, 70, 229, 0.5);
    transform: translateY(-2px);
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid #f59e0b;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
}

.game-over h2 {
    margin-bottom: 15px;
    font-size: 28px;
    color: #f59e0b;
}

.game-over p {
    margin-bottom: 20px;
    font-size: 18px;
}

.new-record {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    display: inline-block;
    margin: 10px 0;
    animation: recordPulse 1s ease-in-out infinite;
}

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

.game-instructions {
    background: #f8fafc;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.game-instructions h3 {
    margin-bottom: 15px;
    color: #4f46e5;
}

.game-instructions ul {
    list-style: none;
    padding: 0;
}

.game-instructions li {
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
}

.game-instructions li:last-child {
    border-bottom: none;
}

.game-instructions li:before {
    content: "🎮";
    margin-right: 10px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .game-container {
        max-width: 900px;
        width: 90%;
        padding: 25px;
    }

    .game-header h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .game-container {
        width: 95%;
        margin: 10px auto;
        padding: 20px;
        border-radius: 15px;
        min-height: 70vh;
    }

    .game-header {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
        margin-bottom: 25px;
    }

    .game-header h1 {
        font-size: 2.2rem;
        text-align: center;
    }

    #gameCanvas {
        width: 100%;
        height: auto;
        max-width: 500px;
        border-width: 3px;
    }

    .score-display {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .game-controls {
        flex-wrap: wrap;
        justify-content: center;
    }

    .game-controls button {
        padding: 12px 20px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .game-container {
        width: 98%;
        padding: 15px;
        margin: 5px auto;
    }

    .game-header {
        padding: 15px;
    }

    .game-header h1 {
        font-size: 1.8rem;
    }

    #gameCanvas {
        max-width: 100%;
        border-width: 2px;
    }

    .game-controls button {
        padding: 10px 15px;
        font-size: 0.9rem;
        margin: 2px;
    }

    .game-instructions {
        padding: 15px;
        font-size: 0.9rem;
    }
}