﻿@charset "utf-8";
/*
 * glass.css
 * 内页统一主题：深色毛玻璃 + 琥珀金
 * 作者：Jack Desuire
 * 创作时间：2026-10-15
 * 最后一次修改时间：2026-10-15
 */
/* ==========================================================================
   glass.css —— 播放器 / 浏览器提示页共用的「深色毛玻璃」主题
   与主页（style.css）视觉一致：全屏背景 + 黑色遮罩 + 毛玻璃卡片
   强调色：琥珀金 #f4a759（不使用蓝紫）
   ========================================================================== */

:root {
    --amber: #f4a759;
    --amber-hi: #ffc27a;
    --amber-soft: rgba(244, 167, 89, .16);
    --amber-rgb: 244, 167, 89;

    --text: #efefef;
    --dim: rgba(239, 239, 239, .62);
    --faint: rgba(239, 239, 239, .38);

    --glass: rgba(255, 255, 255, .10);
    --glass-2: rgba(255, 255, 255, .16);
    --glass-3: rgba(255, 255, 255, .22);
    --stroke: rgba(255, 255, 255, .16);

    --radius: 18px;
    --radius-sm: 12px;
    --blur: 18px;
    --shadow: 0 10px 34px rgba(0, 0, 0, .30);
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
}

body {
    font-family: 'MiSans', 'HarmonyOS Sans', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
    color: var(--text);
    background: #17171b;
    -webkit-font-smoothing: antialiased;
    cursor: url('/static/img/diamond_sword.png') 5 5, auto;
}

a { color: var(--text); text-decoration: none; transition: .25s; }
a:hover { color: #fff; }

::selection { background: var(--amber); color: #2a1c07; }

/* 细滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--amber); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 背景层（与主页同款） ---------- */
.bg-all {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
}
.bg-all img,
.bg-all video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.08);
    filter: blur(8px);
    /* 远端壁纸（每日一图/风景/动漫）下载期间，靠这层本地背景图顶住，不会空成黑屏 */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transition: opacity .8s, transform .4s, filter .4s;
}
.gl-cover {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, .55) 100%),
        radial-gradient(rgba(0, 0, 0, 0) 33%, rgba(0, 0, 0, .35) 166%);
}

/* ---------- 毛玻璃容器 ---------- */
.glass {
    background: var(--glass);
    -webkit-backdrop-filter: blur(var(--blur)) saturate(140%);
    backdrop-filter: blur(var(--blur)) saturate(140%);
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .10);
}

/* ---------- 页面骨架 ---------- */
.page { position: relative; z-index: 1; padding: 16px; }
.wrap { max-width: 1240px; margin: 0 auto; }

/* ---------- 顶栏 ---------- */
.topbar {
    position: sticky;
    top: 10px;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    margin-bottom: 18px;
}
.topbar .spacer { flex: 1; }
.topbar-title {
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: .5px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.topbar-title .count { font-size: .82rem; font-weight: 400; color: var(--faint); }
.topbar-title .accent { color: var(--amber); }

/* ---------- 按钮 ---------- */
.btn-icon,
.btn-glass,
.btn-amber {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    padding: 0 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--stroke);
    background: var(--glass-2);
    color: var(--text);
    font-size: .92rem;
    font-family: inherit;
    cursor: pointer;
    transition: .22s;
    white-space: nowrap;
}
.btn-icon { width: 38px; padding: 0; }
.btn-icon:hover,
.btn-glass:hover { background: var(--glass-3); border-color: rgba(255, 255, 255, .34); }
.btn-icon:active,
.btn-glass:active { transform: scale(.94); }

.btn-amber {
    background: linear-gradient(135deg, var(--amber) 0%, var(--amber-hi) 100%);
    border-color: transparent;
    color: #2a1c07;
    font-weight: 700;
}
.btn-amber:hover { filter: brightness(1.06); color: #2a1c07; }
.btn-amber:active { transform: scale(.95); }

/* ---------- 输入框 ---------- */
.glass-input {
    height: 38px;
    padding: 0 14px;
    min-width: 180px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--stroke);
    background: rgba(0, 0, 0, .22);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: var(--text);
    font-size: .92rem;
    font-family: inherit;
    outline: none;
    transition: .22s;
}
.glass-input::placeholder { color: var(--faint); }
.glass-input:focus {
    border-color: var(--amber);
    background: rgba(0, 0, 0, .34);
    box-shadow: 0 0 0 3px var(--amber-soft);
}

/* ---------- 卡片网格 ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
    gap: 18px;
}
.m-card {
    overflow: hidden;
    cursor: pointer;
    transition: transform .28s, box-shadow .28s, border-color .28s;
}
.m-card:hover {
    transform: translateY(-6px);
    border-color: rgba(var(--amber-rgb), .55);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .40), 0 0 0 1px var(--amber-soft);
}
.m-cover {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: rgba(0, 0, 0, .25);
}
.m-cover.wide { aspect-ratio: 16 / 10; }
.m-meta { padding: 12px 14px 14px; }
.m-title {
    font-size: .96rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.m-artist {
    margin-top: 4px;
    font-size: .82rem;
    color: var(--dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- 列表 / 表格 ---------- */
