/* 中国风节奏游戏 - 样式文件 */
/* 古韵节拍主题 */

:root {
    /* 中国传统配色 */
    --chinese-red: #C8161D;
    --chinese-gold: #D4AF37;
    --chinese-black: #1C1C1C;
    --chinese-ivory: #FFFFF0;
    --jade-green: #00A86B;
    --imperial-yellow: #FFD700;
    --vermillion: #E34234;
    --ink-blue: #4A5568;
    
    /* 渐变色 */
    --gradient-red: linear-gradient(135deg, #FF6B6B 0%, #C8161D 100%);
    --gradient-gold: linear-gradient(135deg, #FFD700 0%, #D4AF37 100%);
    --gradient-dark: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
}

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

body {
    font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
    background: var(--gradient-dark);
    color: var(--chinese-ivory);
    overflow-x: hidden;
    min-height: 100vh;
}

/* 游戏容器 */
.game-container {
    width: 100%;
    min-height: 100vh;
    position: relative;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(200, 22, 29, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(212, 175, 55, 0.1) 0%, transparent 50%);
    background-attachment: fixed;
}

/* 中国传统图案背景 */
.game-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><path d="M30 0 L30 60 M0 30 L60 30" stroke="rgba(212,175,55,0.05)" stroke-width="1"/></svg>');
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

/* 游戏头部 */
.game-header {
    text-align: center;
    padding: 40px 20px 20px;
    position: relative;
    z-index: 1;
}

.game-title {
    margin-bottom: 10px;
}

.chinese-title {
    display: block;
    font-size: 3.5em;
    font-weight: 700;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 8px;
    margin-bottom: 10px;
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5)); }
    50% { filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8)); }
}

.english-subtitle {
    display: block;
    font-size: 1em;
    color: var(--chinese-gold);
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.8;
}

.game-subtitle {
    font-size: 1.65em;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 2px;
}

/* 彩虹发光效果 */
.game-subtitle.rainbow-glow {
    animation: rainbowGlow 3s linear infinite;
    text-shadow: 
        0 0 10px currentColor,
        0 0 20px currentColor,
        0 0 30px currentColor,
        0 0 40px rgba(255, 215, 0, 0.8);
    font-weight: 500;
}

@keyframes rainbowGlow {
    0% { 
        color: #ff6b6b;
        text-shadow: 
            0 0 10px #ff6b6b,
            0 0 20px #ff6b6b,
            0 0 30px #ff6b6b,
            0 0 40px #ff6b6b;
    }
    14% { 
        color: #ffa500;
        text-shadow: 
            0 0 10px #ffa500,
            0 0 20px #ffa500,
            0 0 30px #ffa500,
            0 0 40px #ffa500;
    }
    28% { 
        color: #ffd700;
        text-shadow: 
            0 0 10px #ffd700,
            0 0 20px #ffd700,
            0 0 30px #ffd700,
            0 0 40px #ffd700;
    }
    42% { 
        color: #7fff00;
        text-shadow: 
            0 0 10px #7fff00,
            0 0 20px #7fff00,
            0 0 30px #7fff00,
            0 0 40px #7fff00;
    }
    57% { 
        color: #00bfff;
        text-shadow: 
            0 0 10px #00bfff,
            0 0 20px #00bfff,
            0 0 30px #00bfff,
            0 0 40px #00bfff;
    }
    71% { 
        color: #8a2be2;
        text-shadow: 
            0 0 10px #8a2be2,
            0 0 20px #8a2be2,
            0 0 30px #8a2be2,
            0 0 40px #8a2be2;
    }
    85% { 
        color: #ff1493;
        text-shadow: 
            0 0 10px #ff1493,
            0 0 20px #ff1493,
            0 0 30px #ff1493,
            0 0 40px #ff1493;
    }
    100% { 
        color: #ff6b6b;
        text-shadow: 
            0 0 10px #ff6b6b,
            0 0 20px #ff6b6b,
            0 0 30px #ff6b6b,
            0 0 40px #ff6b6b;
    }
}

