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

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Press Start 2P', 'Courier New', monospace;
    color: #fff;
}

#game-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#game-info {
    width: 520px;
    background: #000;
    padding: 10px;
    border: 3px solid #555;
}

.info-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.info-item .label {
    font-size: 10px;
    color: #888;
}

.info-item .value {
    font-size: 14px;
    color: #fff;
}

#lives {
    font-size: 12px;
}

#gameCanvas {
    border: 4px solid #555;
    background: #000;
    image-rendering: pixelated;
}

.overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 40px;
    border: 4px solid #f39c12;
    text-align: center;
    z-index: 100;
}

.overlay.hidden {
    display: none;
}

.overlay h1 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #f39c12;
    text-shadow: 2px 2px #000;
}

.overlay .subtitle {
    font-size: 14px;
    color: #888;
    margin-bottom: 30px;
}

.controls-info {
    margin-bottom: 30px;
    line-height: 2;
}

.controls-info p {
    font-size: 10px;
    color: #aaa;
}

.overlay button {
    background: #f39c12;
    color: #000;
    border: none;
    padding: 15px 30px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.overlay button:hover {
    background: #e67e22;
    transform: scale(1.05);
}

#pause-screen h1 {
    color: #3498db;
}

#game-over-screen h1 {
    color: #e74c3c;
}

#stage-screen {
    background: rgba(0, 0, 0, 0.95);
}

#stage-screen h1 {
    color: #2ecc71;
}

/* 道具提示 */
.powerup-toast {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #f39c12;
    padding: 10px 20px;
    border: 2px solid #f39c12;
    font-size: 12px;
    z-index: 50;
    animation: fadeInOut 2s forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    20% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; }
    100% { opacity: 0; }
}
