/* ── 夏日足汤 · 清透玻璃风 ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --navy: #1a3352;
    --navy-soft: #3d5a80;
    --navy-faint: #6b8299;
    --cyan: #38bdf8;
    --cyan-soft: rgba(56, 189, 248, 0.55);
    --red: #d94848;
    --red-soft: rgba(217, 72, 72, 0.85);
    --glass: rgba(255, 255, 255, 0.58);
    --glass-edge: rgba(255, 255, 255, 0.82);
    --bar-viz-h: 128px;
    --dock-h: 96px;
    --player-zone-h: calc(var(--bar-viz-h) + var(--dock-h));
    --radius: 24px;
    --sidebar-rail-w: 56px;
    --sidebar-expanded-w: 204px;
    --sidebar-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --sidebar-edge: rgba(255, 255, 255, 0.28);
    --content-inset: var(--sidebar-rail-w);
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Noto Sans SC', system-ui, sans-serif;
    font-weight: 300;
    color: var(--navy);
}

/* ── 背景：人物在左，UI 在右 ── */
.bg-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: 32% center;
    background-repeat: no-repeat;
}

.bg-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 50% 40% at 88% 8%, rgba(255, 248, 220, 0.55) 0%, transparent 65%),
        radial-gradient(ellipse 45% 55% at 78% 50%, rgba(186, 230, 253, 0.35) 0%, transparent 70%),
        linear-gradient(to right, transparent 35%, rgba(255, 255, 255, 0.15) 100%);
}

.bg-flare {
    position: fixed;
    top: -8%;
    right: 2%;
    width: 38vw;
    height: 38vw;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, transparent 62%);
    opacity: 0.85;
}

/* ── 玻璃卡片（浅色底 + 深字） ── */
.glass {
    background: var(--glass);
    backdrop-filter: blur(28px) saturate(150%);
    -webkit-backdrop-filter: blur(28px) saturate(150%);
    border: 1px solid var(--glass-edge);
    box-shadow:
        0 16px 48px rgba(26, 51, 82, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* ── 左侧：常驻窄条（占满左列，悬停向右展开） ── */
.sidebar-zone {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 30;
    width: var(--sidebar-rail-w);
    height: 100vh;
    overflow: hidden;
    border: 1px solid var(--sidebar-edge);
    border-left: none;
    box-shadow:
        4px 0 24px rgba(26, 51, 82, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: width 0.6s var(--sidebar-ease);
}

.sidebar-zone:hover,
.sidebar-zone:focus-within {
    width: var(--sidebar-expanded-w);
}

.sidebar-menu {
    padding:
        clamp(1.5rem, 4vh, 2.25rem)
        1rem
        clamp(1.5rem, 4vh, 2rem)
        0;
    display: flex;
    flex-direction: column;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: clamp(2.5rem, 10vh, 4.5rem);
}

.sidebar-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    height: 40px;
    padding-left: calc((var(--sidebar-rail-w) - 40px) / 2);
    border-radius: 10px;
    text-decoration: none;
    color: var(--navy-soft);
    transition: background 0.2s, color 0.2s;
}

.sidebar-row--profile {
    pointer-events: none;
}

a.sidebar-row:hover {
    background: rgba(255, 255, 255, 0.45);
    color: var(--navy);
}

.sidebar-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 1rem;
    line-height: 1;
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(56, 189, 248, 0.35), rgba(125, 211, 252, 0.2));
    border: 2px solid rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--navy);
    box-shadow: 0 4px 14px rgba(26, 51, 82, 0.1);
}

.sidebar-label {
    flex-shrink: 0;
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-8px);
    transition:
        opacity 0.28s ease,
        transform 0.32s ease;
}

.sidebar-username {
    font-size: 1rem;
    letter-spacing: 0.06em;
    color: var(--navy);
}