/* 主游戏区域 */
.game-main {
    position: relative;
    z-index: 1;
    padding: 20px;
}

/* 开始界面 */
.start-screen {
    max-width: 800px;
    margin: 0 auto;
}

.welcome-panel {
    background: rgba(28, 28, 28, 0.8);
    border: 2px solid var(--chinese-gold);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5),
                inset 0 0 20px rgba(212, 175, 55, 0.1);
    position: relative;
}

.welcome-panel::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-gold);
    border-radius: 20px;
    z-index: -1;
    opacity: 0.3;
    filter: blur(10px);
}

.welcome-panel h2 {
    color: var(--chinese-gold);
    text-align: center;
    font-size: 2em;
    margin-bottom: 15px;
    letter-spacing: 4px;
}

.welcome-panel p {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
    font-size: 1.1em;
}

/* 游戏模式按钮 */
.game-modes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.mode-btn {
    background: var(--gradient-red);
    border: 2px solid var(--chinese-gold);
    border-radius: 12px;
    padding: 18px 15px;
    color: white;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.mode-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.mode-btn:hover::before {
    width: 300px;
    height: 300px;
}

.mode-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(200, 22, 29, 0.5),
                0 0 20px rgba(255, 215, 0, 0.3);
    border-color: var(--imperial-yellow);
}

.mode-btn i {
    font-size: 2em;
}

/* 难度选择器 */
.difficulty-selector,
.song-selector {
    margin-top: 30px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.difficulty-selector h3,
.song-selector h3 {
    color: var(--chinese-gold);
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.5em;
    letter-spacing: 3px;
}

.song-count {
    font-size: 0.7em;
    color: var(--imperial-yellow);
    font-weight: normal;
}

.song-tip {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9em;
    margin-bottom: 15px;
}

.difficulty-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.diff-btn {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: 2px solid var(--jade-green);
    border-radius: 10px;
    padding: 20px 15px;
    color: white;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: 500;
}

.diff-btn:hover {
    background: var(--jade-green);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 168, 107, 0.4);
}

.diff-btn.selected {
    background: var(--gradient-gold);
    border-color: var(--imperial-yellow);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

/* 歌曲搜索框 */
.song-search {
    position: relative;
    margin-bottom: 15px;
}

.song-search input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    background: rgba(44, 62, 80, 0.8);
    border: 2px solid var(--chinese-gold);
    border-radius: 8px;
    color: white;
    font-size: 1em;
    font-family: 'Noto Sans SC', sans-serif;
}

.song-search input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.song-search input:focus {
    outline: none;
    border-color: var(--imperial-yellow);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.song-search i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--chinese-gold);
    font-size: 1.2em;
    pointer-events: none;
}

/* 歌曲列表 */
.song-list {
    display: grid;
    gap: 10px;
    max-height: 450px;
    overflow-y: auto;
    padding-right: 10px;
    margin-top: 15px;
}

/* 优化滚动条样式 */
.song-list::-webkit-scrollbar {
    width: 8px;
}

.song-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.song-list::-webkit-scrollbar-thumb {
    background: var(--chinese-gold);
    border-radius: 4px;
}

.song-list::-webkit-scrollbar-thumb:hover {
    background: var(--imperial-yellow);
}

.song-item {
    background: rgba(44, 62, 80, 0.6);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.song-item:hover {
    background: rgba(44, 62, 80, 0.9);
    border-color: var(--chinese-gold);
    transform: translateX(5px);
}

.song-item.selected {
    background: var(--gradient-red);
    border-color: var(--imperial-yellow);
    box-shadow: 0 0 15px rgba(200, 22, 29, 0.5);
}

/* 无歌曲提示 */
.no-songs-tip {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.8);
}

.no-songs-tip p {
    margin: 10px 0;
}

.song-info h4 {
    color: var(--chinese-gold);
    font-size: 1em;
    font-weight: 600;
    margin: 0;
}

