:root {
    /* --- iOS 26 "Crystal" Palette --- */
    --bg-deep: #000000;
    
    /* 核心玻璃材质变量 - 更极致的通透感 */
    /* 表面：极低透明度的白色渐变，模拟光泽 */
    --glass-surface: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    /* 边缘：锋利的亮白色边框，模拟切割工艺 */
    --glass-border: rgba(255, 255, 255, 0.12);
    /* 高光：用于强调顶部的反射光 */
    --glass-highlight: rgba(255, 255, 255, 0.3);
    /* 文字：带微发光和阴影，制造浮雕感 */
    --text-on-glass: 0 1px 3px rgba(0,0,0,0.3), 0 0 20px rgba(255,255,255,0.15);

    --neon-primary: #ff3b30;
    --neon-blue: #0a84ff;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.65);
    
    /* Physics */
    --blur-depth: 60px; /* 更深的背景模糊 */
    --easing-spring: cubic-bezier(0.2, 0.8, 0.2, 1);
    --radius-xl: 36px;
    --radius-l: 28px;
    --radius-m: 20px;
}

/* 基础设定 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
    margin: 0; padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-deep); color: var(--text-primary);
    height: 100vh; overflow: hidden;
    /* 全局文字添加玻璃浮雕感 */
    text-shadow: var(--text-on-glass);
}
.hidden { display: none !important; }
h1, h2, h3, h4, p, span, div, button, input {
    /* 确保所有元素继承文字效果 */
    text-shadow: inherit;
}

/* 液态背景动画 */
.liquid-background {
    position: fixed; inset: 0; z-index: -2;
    background: radial-gradient(circle at 50% 50%, #1a1a1a 0%, #000 100%);
}
.liquid-background::after {
    content: ''; position: absolute; inset: -50%;
    background: radial-gradient(circle at var(--flow-x, 30%) var(--flow-y, 30%), var(--neon-ctx, var(--neon-primary)), transparent 50%),
                radial-gradient(circle at var(--flow-x2, 70%) var(--flow-y2, 70%), var(--neon-blue), transparent 50%);
    opacity: 0.3; filter: blur(100px); /* 增加模糊和透明度，让背景光更柔和 */
    animation: liquidFlow 25s infinite alternate linear;
}
@keyframes liquidFlow { 0% { transform: rotate(0deg) scale(1); } 100% { transform: rotate(360deg) scale(1.2); } }

/* --- 核心玻璃拟态基类 (Ultimate Glass) --- */
.glass-panel {
    background: var(--glass-surface);
    /* 双重滤镜：高模糊 + 高饱和度提升通透感 */
    backdrop-filter: blur(var(--blur-depth)) saturate(200%);
    -webkit-backdrop-filter: blur(var(--blur-depth)) saturate(200%);
    border: 1px solid var(--glass-border);
    /* 复合阴影：顶部锋利内高光 + 底部柔和外阴影 */
    box-shadow: inset 0 1px 1px var(--glass-highlight), 0 25px 50px -20px rgba(0,0,0,0.7);
}
/* 深层玻璃 (用于模态窗/遮罩) */
.glass-depth {
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(80px) saturate(220%);
    -webkit-backdrop-filter: blur(80px) saturate(220%);
}

/* --- 鉴权门 --- */
.auth-overlay {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.6s var(--easing-spring), transform 0.6s var(--easing-spring);
}
.auth-overlay.unlocked { opacity: 0; transform: scale(1.1); pointer-events: none; }
.auth-container { text-align: center; width: 80%; max-width: 400px; }
/* 液体文字增强 */
.liquid-text {
    font-weight: 800; background: linear-gradient(135deg, #fff, var(--neon-primary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    /* 液体文字需要更强的光晕才能在玻璃上显现 */
    filter: drop-shadow(0 0 15px rgba(255,255,255,0.3));
    text-shadow: none;
}
h1.liquid-text { font-size: 4rem; margin: 0; letter-spacing: -2px; }
.holo-input-wrapper { position: relative; margin-top: 30px; }

/* 玻璃化输入框 - 凹陷效果 */
#authInput, #authUser, #authPass, #searchInput, .holo-input-admin {
    width: 100%; padding: 18px;
    /* 深色凹陷背景 */
    background: rgba(0, 0, 0, 0.25) !important;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-m);
    color: #fff; font-size: 18px; text-align: center; outline: none; transition: 0.3s;
    /* 内部阴影营造深度 */
    box-shadow: inset 0 3px 10px rgba(0,0,0,0.3);
    backdrop-filter: blur(20px);
    
    /* --- 关键修复 --- */
    position: relative; /* 确保 z-index 生效 */
    z-index: 10; /* 提升层级，防止被背景特效遮挡 */
    pointer-events: auto !important; /* 强制允许鼠标和键盘交互 */
}
#authInput:focus, #authUser:focus, #authPass:focus {
    border-color: var(--neon-primary);
    box-shadow: inset 0 3px 10px rgba(0,0,0,0.4), 0 0 15px var(--neon-primary);
}