.sidebar-zone:hover .sidebar-label,
.sidebar-zone:focus-within .sidebar-label {
    opacity: 1;
    transform: translateX(0);
    transition:
        opacity 0.45s var(--sidebar-ease) 0.12s,
        transform 0.5s var(--sidebar-ease) 0.12s;
}

.stage {
    position: relative;
    z-index: 5;
    height: 100vh;
    margin-left: var(--content-inset);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding:
        clamp(2rem, 6vh, 4rem)
        clamp(2rem, 7vw, 6rem)
        calc(var(--player-zone-h) + clamp(1.5rem, 4vh, 2.5rem))
        clamp(1.5rem, 4vw, 3rem);
}

.recommend {
    width: min(400px, 100%);
    padding: clamp(2rem, 4vw, 2.75rem) clamp(2rem, 4vw, 3rem);
    border-radius: var(--radius);
    animation: driftIn 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.recommend-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: clamp(2rem, 5vh, 3rem);
}

.recommend-tag {
    font-size: 0.72rem;
    letter-spacing: 0.28em;
    color: var(--navy-faint);
}

.recommend-date {
    font-size: 0.78rem;
    color: var(--navy-soft);
    font-variant-numeric: tabular-nums;
}

.song-title {
    font-size: clamp(1.85rem, 3.2vw, 2.5rem);
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: 0.05em;
    color: var(--navy);
    margin-bottom: 1rem;
}

.song-meta {
    font-size: 0.92rem;
    color: var(--navy-soft);
    letter-spacing: 0.04em;
    margin-bottom: clamp(1.75rem, 4vh, 2.5rem);
}

.song-quote {
    font-size: 0.88rem;
    line-height: 2;
    color: var(--navy-faint);
    padding-left: 1rem;
    border-left: 2px solid var(--cyan-soft);
    margin-bottom: clamp(2rem, 5vh, 3rem);
}

.play-main {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--red);
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s, background 0.25s, box-shadow 0.25s;
    box-shadow: 0 6px 24px rgba(217, 72, 72, 0.35);
}

.play-main:hover {
    background: var(--red-soft);
    box-shadow: 0 8px 28px rgba(217, 72, 72, 0.45);
}

.play-main:active { transform: scale(0.94); }

.play-main.playing {
    background: #b83a3a;
    box-shadow: 0 0 28px rgba(217, 72, 72, 0.4);
}

.play-main-icon {
    font-size: 0.85rem;
    margin-left: 3px;
}

/* ── 底部播放区 ── */
.player-zone {
    position: fixed;
    left: var(--content-inset);
    right: 0;
    bottom: 0;
    z-index: 20;
}

/* 柱状频谱 — 透明，直接叠在背景上 */
.visualizer-bars {
    height: var(--bar-viz-h);
    position: relative;
    overflow: visible;
    background: transparent;
}

#bar-visualizer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: transparent;
}

.player-dock {
    position: relative;
    height: var(--dock-h);
    background: transparent;
}

.player-strip {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    align-items: center;
    gap: clamp(1rem, 3vw, 2rem);
    padding: 0 clamp(1.5rem, 5vw, 4rem);
    background: transparent;
}

.dock-play {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--red);
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 4px 16px rgba(217, 72, 72, 0.3);
}

.dock-play span { margin-left: 2px; }

.dock-play:hover { background: var(--red-soft); }
.dock-play:active { transform: scale(0.92); }
.dock-play.playing { background: #b83a3a; }

.dock-info {
    flex-shrink: 0;
    min-width: 0;
    max-width: 220px;
}

.dock-title {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.98);
    letter-spacing: 0.02em;
    text-shadow: 0 1px 10px rgba(26, 51, 82, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dock-artist {
    font-size: 0.875rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 1px 8px rgba(26, 51, 82, 0.45);
    margin-top: 0.25rem;
}

.dock-progress {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.dock-time {
    font-size: 0.85rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 8px rgba(26, 51, 82, 0.45);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    min-width: 2.5rem;
}

.dock-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    overflow: hidden;
}

.dock-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--cyan), #7dd3fc);
    border-radius: 999px;
    transition: width 0.4s linear;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.45);
}