.song-info p {
    display: none; /* 隐藏详细信息，节省空间 */
}

/* 游戏界面 */
.game-screen {
    max-width: 1200px;
    margin: 0 auto;
}

.game-info {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: rgba(28, 28, 28, 0.8);
    border-radius: 15px;
    margin-bottom: 20px;
    border: 2px solid var(--chinese-gold);
}

.score-display,
.combo-display,
.accuracy-display {
    text-align: center;
}

.score-display .label,
.combo-display .label,
.accuracy-display .label {
    display: block;
    color: var(--chinese-gold);
    font-size: 0.9em;
    margin-bottom: 5px;
    letter-spacing: 2px;
}

.score-display .value,
.combo-display .value,
.accuracy-display .value {
    display: block;
    font-size: 2.5em;
    font-weight: 700;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 游戏区域 */
.game-area {
    background: rgba(28, 28, 28, 0.9);
    border: 3px solid var(--chinese-gold);
    border-radius: 20px;
    padding: 30px;
    min-height: 500px;
    position: relative;
    overflow: hidden;
}

/* 音符轨道 */
.note-track {
    position: relative;
    height: 300px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    margin-bottom: 30px;
    overflow: hidden;
    border: 2px solid rgba(212, 175, 55, 0.3);
}

.hit-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, 
        rgba(255, 215, 0, 0.3) 0%,
        rgba(255, 215, 0, 1) 40%,
        rgba(255, 215, 0, 1) 60%,
        rgba(255, 215, 0, 0.3) 100%
    );
    box-shadow: 
        0 0 30px rgba(255, 215, 0, 1),
        0 0 50px rgba(255, 215, 0, 0.6);
    z-index: 15;
    animation: hitLinePulse 1.5s ease-in-out infinite;
}

.hit-line::before {
    content: '点击这里';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 215, 0, 0.95);
    color: #1C1C1C;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    pointer-events: none;
    animation: hitLineTextPulse 2s ease-in-out infinite;
}

@keyframes hitLinePulse {
    0%, 100% {
        box-shadow: 
            0 0 30px rgba(255, 215, 0, 1),
            0 0 50px rgba(255, 215, 0, 0.6);
    }
    50% {
        box-shadow: 
            0 0 50px rgba(255, 215, 0, 1),
            0 0 80px rgba(255, 215, 0, 0.8);
    }
}

