/* =====================================================
   🎮 全局基础样式与默认布局
   ===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 0;
}

/* 隐藏默认滚动条 */
body::-webkit-scrollbar {
    display: none;
}

/* =====================================================
   🧱 页面容器
   ===================================================== */
.container {
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    /* ✅ 主内容基础层级 */
    z-index: 1;
}

header {
    margin-bottom: 30px;
}

h1 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

/* =====================================================
   🧩 文件输入与顶部控制面板
   ===================================================== */
.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    /* ✅ 控制按钮层 */
    z-index: 10;
}

.file-input {
    display: none;
}

.file-label {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: 600;
    z-index: 10; /* ✅ 按钮类控件层 */
}

.file-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.difficulty-select {
    padding: 10px 20px;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    background: white;
    z-index: 10; /* ✅ 同控件层 */
}

/* =====================================================
   🧾 歌曲信息与播放控制
   ===================================================== */
.info-panel {
    display: grid;
    grid-template-columns:1fr;
    gap: 10px;
    margin-bottom: 30px;
    padding: 12px;
    background: rgba(248, 249, 250, 0.65);
    border-radius: 12px;
    position: fixed;
    /* ✅ 信息显示层 */
    z-index: 10;
    bottom: 0;
    left: 3%;
    max-width: 500px;
}

.song-info h2 {
    color: #34449e;
    margin-bottom: 10px;
}

.song-info p {
    color: #666;
    margin-bottom: 5px;
}

/* 播放控制按钮区 */
.playback-controls {
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    position: fixed;
    gap: 10px;
    z-index: 10; /* ✅ 控件层 */
    background-color: rgba(192, 255, 253, 0.35);
    right: 15vw;
    transition: bottom 0.2s;
    bottom: -100vw;
    padding: 16px;
}
.playback-controls.active {
    bottom: 10vw;
}
.playback-controls button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

/* 播放按钮样式 */
#playBtn {
    background: #28a745;
    color: white;
}

#pauseBtn {
    background: #ffc107;
    color: #333;
}

#stopBtn {
    background: #dc3545;
    color: white;
}

.playback-controls button:hover:not(:disabled) {
    transform: scale(1.05);
}

.playback-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 播放速度调节 */
.speed-control {
    display: flex;
    flex-direction: column;
    gap: 5px;
    opacity: 0.6;
    z-index: 10;
}

.speed-control label {
    font-size: 14px;
    color: #666;
}

.speed-control input[type="range"] {
    width: 100%;
}

/* =====================================================
   🕹️ 游戏主容器与画布
   ===================================================== */
.game-container {
    margin-bottom: 0;
    background: #000;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    /* ✅ 底层 */
    z-index: 0;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 600px;
    background: linear-gradient(to bottom, #1a1a2e 0%, #16213e 100%);
    /* ✅ 游戏画布底层 */
    z-index: 0;
}

/* =====================================================
   📊 进度条与时间显示
   ===================================================== */
.progress-bar {
    position: relative;
    height: 8px;
    background: #333;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0;
    transition: width 0.1s linear;
}

.progress-time {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    background: #1a1a1a;
    color: white;
    font-size: 10px;
}

/* =====================================================
   ⚙️ 设置面板
   ===================================================== */
/* === Settings 面板展开/收起动画 === */
.settings-panel {
    overflow: hidden;
    border-radius: 8px;
    transition: max-height 0.4s ease, opacity 0.4s ease;
    max-height: 50px;          /* 默认只显示标题 */
    opacity: 0.9;
}

/* 点击区域 */
.settings-header {
    cursor: pointer;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.51) 0%, rgba(197, 169, 225, 0.5) 100%);
    color: #fff;
    font-weight: 600;
    border-radius: 12px 12px 0 0;
    user-select: none;
    transition: background 0.3s;
    max-width: 150px;
}

.settings-header:hover {
    background: linear-gradient(135deg, #5a6de0 0%, #6d45a0 100%);
}

/* 内容容器默认折叠 */
.settings-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0 10px;
    transition: max-height 0.4s ease, opacity 0.4s ease, padding 0.3s;
}

/* 展开状态 */
.settings-panel.active {
    max-height: 30vw; /* 控制展开高度 */
    opacity: 1;
}

.settings-panel.active .settings-content {
    max-height: 400px;
    opacity: 1;
    padding: 10px;
}


.settings-panel h3 {
    color: #333;
    margin-bottom: 10px;
}

.setting-item {
    margin-bottom: 10px;
    z-index: 10;
}

.setting-item label {
    display: block;
    color: #666;
    margin-bottom: 2px;
}

.setting-item input[type="range"] {
    width: 100%;
}

.setting-item input[type="checkbox"] {
    margin-right: 8px;
}

/* =====================================================
   🌙 页面滚动条（窄条隐藏样式）
   ===================================================== */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
    background-color: #00000000; /* 默认隐藏 */
}

/* =====================================================
   ⏸️ 暂停遮罩层
   ===================================================== */
#pauseOverlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: black;
    opacity: 0; /* 初始透明 */
    pointer-events: none; /* 防止遮挡点击 */
    transition: opacity 0.3s ease; /* 平滑淡入淡出 */
    /* ✅ 顶层遮罩 */
    z-index: 90;
}
/* =====================================================
   🔖 层级注释索引（方便快速理解）
   =====================================================
   z-index: 0   → 画布底层（gameCanvas, game-container）
   z-index:
Use ChatGPT-5 to list
