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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.game-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    width: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    position: relative;
}

.game-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
}

h1 {
    font-size: 32px;
    color: #FFC107;
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.5), 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: bold;
    letter-spacing: 1px;
}

.game-info {
    display: flex;
    gap: 30px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 500;
}

.game-info span {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

#score,
#level {
    color: #4FC3F7;
    font-weight: bold;
    font-size: 24px;
    text-shadow: 0 0 8px rgba(79, 195, 247, 0.5);
}

#gameCanvas {
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}

.game-controls {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

#restartButton {
    background: linear-gradient(45deg, #4FC3F7, #2196F3);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
    min-width: 200px;
}

#restartButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
    background: linear-gradient(45deg, #2196F3, #1976D2);
}

#restartButton:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(33, 150, 243, 0.3);
}


/* 添加炫彩光晕效果 */

.game-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
    z-index: -1;
    animation: glowing 20s linear infinite;
    background-size: 400%;
    border-radius: 22px;
    opacity: 0.5;
    filter: blur(5px);
}

@keyframes glowing {
    0% {
        background-position: 0 0;
    }
    50% {
        background-position: 400% 0;
    }
    100% {
        background-position: 0 0;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    .game-container {
        padding: 20px;
        gap: 15px;
    }
    .game-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding-bottom: 15px;
    }
    h1 {
        font-size: 28px;
    }
    .game-info {
        font-size: 18px;
        gap: 20px;
        justify-content: center;
    }
    #score,
    #level {
        font-size: 22px;
    }
    #gameCanvas {
        margin: 15px 0;
    }
    #restartButton {
        padding: 12px 30px;
        font-size: 16px;
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 15px;
    }
    h1 {
        font-size: 24px;
    }
    .game-info {
        font-size: 16px;
        gap: 15px;
    }
    #score,
    #level {
        font-size: 20px;
    }
    #gameCanvas {
        margin: 10px 0;
    }
    #restartButton {
        padding: 10px 25px;
        font-size: 15px;
        min-width: 150px;
    }
}