@keyframes hitLineTextPulse {
    0%, 100% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

/* 打击区域 */
.hit-area {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-bottom: 30px;
}

.drum-left,
.drum-right {
    position: relative;
    width: 140px;
    height: 140px;
    min-width: 140px;
    min-height: 140px;
    z-index: 10;
    flex-shrink: 0; /* 防止被压缩 */
}

.drum-both {
    position: relative;
    width: 100px;
    height: 100px;
    min-width: 100px;
    min-height: 100px;
    z-index: 10;
    margin-top: 20px; /* 垂直居中对齐 */
    flex-shrink: 0; /* 防止被压缩 */
}

.drum-surface {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 5px solid var(--chinese-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1; /* 强制保持正方形 */
    touch-action: manipulation; /* 优化触摸响应 */
    user-select: none; /* 防止选中文字 */
    -webkit-tap-highlight-color: transparent; /* 移除点击高亮 */
}

.drum-left .drum-surface {
    background: var(--gradient-red);
    box-shadow: 0 10px 30px rgba(200, 22, 29, 0.5),
                inset 0 -10px 20px rgba(0, 0, 0, 0.3);
}

.drum-right .drum-surface {
    background: linear-gradient(135deg, #4ECDC4 0%, #2C7A7B 100%);
    box-shadow: 0 10px 30px rgba(78, 205, 196, 0.5),
                inset 0 -10px 20px rgba(0, 0, 0, 0.3);
}

.drum-both .drum-surface {
    background: linear-gradient(135deg, #FFD700 0%, #D4AF37 100%);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.6),
                inset 0 -10px 20px rgba(0, 0, 0, 0.3);
}

.drum-surface:active,
.drum-surface.hitting {
    transform: scale(0.95);
    box-shadow: 
        0 5px 20px rgba(255, 215, 0, 1),
        0 0 50px rgba(255, 215, 0, 0.8),
        inset 0 0 30px rgba(255, 215, 0, 0.5);
    border-color: #FFF;
}

.drum-surface::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    border-radius: 50%;
    border: 3px solid rgba(255, 215, 0, 0.5);
}

.drum-left .drum-text,
.drum-right .drum-text {
    font-size: 3em;
    font-weight: 700;
    color: var(--imperial-yellow);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.drum-both .drum-text {
    font-size: 2em;
    font-weight: 700;
    color: var(--chinese-black);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.drum-surface:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(200, 22, 29, 0.7),
                inset 0 -10px 20px rgba(0, 0, 0, 0.3),
                0 0 30px rgba(255, 215, 0, 0.5);
}

.drum-surface:active {
    transform: scale(0.95);
}

/* 打击特效 */
.hit-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.hit-effect.active {
    animation: hitRipple 0.6s ease-out;
}

@keyframes hitRipple {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.8);
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        box-shadow: 0 0 0 50px rgba(255, 215, 0, 0);
        transform: translate(-50%, -50%) scale(1.5);
    }
}

/* 进度条 */
.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid var(--chinese-gold);
}

.progress-fill {
    height: 100%;
    background: var(--gradient-gold);
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

/* 音量控制 */
.volume-controls {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
    padding: 15px;
    background: rgba(28, 28, 28, 0.6);
    border-radius: 10px;
    border: 2px solid rgba(212, 175, 55, 0.3);
}

.volume-control-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--chinese-gold);
}

.volume-control-item label {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 100px;
    font-size: 0.9em;
}

.volume-control-item input[type="range"] {
    width: 120px;
    height: 6px;
    background: rgba(44, 62, 80, 0.8);
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
}

.volume-control-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--gradient-gold);
    cursor: pointer;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.volume-control-item input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--gradient-gold);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.volume-control-item span {
    min-width: 40px;
    text-align: right;
    font-weight: 600;
}

/* 游戏控制按钮 */
.game-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    position: relative;
    z-index: 200; /* 确保按钮在鼓面上方 */
}

.control-btn {
    background: rgba(44, 62, 80, 0.8);
    border: 2px solid var(--chinese-gold);
    border-radius: 10px;
    padding: 12px 24px;
    color: white;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans SC', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-btn:hover {
    background: var(--jade-green);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 168, 107, 0.4);
}

/* 结果界面 */
.result-screen {
    max-width: 600px;
    margin: 0 auto;
}

.result-panel {
    background: rgba(28, 28, 28, 0.9);
    border: 3px solid var(--chinese-gold);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
}

.result-panel h2 {
    color: var(--chinese-gold);
    font-size: 2.5em;
    margin-bottom: 30px;
    letter-spacing: 5px;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    background: rgba(44, 62, 80, 0.6);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    padding: 20px;
}

.stat-label {
    display: block;
    color: var(--chinese-gold);
    font-size: 0.9em;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.stat-value {
    display: block;
    font-size: 2em;
    font-weight: 700;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.action-btn {
    background: var(--gradient-red);
    border: 2px solid var(--chinese-gold);
    border-radius: 10px;
    padding: 15px 30px;
    color: white;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans SC', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(200, 22, 29, 0.5);
}

/* 操作说明 - 内联版本 */
.controls-info-inline {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid var(--chinese-gold);
    border-radius: 10px;
}

.controls-info-inline .control-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95em;
}

.controls-info-inline .key {
    background: var(--gradient-gold);
    padding: 6px 14px;
    border-radius: 8px;
    color: var(--chinese-black);
    font-weight: 700;
    min-width: 70px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.controls-info-inline .action {
    color: var(--chinese-gold);
    font-weight: 600;
}

/* 联机界面 */
.multiplayer-panel {
    background: rgba(28, 28, 28, 0.9);
    border: 2px solid var(--chinese-gold);
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    margin: 0 auto;
}

.multiplayer-panel h2 {
    color: var(--chinese-gold);
    text-align: center;
    font-size: 2em;
    margin-bottom: 30px;
    letter-spacing: 4px;
}

.room-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.room-btn {
    background: var(--gradient-red);
    border: 2px solid var(--chinese-gold);
    border-radius: 10px;
    padding: 25px 20px;
    color: white;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans SC', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.room-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(200, 22, 29, 0.5);
}

.room-code-input {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.room-code-input input {
    flex: 1;
    padding: 15px;
    border: 2px solid var(--chinese-gold);
    border-radius: 10px;
    background: rgba(44, 62, 80, 0.6);
    color: white;
    font-size: 1.1em;
    font-family: 'Noto Sans SC', sans-serif;
}

.room-code-input input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.room-code-input button {
    padding: 15px 30px;
    background: var(--jade-green);
    border: 2px solid var(--chinese-gold);
    border-radius: 10px;
    color: white;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans SC', sans-serif;
}

.room-code-input button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 168, 107, 0.5);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .chinese-title {
        font-size: 2.5em;
        letter-spacing: 4px;
    }

    .game-modes {
        grid-template-columns: 1fr;
    }

    .difficulty-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .hit-area {
        gap: 15px;
    }

    .drum-left,
    .drum-right {
        width: 100px;
        height: 100px;
        min-width: 100px;
        min-height: 100px;
    }
    
    .drum-both {
        width: 70px;
        height: 70px;
        min-width: 70px;
        min-height: 70px;
        margin-top: 15px;
    }
    
    .drum-left .drum-text,
    .drum-right .drum-text {
        font-size: 2em;
    }
    
    .drum-both .drum-text {
        font-size: 1.5em;
    }
    
    .hit-line::before {
        font-size: 0.75em;
        padding: 6px 12px;
    }
    
    .game-controls {
        margin-top: 15px;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .control-btn {
        padding: 10px 15px;
        font-size: 0.85em;
    }

    .result-stats {
        grid-template-columns: 1fr;
    }

    .controls-info-inline {
        gap: 10px;
        padding: 10px;
        font-size: 0.85em;
    }

    .controls-info-inline .key {
        min-width: 60px;
        padding: 5px 10px;
        font-size: 0.85em;
    }
    
    .volume-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    /* 手机端主页按钮位置调整 */
    .home-btn {
        width: 50px;
        height: 50px;
        top: 10px;
        left: 70px;
    }
    
    .home-btn img {
        width: 35px;
        height: 35px;
    }
    
    /* 手机端打赏按钮位置调整 */
    .reward-btn-game {
        width: 50px;
        height: 50px;
        top: 10px !important;
        left: 10px !important;
        bottom: auto !important;
    }
    
    .reward-btn-game i {
        font-size: 22px;
    }
    
    /* 游戏中位置 - 移动端也保持左上角 */
    .game-screen-active .reward-btn-game {
        top: 10px !important;
        left: 10px !important;
        bottom: auto !important;
        transform: none !important;
    }
    
    /* 暂停时位置 - 移动端也保持左上角 */
    .game-paused .reward-btn-game {
        top: 10px !important;
        left: 10px !important;
        bottom: auto !important;
        transform: none !important;
        z-index: 99997 !important;
    }
    
    /* 打赏弹窗手机端优化 */
    .reward-modal-content {
        margin: 15% auto;
        padding: 20px 25px 12px 25px;
        width: 95%;
        max-width: 380px;
    }
    
    .reward-modal-content h2 {
        font-size: 1.6em;
        margin: 0 0 6px 0;
    }
    
    .reward-modal-content p {
        font-size: 0.9em;
        margin: 0 0 10px 0;
    }
    
    .reward-qrcode {
        padding: 15px;
        margin: 0;
    }
    
    .reward-qrcode img {
        width: 180px;
        height: 180px;
    }
    
    .reward-tip {
        font-size: 1em;
        margin: 8px 0 0 0;
    }
}

/* 返回主页按钮 */
.home-btn {
    position: fixed;
    top: 20px;
    left: 90px;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    text-decoration: none;
}

.home-btn:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.home-btn img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

/* 打赏按钮 */
.reward-btn-game {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8787 100%);
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.5);
    transition: all 0.3s ease;
    animation: heartBeat 1.5s ease-in-out infinite;
    visibility: visible !important;
    opacity: 1 !important;
}

