/* 像素篮球大战 - 8位复古风格 */

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

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    overflow: hidden;
    user-select: none;
    touch-action: none;
}

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

.screen {
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    border: 3px solid #fff;
    max-width: 90vw;
    max-height: 90vh;
}

.hidden {
    display: none !important;
}

/* 像素风格标题 */
.pixel-title {
    font-size: 2.5em;
    color: #ffeb3b;
    text-shadow: 
        2px 2px 0 #f44336,
        4px 4px 0 #2196f3;
    margin-bottom: 30px;
    font-weight: bold;
    letter-spacing: 2px;
}

/* 像素风格按钮 */
.pixel-btn {
    background: linear-gradient(145deg, #4caf50, #45a049);
    border: 3px solid #fff;
    color: white;
    padding: 15px 30px;
    font-size: 1.2em;
    font-family: inherit;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.1s;
    box-shadow: 
        0 4px 0 #2e7d32,
        0 6px 10px rgba(0, 0, 0, 0.3);
}

.pixel-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 0 #2e7d32,
        0 8px 15px rgba(0, 0, 0, 0.4);
}

.pixel-btn:active {
    transform: translateY(2px);
    box-shadow: 
        0 2px 0 #2e7d32,
        0 4px 8px rgba(0, 0, 0, 0.3);
}

/* 游戏界面样式 */
#game-screen {
    padding: 0;
    border-radius: 0;
    background: #000;
}

.hud {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.8);
    font-size: 1.2em;
    font-weight: bold;
    border-bottom: 3px solid #fff;
}

.score, .combo, .time {
    color: #ffeb3b;
    text-shadow: 1px 1px 0 #f44336;
}

#game-canvas {
    background: #87ceeb;
    border: 3px solid #fff;
    display: block;
    margin: 0 auto;
}

.power-bar {
    width: 100%;
    max-width: 400px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border: 3px solid #fff;
    margin: 20px auto;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
}

.power-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4caf50, #ffeb3b, #f44336);
    transition: width 0.1s;
    border-radius: 12px;
}

.power-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.9em;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000;
    color: white;
}

.pause-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    font-size: 1em;
}

/* 结果界面 */
.result-info {
    margin: 30px 0;
    font-size: 1.3em;
    line-height: 1.8;
}

.result-info span {
    color: #ffeb3b;
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .pixel-title {
        font-size: 2em;
    }
    
    .pixel-btn {
        padding: 12px 25px;
        font-size: 1.1em;
    }
    
    #game-canvas {
        width: 100%;
        height: auto;
    }
    
    .hud {
        font-size: 1em;
        padding: 8px 15px;
    }
}

/* 像素字体效果 */
@font-face {
    font-family: 'PixelFont';
    src: local('Courier New'), local('monospace');
}

.pixel-text {
    font-family: 'PixelFont', monospace;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}
