body {
    font-family: 'Orbitron', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #000;
    color: #fff;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-image: radial-gradient(circle at center, #0a2463 0%, #001233 50%, #000 100%);
}

.game-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    text-align: center;
    padding: 20px;
}

/* 游戏统计信息 */
.game-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    background-color: rgba(0, 18, 51, 0.7);
    border-radius: 10px;
    padding: 10px;
    border: 1px solid #0a2463;
    box-shadow: 0 0 10px rgba(10, 36, 99, 0.5);
}

.stat {
    font-size: 1.2rem;
    color: #5df;
    text-shadow: 0 0 5px #5df;
}

/* 游戏画布 */
#game-canvas {
    width: 100%;
    height: 70vh;
    max-height: 500px;
    margin: 0 auto;
    position: relative;
    background-color: rgba(0, 0, 0, 0.8);
    border: 2px solid #5df;
    border-radius: 5px;
    box-shadow: 0 0 20px #5df, 0 0 40px rgba(85, 221, 255, 0.3);
    overflow: hidden;
}

/* 游戏对象样式 */
.player {
    width: 30px;
    height: 30px;
    background-color: #5f5;
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 0 10px #5f5, 0 0 20px rgba(85, 255, 85, 0.5);
    transition: transform 0.1s ease;
    z-index: 10;
}

.player::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 10px;
    width: 10px;
    height: 10px;
    background-color: #5f5;
    border-radius: 50%;
    box-shadow: 0 0 5px #5f5;
}

.enemy {
    width: 20px;
    height: 20px;
    background-color: #f55;
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 0 10px #f55, 0 0 20px rgba(255, 85, 85, 0.5);
    z-index: 5;
}

.crystal {
    width: 15px;
    height: 15px;
    background-color: #5df;
    position: absolute;
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
    box-shadow: 0 0 10px #5df, 0 0 20px rgba(85, 221, 255, 0.5);
    animation: rotate 3s linear infinite;
    z-index: 5;
}

.powerup {
    width: 18px;
    height: 18px;
    background-color: #fd5;
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 0 10px #fd5, 0 0 20px rgba(255, 221, 85, 0.5);
    animation: pulse 1.5s infinite alternate;
    z-index: 5;
}

/* 动画效果 */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    from { transform: scale(1); opacity: 0.8; }
    to { transform: scale(1.2); opacity: 1; }
}

@keyframes glow {
    0% { box-shadow: 0 0 5px #5df, 0 0 10px rgba(85, 221, 255, 0.5); }
    50% { box-shadow: 0 0 15px #5df, 0 0 30px rgba(85, 221, 255, 0.7); }
    100% { box-shadow: 0 0 5px #5df, 0 0 10px rgba(85, 221, 255, 0.5); }
}

/* 覆盖屏幕 */
.overlay-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 100;
    backdrop-filter: blur(5px);
}

.screen-content {
    background-color: rgba(10, 36, 99, 0.7);
    padding: 30px;
    border-radius: 15px;
    border: 2px solid #5df;
    box-shadow: 0 0 20px rgba(85, 221, 255, 0.5);
    max-width: 80%;
    text-align: center;
}

/* 按钮样式 */
.glow-btn {
    background-color: #0a2463;
    color: #5df;
    border: 2px solid #5df;
    padding: 12px 30px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    margin: 15px 0;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 0 10px rgba(85, 221, 255, 0.5);
}

.glow-btn:hover {
    background-color: #5df;
    color: #0a2463;
    box-shadow: 0 0 20px #5df, 0 0 40px rgba(85, 221, 255, 0.7);
    transform: translateY(-3px);
}

.small-btn {
    background-color: transparent;
    color: #5df;
    border: 1px solid #5df;
    padding: 8px 15px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    border-radius: 20px;
    cursor: pointer;
    margin: 5px;
    transition: all 0.3s;
}

.small-btn:hover {
    background-color: rgba(85, 221, 255, 0.2);
    box-shadow: 0 0 10px rgba(85, 221, 255, 0.5);
}

.control-btn {
    background-color: rgba(10, 36, 99, 0.7);
    color: #5df;
    border: 1px solid #5df;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    margin: 0 5px;
    transition: all 0.3s;
}

.control-btn:hover {
    background-color: rgba(85, 221, 255, 0.2);
    box-shadow: 0 0 10px rgba(85, 221, 255, 0.5);
}

/* 游戏模式选择 */
.mode-selection {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
}

.mode {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #5df;
    border-radius: 10px;
    padding: 10px;
    margin: 10px;
    background-color: rgba(0, 18, 51, 0.7);
}

.mode:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px #5df;
}

.mode.selected {
    border-color: #fd5;
    box-shadow: 0 0 15px #fd5;
    background-color: rgba(10, 36, 99, 0.9);
}

.mode:hover, .mode.selected {
    background-color: rgba(85, 221, 255, 0.2);
    box-shadow: 0 0 15px rgba(85, 221, 255, 0.7);
    transform: translateY(-5px);
}

.mode h3 {
    margin-top: 0;
    color: #5df;
}

.mode p {
    font-size: 0.8rem;
    color: #aaa;
}

/* 教程样式 */
.tutorial-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.tutorial-item {
    display: flex;
    align-items: center;
    background-color: rgba(0, 18, 51, 0.7);
    padding: 10px;
    border-radius: 10px;
}

.tutorial-icon {
    width: 30px;
    height: 30px;
    margin-right: 15px;
    border-radius: 50%;
}

.player-icon {
    background-color: #5f5;
    box-shadow: 0 0 10px #5f5;
}

.enemy-icon {
    background-color: #f55;
    box-shadow: 0 0 10px #f55;
}

.crystal-icon {
    background-color: #5df;
    box-shadow: 0 0 10px #5df;
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}

.powerup-icon {
    background-color: #fd5;
    box-shadow: 0 0 10px #fd5;
}

/* 游戏控制区 */
.game-controls {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

/* 粒子效果 */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

/* 得分动画 */
.score-popup {
    position: absolute;
    color: #5df;
    font-weight: bold;
    pointer-events: none;
    animation: float-up 1s forwards;
    text-shadow: 0 0 5px #5df;
}

@keyframes float-up {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-50px); opacity: 0; }
}

