/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    background-color: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* 游戏容器 */
#game-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 100%;
    max-height: 600px;
    background: linear-gradient(to bottom, #ff9966, #ff5e62);
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

/* 游戏画布 */
#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: none;
}

/* 游戏UI */
#game-ui {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    color: white;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

#game-ui div {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

/* 游戏界面样式 */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 20;
}

.screen h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
}

.screen h2 {
    font-size: 36px;
    margin-bottom: 20px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
}

.screen p {
    font-size: 24px;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

/* 按钮样式 */
button {
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    color: white;
    background: linear-gradient(45deg, #ff8a00, #e52e71);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 138, 0, 0.3);
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 138, 0, 0.4);
}

button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255, 138, 0, 0.3);
}

/* 屏幕震动动画 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px) translateY(2px) rotate(-1deg); }
    20%, 40%, 60%, 80% { transform: translateX(5px) translateY(-2px) rotate(1deg); }
}

.shake {
    animation: shake 0.3s ease-in-out;
}

/* 音频控制样式 */
#audio-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 15;
}

#audio-toggle {
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#audio-toggle:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

#audio-toggle.muted {
    opacity: 0.6;
}

#volume-controls {
    position: absolute;
    top: 50px;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    min-width: 200px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#volume-controls label {
    display: block;
    margin-bottom: 10px;
    color: white;
    font-size: 14px;
    font-weight: normal;
}

#volume-controls input[type="range"] {
    width: 100%;
    margin-top: 5px;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    outline: none;
}

#volume-controls input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: linear-gradient(45deg, #ff8a00, #e52e71);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

#volume-controls input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: linear-gradient(45deg, #ff8a00, #e52e71);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* 自定义光标 - 游戏中隐藏默认光标 */
#game-container.game-active {
    cursor: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #game-container {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }
    
    .screen h1 {
        font-size: 36px;
    }
    
    .screen h2 {
        font-size: 28px;
    }
    
    .screen p {
        font-size: 20px;
    }
    
    #game-ui {
        font-size: 16px;
        top: 10px;
    }
    
    #game-ui div {
        padding: 6px 12px;
    }
}