.rows { display: flex; flex-direction: column; gap: 10px; }
.m-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: var(--glass);
    cursor: pointer;
    transition: .22s;
}
.m-row:hover { background: var(--glass-2); border-color: rgba(var(--amber-rgb), .45); }
.m-row .idx { width: 30px; text-align: center; color: var(--faint); font-variant-numeric: tabular-nums; }
.m-row .m-cover { width: 46px; height: 46px; aspect-ratio: auto; border-radius: 10px; flex: none; }
.m-row .m-meta { padding: 0; flex: 1; min-width: 0; }

table.glass-table { width: 100%; border-collapse: collapse; overflow: hidden; }
table.glass-table th,
table.glass-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, .08); }
table.glass-table th { color: var(--dim); font-weight: 600; font-size: .86rem; }
table.glass-table tr:last-child td { border-bottom: none; }
table.glass-table tbody tr { cursor: pointer; transition: .2s; }
table.glass-table tbody tr:hover { background: var(--glass); }

/* ---------- 黑胶唱片机 ---------- */
.turntable-area { display: flex; align-items: center; justify-content: center; padding: 30px; }
.turntable { position: relative; width: 320px; height: 320px; }
.disk {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background:
        repeating-radial-gradient(circle at 50% 50%, #111 0 3px, #1c1c1c 3px 6px);
    border: 6px solid rgba(255, 255, 255, .10);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .55), inset 0 0 60px rgba(0, 0, 0, .8);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: glass-spin 8s linear infinite;
    animation-play-state: paused;
}
.turntable.playing .disk { animation-play-state: running; }
.disk-cover {
    width: 58%;
    height: 58%;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 0 6px rgba(0, 0, 0, .55);
    background: #222;
}
.disk-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.disk::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 12px var(--amber);
}
.needle {
    position: absolute;
    top: -46px;
    left: 63%;
    width: 108px;
    height: 108px;
    transform-origin: 22px 22px;
    transform: rotate(-25deg);
    transition: transform .5s cubic-bezier(.4, 2, .6, 1);
    pointer-events: none;
    z-index: 3;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5));
}
.needle.playing { transform: rotate(0deg); }

@keyframes glass-spin { to { transform: rotate(360deg); } }

/* ---------- 播放详情：两栏 ---------- */
.detail-grid {
    display: grid;
    grid-template-columns: minmax(300px, 420px) 1fr;
    gap: 18px;
    align-items: stretch;
}
.panel { padding: 22px; display: flex; flex-direction: column; }
.np-head { text-align: center; margin-bottom: 6px; }
.np-title { font-size: 1.5rem; font-weight: 700; line-height: 1.3; }
.np-artist { margin-top: 6px; color: var(--dim); font-size: .95rem; }

/* 歌词滚动区（桌面） */
.lyric-box { position: relative; overflow: hidden; flex: 1; min-height: 300px; }
.lyric-inner { position: absolute; left: 0; width: 100%; transition: top .3s ease; }
.lyric-line {
    text-align: center;
    font-size: 16px;
    line-height: 2.35;
    color: var(--faint);
    transition: .3s;
}
.lyric-line.active {
    color: var(--amber);
    font-size: 1.3rem;
    font-weight: 700;
    text-shadow: 0 0 22px var(--amber-soft);
}
.lyric-line a { color: var(--amber); text-decoration: underline; }

/* ---------- 进度条 ---------- */
.progress {
    position: relative;
    height: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .16);
    cursor: pointer;
}
.progress-fill {
    height: 100%;
    width: 0;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--amber) 0%, var(--amber-hi) 100%);
    position: relative;
    transition: width .12s linear;
}
.progress-handle {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
    opacity: 0;
    transition: opacity .2s;
}
.progress:hover .progress-handle { opacity: 1; }
.times {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: .8rem;
    color: var(--dim);
    font-variant-numeric: tabular-nums;
}

/* ---------- 控制按钮 ---------- */
.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 14px;
}
.ctrl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--stroke);
    background: var(--glass-2);
    color: var(--text);
    font-size: 1.05rem;
    cursor: pointer;
    transition: .22s;
}
.ctrl:hover { background: var(--glass-3); border-color: rgba(255, 255, 255, .34); transform: translateY(-2px); }
.ctrl:active { transform: scale(.92); }
.ctrl-play {
    width: 62px;
    height: 62px;
    font-size: 1.5rem;
    border: none;
    background: linear-gradient(135deg, var(--amber) 0%, var(--amber-hi) 100%);
    color: #2a1c07;
    box-shadow: 0 8px 24px var(--amber-soft);
}
.ctrl-play:hover { filter: brightness(1.07); }
.ctrl-sm { width: 38px; height: 38px; font-size: .95rem; }
.ctrl.active { color: var(--amber); border-color: var(--amber); }