/* --- 主布局 --- */
.app-layout { display: flex; height: 100vh; }
.stage-area {
    flex: 1; overflow-y: auto; overflow-x: hidden;
    padding: 30px 20px; scroll-behavior: smooth;
    scrollbar-width: none; -ms-overflow-style: none;
}
.stage-area::-webkit-scrollbar { display: none; }

.hero-title { font-size: 48px; font-weight: 800; margin-bottom: 30px; letter-spacing: -1px; }
.dot { color: var(--neon-primary); text-shadow: 0 0 10px var(--neon-primary); }
.section-title { font-size: 24px; color: var(--text-secondary); margin-bottom: 20px; }

/* 全息网格 (榜单) */
.holo-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 25px;
}
.holo-card {
    position: relative; border-radius: var(--radius-l); overflow: hidden;
    cursor: pointer; transition: transform 0.4s var(--easing-spring), box-shadow 0.4s;
    /* 强制应用玻璃基类 */
    background: var(--glass-surface);
    backdrop-filter: blur(var(--blur-depth)) saturate(200%);
    -webkit-backdrop-filter: blur(var(--blur-depth)) saturate(200%);
    border: 1px solid var(--glass-border);
    box-shadow: inset 0 1px 1px var(--glass-highlight), 0 25px 50px -20px rgba(0,0,0,0.7);
}
.holo-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: inset 0 1px 1px var(--glass-highlight), 0 30px 60px -20px rgba(0,0,0,0.8);
}
.holo-card::before {
    content: ''; position: absolute; inset: 0; z-index: 2;
    background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.15), transparent 50%);
    opacity: 0; transition: opacity 0.3s; pointer-events: none;
    mix-blend-mode: overlay; /* 让光斑更透亮 */
}
.holo-card:hover::before { opacity: 1; }
.card-img-wrap { aspect-ratio: 1; width: 100%; position: relative; padding: 10px; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-m); box-shadow: 0 10px 20px rgba(0,0,0,0.3); }
.card-info { padding: 10px 15px 15px; }
.card-title { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 玻璃化列表堆栈 */
.song-list-stack { display: flex; flex-direction: column; gap: 12px; }
.stack-item {
    display: flex; align-items: center; padding: 12px; gap: 15px; cursor: pointer;
    transition: 0.3s; border-radius: var(--radius-m);
    /* 每个列表项都是独立的玻璃切片 */
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
}
.stack-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--glass-highlight);
    transform: translateX(5px);
}
.stack-img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; box-shadow: 0 5px 10px rgba(0,0,0,0.2); }
.stack-info { flex: 1; min-width: 0; }
.stack-title { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stack-artist { color: var(--text-secondary); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 搜索栏容器 */
.search-bar-container {
    display: flex; align-items: center; padding: 5px 10px 5px 20px;
    border-radius: var(--radius-xl); margin-bottom: 30px; font-size: 18px; color: var(--text-secondary);
    /* 应用玻璃基类 */
    background: var(--glass-surface);
    backdrop-filter: blur(var(--blur-depth)) saturate(200%);
    -webkit-backdrop-filter: blur(var(--blur-depth)) saturate(200%);
    border: 1px solid var(--glass-border);
    box-shadow: inset 0 1px 1px var(--glass-highlight), 0 25px 50px -20px rgba(0,0,0,0.7);
}
#searchInput {
    /* 重置输入框样式以适应容器 */
    background: transparent !important; border: none; box-shadow: none; backdrop-filter: none; padding: 15px 0;
}

/* 玻璃化按钮 */
.holo-btn, .delete-btn {
    width: 100%; padding: 16px; border-radius: var(--radius-l);
    border: 1px solid var(--glass-border); color: #fff; font-size: 16px; font-weight: 700;
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
    /* 独立的玻璃按钮样式 */
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 20px -5px rgba(0,0,0,0.3);
    transition: 0.3s;
}
.holo-btn:hover {
    border-color: var(--glass-highlight);
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}
.delete-btn { background: rgba(255, 59, 48, 0.15); border-color: rgba(255, 59, 48, 0.3); color: #ff453a; }
.delete-btn:hover { background: rgba(255, 59, 48, 0.3); }

/* =========================================
   Responsive & Components
 ========================================= */
.desktop-only { display: none !important; }
.mobile-only { display: flex !important; }
.spacer-bottom { height: 130px; }

/* --- 移动端悬浮 Dock (终极玻璃版) --- */
.floating-dock {
    position: fixed; bottom: 25px; left: 20px; right: 20px;
    height: 85px; border-radius: 42px; /* 更圆润 */
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 25px 0 15px; z-index: 100;
    transition: transform 0.4s var(--easing-spring);
    /* 继承更强的玻璃效果 */
    background: var(--glass-surface);
    backdrop-filter: blur(var(--blur-depth)) saturate(200%);
    -webkit-backdrop-filter: blur(var(--blur-depth)) saturate(200%);
    border: 1px solid var(--glass-border);
    box-shadow: inset 0 1px 1px var(--glass-highlight), 0 30px 60px -15px rgba(0,0,0,0.8);
}
.floating-dock.minimized { transform: translateY(150%); }
.mini-player-strip { display: flex; align-items: center; flex: 1; margin-right: 20px; cursor: pointer; }
.mini-cover { width: 50px; height: 50px; border-radius: 50%; margin-right: 15px; border: 2px solid rgba(255,255,255,0.1); animation: rotate 20s linear infinite; }
.mini-cover.hidden { animation: none; }
@keyframes rotate { to { transform: rotate(360deg); } }
.mini-info { flex: 1; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.play-toggle-btn {
    width: 42px; height: 42px; border-radius: 50%;
    background: rgba(255,255,255,0.9); color: #000; text-shadow: none;
    border: none; display: flex; align-items: center; justify-content: center; font-size: 16px;
    box-shadow: 0 5px 15px rgba(255,255,255,0.3);
}
.dock-nav { display: flex; gap: 25px; }
.nav-btn {
    background: none; border: none; color: var(--text-secondary); font-size: 22px;
    transition: 0.3s; position: relative; padding: 10px;
}
.nav-btn.active { color: var(--neon-primary); text-shadow: 0 0 15px var(--neon-primary); }

/* --- PC/平板端适配 --- */
@media (min-width: 768px) {
    .mobile-only { display: none !important; }
    .desktop-only { display: flex !important; }
    .spacer-bottom { height: 100px; }

    .side-pillar {
        width: 300px; height: 100vh; flex-shrink: 0;
        flex-direction: column; padding: 50px 30px; border-radius: 0;
        border-right: 1px solid var(--glass-border); border-left: none; border-top: none; border-bottom: none;
        /* 增强侧边栏玻璃感 */
        backdrop-filter: blur(80px) saturate(200%);
    }
    .brand { font-size: 32px; font-weight: 800; margin-bottom: 70px; letter-spacing: -1px; }
    .nav-menu li {
        display: flex; align-items: center; gap: 15px; padding: 18px;
        font-size: 18px; font-weight: 700; color: var(--text-secondary);
        border-radius: var(--radius-m); cursor: pointer; transition: 0.3s; margin-bottom: 12px;
        border: 1px solid transparent;
    }
    .nav-menu li:hover {
        background: var(--glass-surface); border-color: var(--glass-border); color: #fff;
        backdrop-filter: blur(20px);
    }
    .nav-menu li.active {
        background: rgba(255, 59, 48, 0.15); color: var(--neon-primary);
        border-color: rgba(255, 59, 48, 0.3);
        box-shadow: 0 5px 20px rgba(255, 59, 48, 0.2);
    }

    .stage-area { padding: 60px 80px; }
    .hero-title { font-size: 72px; }
    .holo-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 35px; }

    .desktop-player-bar {
        position: fixed; bottom: 20px; left: 320px; right: 40px;
        height: 80px; padding: 0 30px; z-index: 90;
        align-items: center; justify-content: space-between;
        border-radius: var(--radius-l);
        /* 悬浮玻璃条 */
        background: var(--glass-surface);
        backdrop-filter: blur(var(--blur-depth)) saturate(200%);
        -webkit-backdrop-filter: blur(var(--blur-depth)) saturate(200%);
        border: 1px solid var(--glass-border);
        box-shadow: inset 0 1px 1px var(--glass-highlight), 0 20px 40px -10px rgba(0,0,0,0.6);
    }
    .pc-track-info { display: flex; align-items: center; gap: 15px; width: 30%; cursor: pointer; }
    .pc-cover { width: 50px; height: 50px; border-radius: 12px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
    .pc-title { font-weight: 700; font-size: 16px; }
    .pc-controls button {
        background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border);
        color: #fff; font-size: 18px; cursor: pointer; width: 44px; height: 44px; border-radius: 50%;
        display: flex; align-items: center; justify-content: center; transition: 0.3s;
        backdrop-filter: blur(10px);
    }
    .pc-controls button:hover { background: rgba(255,255,255,0.15); border-color: #fff; }
    .pc-play-fab { background: #fff !important; color: #000 !important; text-shadow: none; box-shadow: 0 0 20px rgba(255,255,255,0.4); }
    .pc-progress-container { position: absolute; bottom: 0; left: 20px; right: 20px; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; }
    .pc-progress-fill { height: 100%; background: var(--neon-primary); width: 0%; box-shadow: 0 0 10px var(--neon-primary); }
}

/* --- 全屏沉浸式播放器 --- */
.immersive-modal {
    position: fixed; inset: 0; z-index: 200;
    display: flex; flex-direction: column; padding: 30px;
    transform: translateY(110%) scale(0.95); transition: transform 0.6s var(--easing-spring), opacity 0.6s;
    opacity: 0;
}
.immersive-modal.active { transform: translateY(0) scale(1); opacity: 1; }
.close-btn {
    background: rgba(255,255,255,0.1); border: 1px solid var(--glass-border); color: #fff;
    width: 44px; height: 44px; border-radius: 50%; font-size: 20px; cursor: pointer;
    backdrop-filter: blur(20px);
}
.fs-artwork {
    width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-xl);
    box-shadow: 0 30px 70px -20px rgba(0,0,0,0.6); z-index: 2; position: relative;
    transition: transform 0.7s var(--easing-spring);
    border: 1px solid rgba(255,255,255,0.1);
}
.immersive-modal.playing .fs-artwork { transform: rotateX(10deg) scale(1.02) translateY(-20px); }
.artwork-glow {
    position: absolute; inset: -20%; z-index: 1;
    background: var(--neon-ctx, var(--neon-primary)); opacity: 0.5; filter: blur(120px);
    transition: background 1s ease; mix-blend-mode: screen;
}
.fs-track-info h2 { font-size: 36px; margin: 0 0 10px 0; }
.fs-track-info h3 { font-size: 20px; color: var(--text-secondary); margin: 0; }
#fsSeeker {
    width: 100%; -webkit-appearance: none; background: rgba(255,255,255,0.15); height: 6px; border-radius: 3px; outline: none; backdrop-filter: blur(10px);
}
#fsSeeker::-webkit-slider-thumb {
    -webkit-appearance: none; width: 22px; height: 22px; background: #fff; border-radius: 50%;
    cursor: pointer; box-shadow: 0 0 20px rgba(255,255,255,0.8); border: 2px solid rgba(255,255,255,0.1);
}
.fs-controls-holo button {
    background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); color: #fff;
    font-size: 32px; cursor: pointer; width: 70px; height: 70px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; backdrop-filter: blur(20px); transition: 0.3s;
}
.fs-play-fab.big { width: 90px; height: 90px; font-size: 36px; background: #fff !important; color: #000 !important; text-shadow: none; box-shadow: 0 0 30px rgba(255,255,255,0.5); }

.lyrics-stage {
    height: 120px; overflow: hidden;
    mask-image: linear-gradient(transparent, black 20%, black 80%, transparent);
}
.lyrics-scroller {
    text-align: center;
    transition: transform 0.3s ease-out;
}
.lrc-line {
    font-size: 20px; color: rgba(255,255,255,0.3); padding: 12px 0; transition: 0.3s; font-weight: 600;
    text-shadow: var(--text-on-glass);
}
.lrc-line.active {
    color: #fff;
    transform: scale(1.1);
    text-shadow: 0 0 15px rgba(255,255,255,0.3), var(--text-on-glass);
}

/* =========================================
   移动端登录界面修复补丁 (Mobile Login Fixes)
   添加在 style.css 的最末尾
 ========================================= */

@media (max-width: 768px) {
    /* 1. 修正主容器：增加宽度占比，添加安全边距，确保绝对居中 */
    .auth-container {
        width: 92%; /* 在手机上占用更多宽度 */
        max-width: none; /* 取消 PC 端的宽度限制 */
        margin: 0 auto; /* 水平居中 */
        padding: 0 15px; /* 增加容器内边距，防止内容紧贴屏幕边缘 */
        box-sizing: border-box; /* 确保 padding 不会撑破宽度 */
        display: flex; /* 使用 flex 布局来保证内部元素居中 */
        flex-direction: column;
        align-items: center;
    }

    /* 2. 修正输入框：大幅减小内边距，防止溢出屏幕 */
    /* 同时选中旧版(#authInput)和新版账号密码框(#authUser, #authPass) */
    #authInput,
    #authUser,
    #authPass {
        width: 100%; /* 确保占满容器宽度 */
        padding: 15px 5px; /* 【关键】大幅减小左右内边距 (原为 20px) */
        font-size: 20px; /* 稍微减小手机上的字号 */
        text-align: center; /* 强制输入文字居中显示 */
        box-sizing: border-box;
    }

    /* 3. 修正输入框外壳：确保宽度正确 */
    .holo-input-wrapper,
    .login-form-group {
        width: 100%; /* 确保外壳占满容器 */
        max-width: 100%; /* 防止意外溢出 */
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* 调整手机上的垂直间距，使其更紧凑 */
    .holo-input-wrapper {
        margin-top: 25px;
    }

    /* 4. 修正按钮和提示信息：确保宽度和居中 */
    #loginBtn,
    #loginMsg {
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }
}

/* 重置截断文本的样式 */
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }