:root { color-scheme: dark; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; background: #151515; color: #f3f3f3; --accent: #ec5b68; --muted: #999; --line: #303030; }
* { box-sizing: border-box; }
body { margin: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.topbar { flex: 0 0 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); background: #1b1b1b; z-index: 20; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 650; letter-spacing: .04em; }
.brand svg { width: 25px; height: 25px; fill: var(--accent); }
.plain-button { min-height: 36px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: #ccc; }
.library-button { display: none; }
.import-button { min-height: 36px; padding: 7px 16px; border: 0; border-radius: 7px; background: var(--accent); color: white; }
.workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.library-panel { min-height: 0; padding: 20px 12px; border-right: 1px solid var(--line); background: #1b1b1b; }
.library-title { display: flex; justify-content: space-between; align-items: center; padding: 0 8px 14px; }
.library-title h2 { margin: 0; font-size: 18px; }
.library-title span { color: var(--muted); font-size: 12px; }
.search { width: 100%; height: 38px; padding: 0 12px; border: 1px solid #383838; border-radius: 8px; outline: none; background: #242424; color: #eee; }
.search:focus { border-color: #a94c55; }
.library-filters { display: flex; gap: 5px; margin-top: 10px; }
.library-filters button { flex: 1; min-height: 30px; padding: 4px 6px; border: 1px solid #383838; border-radius: 6px; background: transparent; color: #999; font-size: 12px; }
.library-filters button.active { border-color: #7c454e; background: #3b292d; color: #f0cbd0; }
.song-list { height: calc(100% - 126px); overflow-y: auto; padding-top: 12px; }
.library-empty { padding: 18px 10px; color: #998b8f; font-size: 13px; line-height: 1.8; }
.song-card { display: block; width: 100%; padding: 13px 12px; border: 0; border-left: 3px solid transparent; border-radius: 7px; background: transparent; color: #eee; text-align: left; }
.song-card:hover { background: #292929; }
.song-card.active { border-left-color: var(--accent); background: #332528; }
.song-card strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.song-card small { display: block; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #999; }
.song-card .mark-counts { color: #d6b77a; }
.now-playing { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: radial-gradient(circle at 50% 0, #352126 0, #1b1b1b 45%); }
.song-heading { flex: 0 0 auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 22px 30px 14px; }
.song-heading h1 { margin: 0 0 7px; font-size: 27px; font-weight: 600; }
.song-heading p { margin: 0; color: #b4a4a8; font-size: 13px; }
.version-tabs { display: flex; gap: 7px; max-width: 55%; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.version-tabs::-webkit-scrollbar { display: none; }
.version-tab { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; min-height: 34px; padding: 6px 12px; border: 1px solid #594148; border-radius: 18px; background: transparent; color: #c5b4b8; }
.version-tab.active { border-color: var(--accent); background: #623038; color: #fff; }
.version-tab[data-mark="candidate"] { border-color: #947542; }
.version-tab[data-mark="official"] { border-color: #bd5c68; }
.version-mark { color: #e6c47e; font-size: 10px; }
.version-mark.official { color: #ff929c; }
.lyrics-stage { flex: 1; min-height: 0; display: flex; flex-direction: column; margin: 0 30px 16px; overflow: hidden; border: 1px solid #3c3033; border-radius: 12px; background: rgba(18,18,18,.5); }
.lyrics-toolbar { flex: 0 0 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px; border-bottom: 1px solid #34292c; color: #a99a9e; font-size: 13px; }
.toolbar-actions, .review-controls { display: flex; align-items: center; gap: 7px; }
.review-button { min-height: 30px; padding: 5px 10px; font-size: 12px; white-space: nowrap; }
.review-button:disabled { cursor: default; opacity: .45; }
.review-button[data-mark="candidate"].active { border-color: #b89550; background: #483a24; color: #f5d591; }
.review-button[data-mark="official"].active { border-color: var(--accent); background: #623038; color: #ffb1b9; }
#followButton.active { border-color: #a94c55; color: #ff929c; background: #3b2529; }
.lyrics { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 28vh 8%; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: #70414a transparent; }
.lyric-section { padding: 24px 12px 8px; color: #98757d; font-size: 12px; letter-spacing: .16em; }
.lyric-line { display: block; width: 100%; min-height: 48px; padding: 10px 16px; border: 0; border-radius: 8px; background: transparent; color: #b6aaad; text-align: center; font-size: 20px; line-height: 1.7; transition: color .2s, background .2s, font-size .2s; }
.lyric-line.past { color: #73696c; }
.lyric-line:hover { background: #ffffff08; color: #eee; }
.lyric-line.active { background: linear-gradient(90deg, transparent, #ec5b6818, transparent); color: #ff7e8b; font-size: 28px; font-weight: 650; text-shadow: 0 0 24px #ec5b6830; }
.lyric-line:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid #ef7a86; outline-offset: 2px; }
.empty-state { margin: 30vh auto 0; max-width: 360px; color: #998b8f; text-align: center; line-height: 1.8; }
.timing-note { flex: 0 0 auto; margin: 0; padding: 8px 18px; color: #716569; font-size: 11px; text-align: center; }
.player-bar { position: relative; flex: 0 0 86px; display: grid; grid-template-columns: 260px minmax(0, 1fr) 100px; align-items: center; gap: 20px; padding: 10px 24px; border-top: 1px solid #363636; background: #1d1d1d; box-shadow: 0 -8px 28px #00000020; z-index: 20; }
.mini-track { min-width: 0; display: flex; align-items: center; gap: 11px; }
.mini-cover { flex: 0 0 50px; height: 50px; display: grid; place-items: center; border-radius: 7px; background: #633039; color: #f2cbd0; font-family: "STKaiti", "KaiTi", serif; font-size: 13px; }
.mini-track h2 { margin: 0 0 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 500; }
.mini-track p { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #999; font-size: 11px; }
.playback-center { min-width: 0; }
.control-row { display: flex; align-items: center; justify-content: center; gap: 20px; height: 42px; }
.icon-button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; background: transparent; color: #ddd; }
.icon-button svg { width: 21px; height: 21px; fill: currentColor; }
.main-play { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: var(--accent); color: white; }
.main-play svg { width: 23px; height: 23px; fill: currentColor; }
.main-play svg[hidden] { display: none; }
.progress-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; align-items: center; gap: 10px; color: #999; font-size: 11px; font-variant-numeric: tabular-nums; }
.progress-row input { width: 100%; height: 24px; accent-color: var(--accent); cursor: pointer; }
.download-link { justify-self: end; padding: 8px 14px; border: 1px solid #494949; border-radius: 7px; color: #ccc; text-decoration: none; }
.player-status { position: absolute; right: 24px; bottom: 2px; margin: 0; color: #e68d97; font-size: 11px; }
.library-overlay { display: none; }
.import-dialog { width: min(92vw, 520px); max-height: 90dvh; padding: 0; border: 1px solid #514047; border-radius: 14px; background: #211c1e; color: #eee; }
.import-dialog::backdrop { background: #000000a0; }
#importForm { padding: 22px; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; }
.dialog-heading h2 { margin: 0; font-size: 21px; }
#importForm > p { color: #ac9ca1; font-size: 13px; line-height: 1.7; }
#importForm label { display: block; margin-top: 16px; color: #d6c8cc; font-size: 13px; }
#importForm input { display: block; width: 100%; min-height: 42px; margin-top: 7px; padding: 9px 10px; border: 1px solid #514148; border-radius: 7px; background: #2b2427; color: #eee; }
#importForm input[type="file"] { padding: 11px 10px; }
.submit-import { width: 100%; min-height: 44px; margin-top: 20px; border: 0; border-radius: 8px; background: var(--accent); color: white; }
.import-status { min-height: 20px; color: #ef9aa4; }
@media (max-width: 760px) {
  .topbar { flex-basis: 54px; padding: 0 14px; }
  .library-button { display: block; }
  .brand { font-size: 14px; }
  .import-button { padding: 7px 12px; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .library-overlay { position: fixed; inset: 54px 0 0; z-index: 39; background: #00000080; }
  .library-overlay.open { display: block; }
  .library-panel { position: fixed; top: 54px; bottom: 0; left: 0; z-index: 40; width: min(86vw, 340px); transform: translateX(-100%); transition: transform .2s; box-shadow: 12px 0 32px #00000050; }
  .library-panel.open { transform: translateX(0); }
  .song-heading { display: block; padding: 15px 16px 10px; }
  .song-heading h1 { font-size: 22px; }
  .version-tabs { max-width: 100%; margin-top: 12px; }
  .lyrics-stage { margin: 0; border: 0; border-radius: 0; }
  .lyrics { padding: 26vh 14px; }
  .lyric-line { font-size: 18px; }
  .lyric-line.active { font-size: 24px; }
  .timing-note { display: none; }
  .player-bar { flex-basis: 104px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 27px 1fr; gap: 0 8px; padding: 5px 14px calc(7px + env(safe-area-inset-bottom)); }
  .mini-track { grid-row: 2; grid-column: 1; }
  .mini-cover { flex-basis: 39px; height: 39px; font-size: 11px; }
  .playback-center { display: contents; }
  .control-row { grid-row: 2; grid-column: 2; height: 48px; gap: 7px; }
  .progress-row { grid-row: 1; grid-column: 1 / -1; }
  .download-link { display: none; }
  .player-status { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
