* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Arial, sans-serif;
    background: url('游戏-04.svg') center/cover no-repeat fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

.top-left-image {
    position: fixed;
    top: 20px;
    left: 10px;
    width: 350px;
    height: auto;
    z-index: 100;
    pointer-events: none;
}

.game-container {
    background: url('游戏-03.svg') center/cover no-repeat;
    border-radius: 20px;
    padding: 30px;
    max-width: 900px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

header {
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    color: #ffffff;
    font-size: 2.5em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.player-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.info-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.info-item .label {
    color: #555;
    font-weight: bold;
    margin-right: 8px;
}

.info-item span:last-child {
    color: #e74c3c;
    font-weight: bold;
    font-size: 1.1em;
}

.game-area {
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
}

#gameCanvas {
    border: 3px solid #3498db;
    border-radius: 10px;
    background: #ecf0f1;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
    z-index: 10;
}

.game-overlay.show {
    display: flex;
}

.overlay-content {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.overlay-content h2 {
    color: #2c3e50;
    font-size: 2em;
    margin-bottom: 15px;
}

.overlay-content p {
    color: #555;
    font-size: 1.2em;
    margin-bottom: 25px;
}

.control-panel {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.instructions {
    text-align: center;
}

.instructions p {
    color: #2c3e50;
    margin: 8px 0;
    font-size: 1em;
    line-height: 1.6;
}

.stage-info {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stage-info h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.5em;
}

.stages-list {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 10px;
}

.stage-item {
    padding: 10px 15px;
    background: #ecf0f1;
    border-radius: 10px;
    color: #7f8c8d;
    font-weight: bold;
    transition: all 0.3s ease;
}

.stage-item.current {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.5);
}

.stage-item.completed {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
}

.action-btn {
    background: linear-gradient(135deg, #3498db 0%, #2ecc71 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1.1em;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    transition: all 0.3s ease;
    font-weight: bold;
    margin: 5px;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.6);
}

.action-btn:active {
    transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 900px) {
    #gameCanvas {
        width: 100%;
        height: auto;
    }

    .game-container {
        padding: 15px;
    }

    header h1 {
        font-size: 2em;
    }

    .player-info {
        gap: 15px;
    }

    .stages-list {
        flex-direction: column;
        align-items: center;
    }
}