/* 新纪录提示 */
#new-record {
    color: #fd5;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 0 0 10px #fd5;
    margin: 10px 0;
    animation: pulse 1s infinite alternate;
}

/* 星星背景 */
.star {
    position: absolute;
    background-color: white;
    border-radius: 50%;
    z-index: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-stats {
        flex-wrap: wrap;
    }
    
    .stat {
        font-size: 1rem;
        flex: 1 0 40%;
    }
    
    .mode-selection {
        flex-direction: column;
        align-items: center;
    }
    
    .mode {
        width: 80%;
    }
    
    .screen-content {
        padding: 15px;
        max-width: 90%;
    }
    
    .glow-btn {
        padding: 10px 20px;
        font-size: 1rem;
    }
}

.hidden {
    display: none !important;
}

.hidden {
    display: none;
}

#game-over, #game-start {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #5df;
    z-index: 10;
    width: 80%;
    max-width: 400px;
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.pulse {
    position: absolute;
    border-radius: 50%;
    background-color: transparent;
    border: 2px solid #5df;
    animation: pulse 1s infinite;
    pointer-events: none;
}

/* 护盾效果 */
.shield {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #5df;
    box-shadow: 0 0 15px #5df, inset 0 0 10px rgba(85, 221, 255, 0.5);
    pointer-events: none;
    animation: shield-pulse 1.5s infinite;
    z-index: 9;
}

@keyframes shield-pulse {
    0% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.1); opacity: 0.9; }
    100% { transform: scale(1); opacity: 0.7; }
}

/* 等级奖励 */
.level-reward {
    width: 30px;
    height: 30px;
    background-color: #fd5;
    position: absolute;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    box-shadow: 0 0 15px #fd5, 0 0 30px rgba(255, 221, 85, 0.7);
    animation: rotate 3s linear infinite, pulse-star 2s infinite alternate;
    z-index: 5;
}

@keyframes pulse-star {
    from { transform: scale(1) rotate(0deg); }
    to { transform: scale(1.3) rotate(180deg); }
}

/* 不同类型的敌人 */
.enemy[data-type="fast"] {
    background-color: #f95;
    box-shadow: 0 0 10px #f95, 0 0 20px rgba(255, 153, 85, 0.5);
}

.enemy[data-type="zigzag"] {
    background-color: #f5f;
    box-shadow: 0 0 10px #f5f, 0 0 20px rgba(255, 85, 255, 0.5);
    border-radius: 5px;
}

