:root {
  --ink: #1f2430;
  --sub: #6b7280;
  --faint: #9aa0aa;
  --line: #eceef1;
  --soft: #f6f7f9;
  --brand: #1a73e8;
  --brand-dark: #1557b0;
  --dayi: #1a73e8;
  --mizai: #e0447f;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, .06), 0 2px 6px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .10);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; background: #fff; color: var(--ink);
  font-family: -apple-system, "SF Pro SC", "PingFang SC", Roboto, Inter, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
.container { max-width: 940px; margin: 0 auto; padding: 0 20px; }
.main { padding: 44px 0 140px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { height: 62px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 9px; }
.brand-emoji { font-size: 22px; }
.brand-name { font-size: 17px; font-weight: 650; letter-spacing: .2px; }
.brand-badge { font-size: 11px; color: var(--faint); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; margin-left: 2px; }
.user { display: flex; align-items: center; gap: 11px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); object-fit: cover; }
.avatar-fallback { display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 13px; font-weight: 600; }
.user-name { font-size: 13.5px; color: var(--sub); }
.logout { font-size: 13.5px; color: var(--faint); }
.logout:hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero-title { font-size: 30px; font-weight: 700; line-height: 1.15; margin: 0 0 10px; letter-spacing: -.5px; }
.hero-sub { font-size: 14.5px; color: var(--sub); margin: 0; line-height: 1.6; }
.hl-dayi { color: var(--dayi); font-weight: 600; }
.hl-mizai { color: var(--mizai); font-weight: 600; }

/* ---------- Album grid (home) ---------- */
.grid { display: grid; gap: 14px; margin-top: 30px; }
@media (min-width: 640px) { .grid { grid-template-columns: 1fr 1fr; } }
.album-card { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: var(--shadow-sm); transition: box-shadow .18s ease, transform .18s ease; }
.album-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.art { flex: none; border-radius: 14px; display: grid; place-items: center; color: #fff; box-shadow: inset 0 1px 6px rgba(255,255,255,.25), var(--shadow-sm); }
.art-lg { width: 148px; height: 148px; border-radius: 20px; font-size: 62px; }
.art-md { width: 68px; height: 68px; font-size: 32px; }
.art-sm { width: 44px; height: 44px; border-radius: 10px; font-size: 20px; }
.album-body { min-width: 0; flex: 1; }
.album-title { font-size: 16px; font-weight: 650; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.album-card:hover .album-title { color: var(--brand); }
.album-sub { font-size: 13px; color: var(--sub); margin: 3px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.album-meta { margin-top: 9px; font-size: 12px; color: var(--faint); display: flex; gap: 8px; align-items: center; }
.pill { background: var(--soft); border-radius: 999px; padding: 2px 9px; }
.album-play { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--soft); color: var(--brand); display: grid; place-items: center; font-size: 14px; transition: background .15s; }
.album-card:hover .album-play { background: var(--brand); color: #fff; }

/* ---------- Album hero (detail) ---------- */
.back { display: inline-flex; font-size: 13.5px; color: var(--faint); margin-bottom: 22px; }
.back:hover { color: var(--brand); }
.album-hero { display: flex; gap: 24px; align-items: flex-end; }
.album-hero .info { min-width: 0; padding-bottom: 4px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); }
.album-hero h1 { font-size: 30px; font-weight: 750; margin: 8px 0 6px; letter-spacing: -.6px; line-height: 1.1; }
.album-hero .desc { font-size: 14px; color: var(--sub); margin: 0; }
.album-hero .meta { margin-top: 14px; font-size: 12.5px; color: var(--faint); display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.play-all { margin-top: 18px; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 22px; border: none; border-radius: 999px; background: var(--brand); color: #fff; font-size: 14.5px; font-weight: 600; cursor: pointer; box-shadow: 0 6px 16px rgba(26,115,232,.28); transition: transform .15s, box-shadow .15s; }
.play-all:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(26,115,232,.34); }
@media (max-width: 560px) { .album-hero { flex-direction: column; align-items: flex-start; gap: 16px; } .art-lg { width: 120px; height: 120px; font-size: 50px; } }

/* ---------- Track list ---------- */
.section-h { font-size: 13px; font-weight: 650; color: var(--sub); margin: 34px 0 6px; letter-spacing: .3px; }
.tracks { border-top: 1px solid var(--line); }
.track { display: flex; align-items: center; gap: 14px; padding: 12px 12px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 10px; transition: background .12s; }
.track:hover { background: var(--soft); }
.track .idx { flex: none; width: 26px; text-align: center; color: var(--faint); font-size: 14px; font-variant-numeric: tabular-nums; }
.track:hover .idx .num { display: none; }
.track .idx .ico { display: none; color: var(--brand); }
.track:hover .idx .ico { display: inline; }
.track .t-title { flex: 1; min-width: 0; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track .t-dur { flex: none; font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.free-badge { display: inline-block; font-size: 11px; font-weight: 600; color: #137333; background: rgba(19,115,51,.1); border-radius: 999px; padding: 1px 7px; margin-left: 6px; vertical-align: middle; }
.track.active { background: rgba(26,115,232,.06); }
.track.active .t-title { color: var(--brand); font-weight: 600; }
.track.active .idx .num, .track.active .idx .ico { display: none; }
.track.active .idx .eq { display: inline-flex; }
.idx .eq { display: none; gap: 2px; height: 14px; align-items: flex-end; }
.idx .eq i { width: 3px; background: var(--brand); border-radius: 2px; animation: eq 1s ease-in-out infinite; }
.idx .eq i:nth-child(1){ animation-delay: 0s } .idx .eq i:nth-child(2){ animation-delay: .3s } .idx .eq i:nth-child(3){ animation-delay: .6s }
@keyframes eq { 0%,100%{ height: 4px } 50%{ height: 14px } }

/* ---------- Panels ---------- */
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); padding: 22px; margin-top: 20px; }
.panel-title { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 16px; font-weight: 650; }
.panel-title .badge { margin-left: auto; font-size: 11px; color: var(--faint); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }

/* ---------- Insights ---------- */
.one-liner { font-size: 14.5px; background: var(--soft); border-left: 3px solid var(--brand); border-radius: 10px; padding: 12px 16px; margin: 0; line-height: 1.6; }
.tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 12px; color: var(--brand); background: rgba(26,115,232,.08); border-radius: 999px; padding: 4px 11px; }
.sec-title { font-size: 13px; font-weight: 600; color: var(--sub); margin: 20px 0 8px; }
.points { margin: 0; padding: 0; list-style: none; }
.points li { display: flex; gap: 9px; font-size: 14.5px; line-height: 1.65; margin-bottom: 8px; }
.points li .dot { color: var(--brand); }
.qa { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 10px; }
.qa summary { cursor: pointer; list-style: none; padding: 12px 15px; background: var(--soft); display: flex; gap: 9px; align-items: flex-start; font-size: 14.5px; }
.qa summary::-webkit-details-marker { display: none; }
.qa .q { color: var(--brand); font-weight: 700; }
.qa .body { padding: 12px 15px; display: flex; gap: 9px; font-size: 14.5px; line-height: 1.65; }
.qa .a { color: var(--mizai); font-weight: 700; }

/* ---------- 说话人色 ---------- */
.spk-dayi { background: rgba(26,115,232,.12); color: var(--dayi); }
.spk-mizai { background: rgba(224,68,127,.12); color: var(--mizai); }

/* ---------- Now Playing 全屏覆盖层（左封面 / 右歌词） ---------- */
/* 覆盖整个视口，translateY(100%) 才能完全移出（否则底部会露出一条）；播放条 z-index 更高，展开时仍在最上层 */
.np-overlay { position: fixed; inset: 0; z-index: 45; background: #fff; transform: translateY(100%); visibility: hidden; transition: transform .34s cubic-bezier(.2,.8,.2,1), visibility 0s linear .34s; overflow: hidden; }
.np-overlay::before { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, var(--c1), var(--c2)); opacity: .12; }
.np-overlay.show { transform: translateY(0); visibility: visible; transition: transform .34s cubic-bezier(.2,.8,.2,1); }
.np-close { position: absolute; top: 18px; right: 22px; width: 40px; height: 40px; border: none; background: rgba(255,255,255,.75); border-radius: 50%; font-size: 17px; color: var(--sub); cursor: pointer; z-index: 3; box-shadow: var(--shadow-sm); }
.np-close:hover { background: #fff; color: var(--ink); }
.np-inner { position: relative; z-index: 1; max-width: 1040px; height: 100%; margin: 0 auto; padding: 40px 32px 96px; display: grid; grid-template-columns: 340px 1fr; gap: 48px; align-items: center; }
.np-left { display: flex; flex-direction: column; align-items: center; text-align: center; }
.np-art { width: 300px; height: 300px; border-radius: 28px; display: grid; place-items: center; color: #fff; font-size: 118px; box-shadow: 0 24px 60px rgba(16,24,40,.24); }
.np-title { margin-top: 26px; font-size: 21px; font-weight: 700; max-width: 320px; }
.np-album { margin-top: 8px; font-size: 13.5px; color: var(--sub); }
.np-right { height: 100%; display: flex; align-items: center; min-width: 0; }
.np-lyrics { width: 100%; max-height: 78vh; overflow-y: auto; padding: 22vh 4px; scroll-behavior: smooth;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent); }
.np-lyrics::-webkit-scrollbar { width: 0; }
.np-hint { color: var(--faint); font-size: 14px; }
.lyric { display: flex; gap: 12px; align-items: flex-start; padding: 12px 12px; border-radius: 12px; cursor: pointer; transition: background .15s; }
.lyric:hover { background: rgba(255,255,255,.55); }
.lspk { flex: none; height: 22px; padding: 0 9px; display: grid; place-items: center; border-radius: 999px; font-size: 11.5px; font-weight: 700; margin-top: 6px; opacity: .45; }
.lyric.active .lspk { opacity: 1; }
.ltext { font-size: 21px; line-height: 1.6; color: #a4aab4; font-weight: 600; transition: color .2s; }
.lyric:hover .ltext { color: #6b7280; }
.lyric.active .ltext { color: #0f1420; }
@media (max-width: 720px) {
  .np-inner { grid-template-columns: 1fr; gap: 18px; padding: 26px 18px; align-content: start; }
  .np-art { width: 150px; height: 150px; font-size: 60px; border-radius: 22px; }
  .np-title { margin-top: 16px; font-size: 18px; }
  .np-lyrics { padding: 8vh 4px; max-height: 46vh; }
  .ltext { font-size: 18px; }
}

/* ---------- 播放条封面「展开」提示 + 标题按钮 ---------- */
.pb-art { position: relative; border: none; padding: 0; cursor: pointer; overflow: hidden; }
.pb-art-hint { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; font-size: 18px; opacity: 0; transition: opacity .15s; }
.pb-art:hover .pb-art-hint { opacity: 1; }
.pb-title { border: none; background: none; padding: 0; font: inherit; cursor: pointer; color: var(--ink); text-align: left; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-title:hover { color: var(--brand); }

/* ---------- 本期总结弹窗 ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(16,24,40,.42); backdrop-filter: blur(2px); display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop.show { display: flex; }
.modal { position: relative; width: 100%; max-width: 560px; max-height: 82vh; overflow-y: auto; background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); padding: 28px; }
.modal-close { position: absolute; top: 16px; right: 18px; width: 32px; height: 32px; border: none; background: var(--soft); border-radius: 50%; font-size: 13px; color: var(--sub); cursor: pointer; }
.modal-close:hover { background: var(--line); color: var(--ink); }

/* ---------- 管理后台 仪表盘 ---------- */
.pill-link { font-size: 13px; color: var(--brand); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; }
.pill-link:hover { background: var(--soft); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 12px; margin-top: 20px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow-sm); }
.tile-n { font-size: 28px; font-weight: 750; letter-spacing: -.5px; line-height: 1.1; }
.tile-l { font-size: 12.5px; color: var(--sub); margin-top: 3px; }
.chart-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .chart-grid { grid-template-columns: 1fr 1fr; } }
.sub14 { font-size: 11px; color: var(--faint); font-weight: 400; margin-left: 8px; }
.chart { display: flex; gap: 4px; align-items: flex-end; margin-top: 4px; }
.col { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.col-bars { height: 108px; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.bar { width: 62%; max-width: 20px; min-height: 2px; background: var(--brand); border-radius: 4px 4px 0 0; }
.bar-green { background: #137333; }
.col:hover .bar { opacity: .72; }
.col-x { font-size: 9.5px; color: var(--faint); margin-top: 6px; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.rank-row:first-of-type { border-top: none; }
.rank-n { width: 20px; text-align: center; color: var(--faint); font-weight: 600; font-size: 13px; }
.rank-body { flex: 1; min-width: 0; }
.rank-title { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-bar { height: 6px; background: var(--soft); border-radius: 4px; margin-top: 5px; overflow: hidden; }
.rank-fill { height: 100%; background: var(--brand); border-radius: 4px; }
.rank-plays { font-size: 13px; color: var(--sub); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.atable { width: 100%; border-collapse: collapse; font-size: 13.5px; white-space: nowrap; }
.atable th { color: var(--sub); text-align: left; font-weight: 500; padding: 8px 10px; }
.atable td { padding: 8px 10px; border-top: 1px solid var(--line); }
.mini-btn { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 3px 10px; cursor: pointer; font-size: 12px; color: var(--ink); }
.mini-btn:hover { background: var(--soft); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-top: 18px; }
.tab { border: none; background: none; padding: 10px 16px; font-size: 14.5px; color: var(--sub); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.tab-panel.hidden { display: none; }

/* ---------- Sticky player bar ---------- */
.playerbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(14px); border-top: 1px solid var(--line); box-shadow: 0 -4px 20px rgba(16,24,40,.06); transform: translateY(110%); visibility: hidden; transition: transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s linear .28s; }
.playerbar.show { transform: translateY(0); visibility: visible; transition: transform .28s cubic-bezier(.2,.8,.2,1); }
.pb-inner { max-width: 940px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 16px; }
.pb-art { flex: none; width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 22px; }
.pb-meta { min-width: 0; width: 190px; }
.pb-title { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-sub { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-controls { display: flex; align-items: center; gap: 6px; }
.pb-btn { width: 34px; height: 34px; border: none; background: none; cursor: pointer; color: var(--sub); font-size: 15px; border-radius: 50%; display: grid; place-items: center; }
.pb-btn:hover { background: var(--soft); color: var(--ink); }
.pb-play { width: 42px; height: 42px; background: var(--brand); color: #fff; font-size: 16px; }
.pb-play:hover { background: var(--brand-dark); color: #fff; }
.pb-seekwrap { flex: 1; display: flex; align-items: center; gap: 10px; }
.pb-time { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; width: 42px; }
.pb-time.r { text-align: right; }
.seek { flex: 1; height: 4px; -webkit-appearance: none; appearance: none; border-radius: 4px; background: var(--line); cursor: pointer; }
.seek::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: var(--brand); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.seek::-moz-range-thumb { width: 13px; height: 13px; border: none; border-radius: 50%; background: var(--brand); }
.pb-rate { flex: none; font-size: 12px; color: var(--sub); border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.pb-rate:hover { background: var(--soft); }
@media (max-width: 620px) { .pb-meta { width: 120px; } .pb-rate, .pb-time.r { display: none; } }

/* ---------- Empty / footer / login ---------- */
.empty { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); padding: 48px; text-align: center; color: var(--sub); }
.empty .big { font-size: 40px; margin-bottom: 12px; }
code { background: var(--soft); border-radius: 5px; padding: 2px 6px; font-size: .9em; }
.footer { text-align: center; font-size: 12px; color: var(--faint); padding: 40px 20px 0; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, #f6f8fc, #eef2f8); padding: 16px; }
.login-card { width: 100%; max-width: 380px; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 40px 36px; text-align: center; }
.login-emoji { font-size: 46px; margin-bottom: 10px; }
.login-title { font-size: 23px; font-weight: 750; margin: 0; letter-spacing: -.3px; }
.login-tag { font-size: 14px; color: var(--sub); margin: 6px 0 0; }
.btn-google { margin-top: 30px; width: 100%; height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid var(--line); background: #fff; border-radius: 12px; font-size: 14.5px; font-weight: 600; cursor: pointer; transition: background .15s, box-shadow .15s; }
.btn-google:hover { background: var(--soft); box-shadow: var(--shadow-sm); }
.btn-dev { margin-top: 12px; width: 100%; height: 42px; display: block; border: 1px dashed var(--line); background: #fff; border-radius: 12px; font-size: 13.5px; color: var(--sub); cursor: pointer; line-height: 42px; }
.btn-dev:hover { background: var(--soft); }
.login-fine { margin-top: 22px; font-size: 12px; color: var(--faint); line-height: 1.6; }

/* ---------- 窄屏 / 手机 ---------- */
@media (max-width: 600px) {
  .container { padding: 0 18px; }
  .header-inner { height: 54px; }
  .brand-name { font-size: 16px; }
  .brand-badge { display: none; }          /* 手机上隐藏 CheatCodeFM 徽标 */
  .user { gap: 8px; }
  .user-name { display: none; }            /* 隐藏用户名，避免「本地开发者/退出」换行 */
  .main { padding: 26px 0 130px; }
  .hero-title { font-size: 23px; }
  .album-hero { gap: 16px; }
  .album-hero h1 { font-size: 24px; }
  .art-lg { width: 132px; height: 132px; font-size: 54px; }
  .panel { padding: 18px; }
  /* 手机播放条：进度条移到顶部整条通栏；下面一行 封面 + 标题 + 播放控制，都放得下 */
  .pb-inner { padding: 11px 14px; gap: 11px; position: relative; }
  .pb-seekwrap { position: absolute; top: 0; left: 0; right: 0; padding: 0; gap: 0; }
  .pb-seekwrap .pb-time { display: none; }
  .seek { height: 3px; border-radius: 0; }
  .seek::-webkit-slider-thumb { width: 11px; height: 11px; }
  .pb-meta { width: auto; flex: 1; min-width: 0; }   /* 标题占满剩余空间，能看到字 */
  .pb-title { font-size: 14px; }
  .pb-sub { font-size: 11.5px; }
  .pb-art { width: 42px; height: 42px; }
  .pb-play { width: 40px; height: 40px; font-size: 15px; }
  .pb-btn { width: 32px; height: 32px; font-size: 13px; }
  .pb-controls { gap: 2px; }
  .pb-rate { display: none; }
}