.dock-volume {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: clamp(88px, 12vw, 128px);
}

.dock-volume-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.dock-volume-icon {
    width: 18px;
    height: 18px;
}

.dock-volume-btn:hover {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.1);
}

.dock-volume-btn.is-muted {
    color: rgba(255, 255, 255, 0.45);
}

.dock-volume-slider {
    flex: 1;
    min-width: 0;
    height: 3px;
    margin: 0;
    appearance: none;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    cursor: pointer;
}

.dock-volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: none;
    background: var(--cyan);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
    cursor: pointer;
}

.dock-volume-slider::-moz-range-thumb {
    width: 11px;
    height: 11px;
    border: none;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
    cursor: pointer;
}

@media (max-width: 900px) {
    .bg-layer { background-position: 40% center; }

    .stage {
        justify-content: center;
        margin-left: var(--content-inset);
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        align-items: flex-end;
        padding-bottom: calc(var(--player-zone-h) + 1.25rem);
    }

    .recommend { width: 100%; }
    .dock-info { max-width: 160px; }
}

@media (max-width: 520px) {
    .dock-progress { display: none; }
    .stage { padding-bottom: calc(var(--player-zone-h) + 0.75rem); }
}

/* ── 认证页（首页 / 登录 / 注册） ── */
.auth-body {
    overflow: auto;
}

.auth-stage {
    position: relative;
    z-index: 5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 6vh, 4rem) clamp(1.25rem, 4vw, 2rem);
}

.auth-card {
    width: min(420px, 100%);
    padding: clamp(2rem, 4vw, 2.75rem) clamp(1.75rem, 4vw, 2.5rem);
    border-radius: var(--radius);
    animation: driftIn 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-tag {
    font-size: 0.72rem;
    letter-spacing: 0.28em;
    color: var(--navy-faint);
    margin-bottom: 1rem;
}

.auth-title {
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--navy);
    margin-bottom: 0.75rem;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 1.25rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s, background 0.2s, box-shadow 0.2s, color 0.2s;
}

.auth-btn--primary {
    background: var(--red);
    color: #fff;
    box-shadow: 0 6px 24px rgba(217, 72, 72, 0.35);
}

.auth-btn--primary:hover {
    background: var(--red-soft);
    box-shadow: 0 8px 28px rgba(217, 72, 72, 0.45);
}

.auth-btn--full {
    width: 100%;
}

.auth-btn:active {
    transform: scale(0.98);
}

.auth-form {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.auth-field {
    display: grid;
    gap: 0.4rem;
}

.auth-label {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: var(--navy-soft);
}

.auth-input {
    width: 100%;
    min-height: 44px;
    padding: 0 0.95rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.62);
    color: var(--navy);
    font-family: inherit;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.auth-password-wrap {
    position: relative;
    width: 100%;
}

.auth-password-wrap > .auth-input {
    padding-right: 2.35rem;
}

.auth-password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    border: none;
    background: none;
    color: var(--navy-soft);
    opacity: 0.35;
    cursor: default;
    line-height: 0;
    z-index: 1;
    transition: opacity 0.2s;
}

.auth-password-toggle:hover {
    opacity: 0.6;
}

.auth-password-toggle:focus-visible {
    opacity: 0.7;
    outline: none;
}

.auth-error,
.auth-field-error {
    font-size: 0.82rem;
    color: #b83a3a;
}

.auth-switch {
    font-size: 0.85rem;
    color: var(--navy-faint);
    text-align: center;
    margin-top: 0.65rem;
}

.auth-switch a {
    color: var(--navy);
    text-decoration: none;
    border-bottom: 1px solid var(--cyan-soft);
}

.auth-switch a:hover {
    color: var(--navy-soft);
}

.sidebar-row--logout {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.28);
}
