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

body {
    font-family: Arial, sans-serif;
    background-color: #000;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 10px;
}

.game-container {
    text-align: center;
    background-color: #0a0e27;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.5);
    width: 100%;
    max-width: 840px;
    position: relative;
}

h1 {
    color: #00bfff;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.8);
    font-size: 2em;
}

.canvas-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    overflow: hidden;
    border-radius: 5px;
    position: relative;
}

#gameCanvas {
    border: 2px solid #00bfff;
    background-color: #000;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.6);
    max-width: 100%;
    height: auto;
}

.game-info {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    font-size: 18px;
    flex-wrap: wrap;
    gap: 20px;
}

.score, .high-score {
    background-color: #1a1f3a;
    padding: 10px 20px;
    border-radius: 5px;
    border: 1px solid #00bfff;
}

#score, #highScore {
    color: #00bfff;
    font-weight: bold;
}

.controls {
    margin-top: 20px;
    font-size: 14px;
    color: #ccc;
}

.controls h3 {
    color: #00bfff;
    margin-bottom: 10px;
}

.back-btn {
    background-color: #00bfff;
    color: #000;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 191, 255, 0.8);
}

/* 虚拟控制按钮样式 */
.virtual-controls {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.jump-btn {
    width: 120px;
    height: 60px;
    background-color: #00bfff;
    color: #000;
    border: 2px solid #0080ff;
    border-radius: 30px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.1s ease;
    outline: none;
    box-shadow: 0 0 10px rgba(0, 191, 255, 0.6);
}

.jump-btn:active {
    background-color: #0080ff;
    transform: scale(0.95);
    box-shadow: 0 0 5px rgba(0, 191, 255, 0.4);
}

/* 游戏结束样式 */
.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 14, 39, 0.95);
    padding: 40px;
    border-radius: 10px;
    border: 2px solid #00bfff;
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.8);
    z-index: 10;
    text-align: center;
}

.game-over h2 {
    color: #00bfff;
    margin-bottom: 20px;
    font-size: 2.5em;
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.8);
}

.game-over p {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #fff;
}

.game-over #finalScore {
    color: #00bfff;
    font-weight: bold;
    font-size: 1.5em;
}

.restart-btn {
    width: 150px;
    height: 50px;
    background-color: #00bfff;
    color: #000;
    border: 2px solid #0080ff;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.restart-btn:hover {
    background-color: #0080ff;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.8);
}

/* 响应式设计 */
@media (max-width: 900px) {
    .game-container {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.8em;
        margin-bottom: 15px;
    }
    
    #gameCanvas {
        width: 100%;
        height: auto;
    }
}

@media (max-width: 768px) {
    .jump-btn {
        width: 100px;
        height: 50px;
        font-size: 18px;
    }
    
    .game-info {
        font-size: 16px;
        gap: 15px;
    }
    
    .score, .high-score {
        padding: 8px 15px;
    }
    
    .game-over {
        padding: 30px;
        width: 90%;
    }
    
    .game-over h2 {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5em;
    }
    
    .jump-btn {
        width: 90px;
        height: 45px;
        font-size: 16px;
    }
    
    .game-info {
        flex-direction: column;
        align-items: center;
    }
    
    .game-over {
        padding: 20px;
    }
    
    .game-over h2 {
        font-size: 1.8em;
    }
}