/* 素双重冲刺 - 8位像素风格样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

body {
    background: #1A1A2E;
    font-family: 'Courier New', monospace;
    overflow: hidden;
    touch-action: none;
}

#game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameCanvas {
    display: block;
    background: #16213E;
    border: 4px solid #3498DB;
}

/* 界面通用样式 */
.screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #F1C40F;
    z-index: 100;
    transition: opacity 0.3s;
    display: none;
}

.screen.active {
    display: block;
}

/* 开始界面 */
#start-screen {
    background: rgba(26, 26, 46, 0.95);
    padding: 40px;
    border: 4px solid #E74C3C;
    border-radius: 8px;
}

.game-title {
    font-size: 32px;
    color: #3498DB;
    text-shadow: 2px 2px 0 #E74C3C;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 16px;
    color: #F1C40F;
    margin-bottom: 30px;
}

.pixel-btn {
    background: #E74C3C;
    color: #FFF;
    font-family: 'Courier New', monospace;
    font-size: 20px;
    padding: 15px 40px;
    border: 4px solid #C0392B;
    cursor: pointer;
    transition: all 0.1s;
    margin: 10px;
}

.pixel-btn:hover {
    background: #C0392B;
    transform: scale(1.05);
}

.pixel-btn:active {
    transform: scale(0.95);
}

.info-box {
    margin: 20px 0;
    font-size: 18px;
}

.tips {
    margin-top: 20px;
    font-size: 14px;
    color: #95A5A6;
    line-height: 1.8;
}

/* 游戏界面状态栏 */
#status-bar {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 50;
    font-size: 18px;
    color: #F1C40F;
}

.score-box, .combo-box {
    background: rgba(26, 26, 46, 0.8);
    padding: 8px 15px;
    border: 2px solid #3498DB;
}

.lives-box {
    display: flex;
    gap: 5px;
}

.heart {
    font-size: 20px;
}

/* 结束界面 */
#end-screen {
    background: rgba(26, 26, 46, 0.95);
    padding: 40px;
    border: 4px solid #E74C3C;
    border-radius: 8px;
}

.end-title {
    font-size: 28px;
    color: #E74C3C;
    margin-bottom: 20px;
}

.result-box {
    margin: 20px 0;
    font-size: 20px;
    line-height: 2;
}

/* 连击特效 */
.combo-effect {
    position: absolute;
    font-size: 24px;
    color: #9B59B6;
    font-weight: bold;
    animation: comboFloat 1s ease-out forwards;
    pointer-events: none;
}

@keyframes comboFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px) scale(1.5);
    }
}

/* 收集特效 */
.collect-effect {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    animation: collectPulse 0.3s ease-out forwards;
    pointer-events: none;
}

@keyframes collectPulse {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* 移动端适配 */
@media (max-width: 500px) {
    .game-title {
        font-size: 24px;
    }
    
    .pixel-btn {
        font-size: 16px;
        padding: 12px 30px;
    }
    
    #status-bar {
        font-size: 14px;
        gap: 10px;
    }
}

/* PC横屏适配 */
@media (min-width: 800px) {
    #gameCanvas {
        max-width: 800px;
        max-height: 600px;
    }
}