/* 音量 */
.volume-row { display: flex; align-items: center; gap: 10px; justify-content: center; margin-top: 14px; color: var(--dim); }
input[type="range"].glass-range {
    -webkit-appearance: none;
    appearance: none;
    width: 150px;
    height: 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .18);
    outline: none;
}
input[type="range"].glass-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 10px var(--amber-soft);
    cursor: pointer;
}

/* ---------- 状态提示 ---------- */
.state { text-align: center; padding: 60px 20px; color: var(--dim); }

/* ---------- 歌词侧滑面板（移动端） ---------- */
.lyric-panel {
    position: fixed;
    inset: 0 0 0 100%;
    z-index: 200;
    background: rgba(15, 15, 18, .82);
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
    transition: transform .35s ease;
    display: flex;
    flex-direction: column;
}
.lyric-panel.active { transform: translateX(-100%); }
.lpanel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--stroke);
}
.lpanel-head .t { font-weight: 700; }
.lpanel-body {
    flex: 1;
    overflow-y: auto;
    padding: 46% 20px 60%;
    text-align: center;
    scroll-behavior: smooth;
}
.lpanel-body .lyric-line { margin-bottom: 18px; }
.lpanel-body .lyric-line.active {
    background: var(--amber-soft);
    border-radius: 10px;
    padding: 6px 14px;
    transform: scale(1.04);
}

/* ---------- 底部固定条（移动端） ---------- */
.bottom-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(15, 15, 18, .55);
    -webkit-backdrop-filter: blur(var(--blur));
    backdrop-filter: blur(var(--blur));
    border-top: 1px solid var(--stroke);
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .detail-grid { grid-template-columns: 1fr; }
    .turntable { width: 240px; height: 240px; }
    .lyric-box { min-height: 220px; }
}
@media (max-width: 720px) {
    .page { padding: 10px; }
    .topbar { flex-wrap: wrap; top: 6px; }
    .topbar .glass-input { min-width: 0; flex: 1; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
    .m-title { font-size: .88rem; }
    .np-title { font-size: 1.2rem; }
    .turntable { width: 200px; height: 200px; }
    .needle { width: 84px; height: 84px; top: -34px; }
}

/* ---------- 弹窗（编辑音乐信息等） ---------- */
.modal-mask {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(8, 8, 10, .55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.modal-mask.open { display: flex; animation: modalFade .18s ease; }
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }

.modal {
    width: 100%;
    max-width: 470px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalPop .22s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes modalPop {
    from { opacity: 0; transform: translateY(14px) scale(.97); }
    to { opacity: 1; transform: none; }
}

.modal-head {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--stroke);
    font-weight: 700;
}
.modal-x {
    margin-left: auto;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    border: 1px solid var(--stroke);
    background: var(--glass);
    color: var(--text);
    cursor: pointer;
    transition: .2s;
}
.modal-x:hover { background: var(--glass-3); }

.modal-body {
    padding: 18px;
    display: flex;
    gap: 18px;
    align-items: flex-start;
    overflow-y: auto;
}
.modal-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-top: 1px solid var(--stroke);
}
.modal-foot .edit-msg { flex: 1; min-width: 0; font-size: .84rem; color: var(--faint); }

.edit-cover { flex: none; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.edit-cover img {
    width: 116px;
    height: 116px;
    border-radius: 14px;
    object-fit: cover;
    background: rgba(255, 255, 255, .08);
    border: 1px solid var(--stroke);
}
.edit-cover .btn-glass { font-size: .82rem; padding: 7px 12px; height: auto; }

.edit-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.edit-fields label { display: block; font-size: .82rem; color: var(--dim); }
.edit-fields input {
    width: 100%;
    box-sizing: border-box;
    margin-top: 6px;
    height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--stroke);
    background: rgba(0, 0, 0, .25);
    color: var(--text);
    font-family: inherit;
    font-size: .9rem;
    outline: none;
    transition: .2s;
}
.edit-fields input:focus { border-color: var(--amber); background: rgba(0, 0, 0, .35); }

.btn-ghost {
    height: 38px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid var(--stroke);
    background: var(--glass);
    color: var(--text);
    font-family: inherit;
    font-size: .88rem;
    cursor: pointer;
    transition: .2s;
}
.btn-ghost:hover { background: var(--glass-3); }
.btn-ghost:active { transform: scale(.95); }

@media (max-width: 560px) {
    .modal-body { flex-direction: column; align-items: center; }
    .edit-fields { width: 100%; }
}