/* 能力通知 */
.powerup-notification, .level-notification {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 18, 51, 0.8);
    color: #5df;
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid #5df;
    box-shadow: 0 0 15px #5df;
    font-size: 1.2rem;
    z-index: 100;
    animation: notification-appear 0.5s ease-out, notification-fade 0.5s ease-in 2.5s forwards;
}

.level-notification {
    color: #fd5;
    border-color: #fd5;
    box-shadow: 0 0 15px #fd5;
}

@keyframes notification-appear {
    from { transform: translate(-50%, -50px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

@keyframes notification-fade {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* 爆炸效果增强 */
.explosion {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, #ff5 20%, #f55 40%, #f00 60%, transparent 80%);
    animation: explode 0.5s forwards;
    z-index: 20;
    pointer-events: none;
}

@keyframes explode {
    0% { transform: scale(0.1); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

/* 磁力场效果 */
.magnet-field {
    position: absolute;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 2px dashed #fd5;
    box-shadow: 0 0 15px rgba(255, 221, 85, 0.3);
    pointer-events: none;
    animation: rotate 8s linear infinite;
    z-index: 8;
    opacity: 0.6;
}

/* 速度提升效果 */
.speed-trail {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: rgba(85, 255, 85, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 4;
    animation: fade-out 0.8s forwards;
}

@keyframes fade-out {
    from { opacity: 0.7; transform: scale(1); }
    to { opacity: 0; transform: scale(0.5); }
}

/* 敌人样式 */
.enemy {
    position: absolute;
    background-color: #ff5555;
    border-radius: 50%;
    box-shadow: 0 0 10px #ff5555, 0 0 20px rgba(255, 85, 85, 0.5);
}

/* 晶体样式 */
.crystal {
    position: absolute;
    background-color: #00ffff;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ffff, 0 0 20px rgba(0, 255, 255, 0.5);
    animation: pulse 1.5s infinite alternate;
}

/* 玩家样式 */
.player {
    position: absolute;
    background-color: #0f0;
    border-radius: 50%;
    box-shadow: 0 0 10px #0f0, 0 0 20px rgba(0, 255, 0, 0.5);
}

/* 能力道具样式 */
.powerup {
    position: absolute;
    border-radius: 50%;
    box-shadow: 0 0 10px white, 0 0 20px rgba(255, 255, 255, 0.5);
    animation: rotate 3s linear infinite;
}

/* 粒子样式 */
.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
}

/* 爆炸样式 */
.explosion {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: transparent;
    box-shadow: 0 0 30px #ff5555, 0 0 60px rgba(255, 85, 85, 0.8);
    animation: explode 0.5s forwards;
}

/* 脉冲动画 */
@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    100% { transform: scale(1.1); opacity: 1; }
}

/* 旋转动画 */
@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 爆炸动画 */
@keyframes explode {
    0% { transform: scale(0.1); opacity: 1; }
    100% { transform: scale(3); opacity: 0; }
}

/* 游戏结束屏幕增强 */
.game-stats {
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    border: 1px solid #55ddff;
}

.highlight-text {
    color: #ffdd55;
    font-weight: bold;
    animation: pulse 1.5s infinite alternate;
}

.achievement-summary {
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    border: 1px solid #55ddff;
    max-height: 150px;
    overflow-y: auto;
}

.achievement-summary h3 {
    color: #55ddff;
    margin-top: 0;
}

#achievements-list {
    list-style-type: none;
    padding: 0;
}

#achievements-list li {
    padding: 5px 0;
    border-bottom: 1px solid rgba(85, 221, 255, 0.3);
}

#achievements-list li:last-child {
    border-bottom: none;
}

.player-title {
    color: #ffdd55;
    font-weight: bold;
    text-shadow: 0 0 5px #fd5;
}

/* 等级提升通知 */
.level-up-notification {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #ffdd55;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 24px;
    font-weight: bold;
    z-index: 100;
    border: 2px solid #ffdd55;
    box-shadow: 0 0 20px rgba(255, 221, 85, 0.5);
    animation: level-up-appear 0.5s ease-out, level-up-fade 0.5s ease-in 2s forwards;
}

@keyframes level-up-appear {
    from { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@keyframes level-up-fade {
    from { opacity: 1; }
    to { opacity: 0; }
}