.reward-btn-game:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.8);
}

.reward-btn-game i {
    font-size: 28px;
    color: white;
}

@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(1);
    }
}

/* 打赏按钮位置 - 游戏中也保持左上角 */
.game-screen-active .reward-btn-game {
    top: 20px;
    left: 20px;
}

/* 打赏按钮位置 - 暂停时也保持左上角 */
.game-paused .reward-btn-game {
    top: 20px;
    left: 20px;
    transform: none;
    z-index: 99997;
    display: flex;
    visibility: visible;
    opacity: 1;
}

/* 打赏弹窗 */
.reward-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.reward-modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    margin: 15% auto;
    padding: 22px 25px 15px 25px;
    border: 3px solid var(--chinese-gold);
    border-radius: 20px;
    width: auto;
    max-width: 420px;
    text-align: center;
    position: relative;
    animation: slideDown 0.3s ease-out;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.7),
                0 0 30px rgba(212, 175, 55, 0.3);
}

@keyframes slideDown {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.reward-close {
    position: absolute;
    right: 12px;
    top: 12px;
    font-size: 30px;
    font-weight: bold;
    color: var(--chinese-gold);
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.reward-close:hover {
    color: #fff;
    transform: rotate(90deg);
}

.reward-modal-content h2 {
    color: var(--chinese-gold);
    margin: 0 0 8px 0;
    font-size: 1.8em;
    letter-spacing: 3px;
}

.reward-modal-content p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 10px 0;
    font-size: 0.95em;
    line-height: 1.4;
}

.reward-qrcode {
    background: white;
    padding: 18px;
    border-radius: 12px;
    display: inline-block;
    margin: 0;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
}

.reward-qrcode img {
    width: 220px;
    height: 220px;
    display: block;
}

.reward-tip {
    color: var(--imperial-yellow);
    font-size: 1.05em;
    margin: 8px 0 0 0;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(28, 28, 28, 0.5);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-gold);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--chinese-gold);
}

/* 游戏统计 - 在顶部固定 */
.game-stats {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    z-index: 998;
}

.stat-item {
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    background: rgba(26, 26, 46, 0.95);
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.stat-item:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    transform: translateY(-1px);
}

.stat-item i {
    color: #ffd700;
    font-size: 16px;
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.4));
}

.stat-item:nth-child(2) i {
    color: #ff6b6b;
    filter: drop-shadow(0 0 4px rgba(255, 107, 107, 0.4));
}

.stat-item strong {
    color: #fff;
    font-weight: 600;
    min-width: 30px;
    text-align: right;
}

.stat-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(10px);
}

.stat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    border-color: rgba(255, 255, 255, 0.25);
}

.stat-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.stat-btn.love-active {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.stat-btn.love-active:hover {
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.stat-btn i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.stat-btn:hover i {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .game-stats {
        top: 10px;
        right: 10px;
        gap: 8px;
    }
    
    .stat-item {
        font-size: 12px;
        gap: 5px;
        padding: 8px 12px;
        border-radius: 10px;
    }
    
    .stat-item i {
        font-size: 14px;
    }
    
    .stat-item strong {
        min-width: 24px;
    }
    
    .stat-btn {
        padding: 8px 14px;
        font-size: 12px;
        border-radius: 10px;
    }
    
    .stat-btn i {
        font-size: 14px;
    }
}
