/* 像素时钟挑战 - 8位复古风格 */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

body {
    font-family: 'Press Start 2P', monospace;
    background: #1a1a2e;
    color: #eee;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.game-container {
    background: #0f0f23;
    border: 4px solid #16213e;
    border-radius: 0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    padding: 20px;
    max-width: 450px;
    width: 100%;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
    background: #16213e;
    border: 2px solid #0f3460;
    font-size: 10px;
}

.game-header div {
    text-align: center;
}

.score, .level, .lives {
    color: #f39c12;
}

.game-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

#gameCanvas {
    background: #000;
    border: 3px solid #0f3460;
    border-radius: 0;
    cursor: pointer;
    display: block;
}

.target-area {
    margin-top: 15px;
    padding: 10px 20px;
    background: #e74c3c;
    border: 2px solid #c0392b;
    color: white;
    font-size: 12px;
    text-align: center;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.pixel-btn {
    background: #27ae60;
    border: 3px solid #229954;
    color: white;
    padding: 12px 20px;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.1s;
    box-shadow: 0 4px 0 #1e8449;
}

.pixel-btn:hover {
    background: #2ecc71;
    transform: translateY(2px);
    box-shadow: 0 2px 0 #1e8449;
}

.pixel-btn:active {
    transform: translateY(4px);
    box-shadow: none;
}

.pixel-btn:disabled {
    background: #7f8c8d;
    border-color: #7f8c8d;
    box-shadow: 0 4px 0 #5d6d7e;
    cursor: not-allowed;
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #0f0f23;
    border: 4px solid #e74c3c;
    padding: 30px;
    text-align: center;
    min-width: 300px;
    display: none;
}

.game-over h2 {
    color: #e74c3c;
    margin-bottom: 20px;
    font-size: 18px;
}

.game-over p {
    margin-bottom: 10px;
    font-size: 10px;
    color: #f39c12;
}

/* 移动端优化 */
@media (max-width: 480px) {
    .game-container {
        padding: 15px;
    }
    
    .game-header {
        font-size: 8px;
    }
    
    #gameCanvas {
        width: 100%;
        height: auto;
        max-width: 350px;
    }
    
    .pixel-btn {
        padding: 10px 15px;
        font-size: 8px;
    }
}