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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
    padding: 20px;
}

.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    text-align: center;
    max-width: 900px;
    width: 100%;
}

.game-header {
    margin-bottom: 20px;
}

.game-header h1 {
    color: #1e3c72;
    font-size: 2.5em;
    margin-bottom: 15px;
    font-weight: 700;
}

.game-stats {
    display: flex;
    justify-content: space-around;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    font-weight: 600;
}

.stat {
    color: #495057;
    font-size: 1.1em;
}

.stat span {
    color: #1e3c72;
    font-weight: 700;
}

.game-area {
    margin-bottom: 25px;
}

#gameCanvas {
    border: 3px solid #1e3c72;
    border-radius: 10px;
    background: #000;
    display: block;
    margin: 0 auto 20px;
    cursor: none;
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    background: #1e3c72;
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn:hover {
    background: #2a5298;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 60, 114, 0.3);
}

.btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.game-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    text-align: left;
}

.instructions, .controls {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #1e3c72;
}

.instructions h3, .controls h3 {
    color: #1e3c72;
    margin-bottom: 15px;
    font-size: 1.3em;
}

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

.instructions li, .controls li {
    color: #495057;
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
}

.instructions li:before, .controls li:before {
    content: "▸";
    color: #1e3c72;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.game-message {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.game-message.show {
    display: flex;
}

.message-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
}

.message-content h2 {
    color: #1e3c72;
    margin-bottom: 15px;
    font-size: 2em;
}

.message-content p {
    margin-bottom: 25px;
    font-size: 1.2em;
    color: #495057;
}

@keyframes brickBreak {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.5; }
    100% { transform: scale(0); opacity: 0; }
}

@keyframes powerupGlow {
    0% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.5); }
    50% { box-shadow: 0 0 20px rgba(255, 215, 0, 1); }
    100% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.5); }
}

@media (max-width: 900px) {
    .game-container {
        padding: 20px;
        margin: 10px;
    }
    
    .game-header h1 {
        font-size: 2em;
    }
    
    #gameCanvas {
        width: 100%;
        max-width: 600px;
        height: auto;
    }
    
    .game-stats {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .game-info {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .game-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
    }
}