:root {
  --h-bg: #eef1f6;
  --h-card: #ffffff;
  --h-text: #172033;
  --h-muted: #8892a6;
  --h-line: #edf1f7;
  --h-blue: #3b82f6;
  --h-cyan: #22d3ee;
  --h-radius: 12px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body { background: var(--h-bg); color: var(--h-text); font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif; font-size: 13px; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
.h5-app { position: relative; width: min(480px, 100%); margin: 0 auto; min-height: 100vh; background: #fff; box-shadow: 0 0 40px rgba(23, 32, 51, .08); padding-bottom: 66px; overflow-x: hidden; }

/* header */
.h5-head { height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border-bottom: 1px solid var(--h-line); position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
.h5-brand { display: flex; align-items: center; gap: 8px; }
.h5-brand img { width: 26px; height: 26px; border-radius: 7px; }
.h5-brand b { display: block; font-size: 14px; line-height: 1.1; }
.h5-brand em { display: block; font-style: normal; font-size: 9px; color: var(--h-muted); letter-spacing: 1px; margin-top: 2px; }
.h5-admin { font-size: 11px; color: var(--h-muted); border: 1px solid var(--h-line); padding: 4px 9px; border-radius: 999px; }

/* player */
.h5-player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #05080f; overflow: hidden; }
.h5-player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.h5-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #cbd5e1; font-size: 12px; background: radial-gradient(300px 160px at 50% 40%, rgba(59,130,246,.18), transparent 70%); z-index: 3; }
.h5-overlay[hidden] { display: none; }
.h5-spin { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255,255,255,.18); border-top-color: #38bdf8; animation: hspin .8s linear infinite; }
@keyframes hspin { to { transform: rotate(360deg); } }
.h5-player-top { position: absolute; left: 10px; top: 10px; right: 10px; display: flex; align-items: center; gap: 6px; z-index: 4; pointer-events: none; }
.h5-live { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 4px; background: rgba(239,68,68,.9); color: #fff; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.h5-live i { width: 4px; height: 4px; border-radius: 50%; background: #fff; animation: hblink 1.4s infinite; }
@keyframes hblink { 50% { opacity: .25; } }
.h5-quality { padding: 2px 6px; border-radius: 4px; background: rgba(15,23,42,.55); color: #e2e8f0; font-size: 9px; }
.h5-bigplay { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font-size: 16px; display: grid; place-items: center; z-index: 4; padding-left: 3px; backdrop-filter: blur(6px); }
.h5-bigplay[hidden] { display: none; }
.h5-player-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; background: linear-gradient(0deg, rgba(0,0,0,.72), transparent); color: #fff; z-index: 4; }
.h5-now b { display: block; font-size: 13.5px; max-width: 210px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h5-now span { display: block; font-size: 10px; color: rgba(255,255,255,.68); margin-top: 3px; }
.h5-player-actions { display: flex; gap: 6px; }
.h5-player-actions button { border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.12); color: #fff; border-radius: 999px; padding: 5px 10px; font-size: 10.5px; backdrop-filter: blur(6px); }

/* quick chips */
.h5-quick { display: flex; gap: 8px; overflow-x: auto; padding: 12px 14px 4px; scrollbar-width: none; }
.h5-quick::-webkit-scrollbar { display: none; }
.h5-chip { flex: 0 0 auto; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--h-line); background: #f7f9fd; color: #5b667c; font-size: 11.5px; }
.h5-chip.active { background: linear-gradient(135deg, #4f8cff, #2fd3e8); border-color: transparent; color: #fff; font-weight: 600; }

/* content */
.h5-main { min-height: calc(100vh - 120px); }
.h5-section { padding: 10px 14px 4px; }
.h5-sec-head { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 10px; }
.h5-sec-head h2 { margin: 0; font-size: 15px; font-weight: 650; }
.h5-sec-head a, .h5-sec-head button { border: 0; background: none; color: var(--h-muted); font-size: 10.5px; padding: 0; }
.h5-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.h5-card { border: 1px solid var(--h-line); border-radius: 10px; overflow: hidden; background: #fff; text-align: left; padding: 0; }
.h5-card:active { transform: scale(.985); }
.h5-thumb { position: relative; aspect-ratio: 16 / 9; background: #f2f5fa; display: grid; place-items: center; }
.h5-thumb img { width: 72%; height: 72%; object-fit: contain; }
.h5-thumb .letter { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #4f8cff, #2fd3e8); color: #fff; font-weight: 700; font-size: 16px; }
.h5-thumb .h5-tag { position: absolute; left: 6px; top: 6px; padding: 1px 5px; border-radius: 3px; background: rgba(15,23,42,.6); color: #fff; font-size: 8px; letter-spacing: 1px; }
.h5-card-meta { padding: 7px 8px 8px; }
.h5-card-meta b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h5-card-meta span { display: flex; justify-content: space-between; margin-top: 3px; font-size: 9.5px; color: var(--h-muted); }

/* rank list */
.h5-rank { padding: 4px 14px 10px; }
.h5-rank-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--h-line); }
.h5-rank-row:last-child { border-bottom: 0; }
.h5-rank-row .no { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; background: #c8d4e8; }
.h5-rank-row:nth-child(1) .no { background: linear-gradient(135deg, #ff9f43, #ff7043); }
.h5-rank-row:nth-child(2) .no { background: linear-gradient(135deg, #4f8cff, #2fd3e8); }
.h5-rank-row:nth-child(3) .no { background: linear-gradient(135deg, #22c55e, #7bdcb5); }
.h5-rank-row .lg { width: 42px; height: 32px; border-radius: 6px; background: #f2f5fa; display: grid; place-items: center; overflow: hidden; color: #9aa8c0; font-size: 11px; }
.h5-rank-row .lg img { width: 100%; height: 100%; object-fit: contain; }
.h5-rank-row .nm { flex: 1; min-width: 0; }
.h5-rank-row .nm b { display: block; font-size: 12.5px; }
.h5-rank-row .nm span { font-size: 10px; color: var(--h-muted); }

/* mine */
.h5-mine { padding: 14px; }
.h5-user { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 14px; background: linear-gradient(135deg, #1e3a8a, #2563eb); color: #fff; margin-bottom: 12px; }
.h5-user .av { width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 20px; }
.h5-user b { display: block; font-size: 14px; }
.h5-user span { font-size: 10.5px; opacity: .72; }
.h5-links { border: 1px solid var(--h-line); border-radius: 12px; overflow: hidden; }
.h5-links a { display: flex; align-items: center; justify-content: space-between; padding: 13px 14px; border-bottom: 1px solid var(--h-line); font-size: 12.5px; }
.h5-links a:last-child { border-bottom: 0; }
.h5-links a span { color: var(--h-muted); font-size: 11px; }

/* bottom nav */
.h5-nav { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(480px, 100%); height: 58px; background: rgba(255,255,255,.97); border-top: 1px solid var(--h-line); display: grid; grid-template-columns: repeat(5, 1fr); z-index: 30; padding-bottom: env(safe-area-inset-bottom); backdrop-filter: blur(12px); }
.h5-nav button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #9aa5b8; font-size: 9.5px; }
.h5-nav button span { font-size: 17px; line-height: 1; }
.h5-nav button.active { color: var(--h-blue); font-weight: 600; }

/* sheet */
.h5-mask { position: fixed; inset: 0; background: rgba(9, 13, 24, .5); z-index: 40; }
.h5-sheet { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(480px, 100%); max-height: 72vh; background: #fff; border-radius: 16px 16px 0 0; z-index: 50; display: flex; flex-direction: column; overflow: hidden; }
.h5-sheet[hidden] { display: none; }
.h5-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 16px 16px 10px; border-bottom: 1px solid var(--h-line); }
.h5-sheet-head b { display: block; font-size: 14px; }
.h5-sheet-head span { font-size: 10.5px; color: var(--h-muted); }
.h5-sheet-head button { border: 0; background: #f1f5fb; width: 28px; height: 28px; border-radius: 50%; font-size: 16px; color: #64748b; }
.h5-sheet-body { padding: 8px 16px 20px; overflow-y: auto; }
.h5-prog { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--h-line); }
.h5-prog:last-child { border-bottom: 0; }
.h5-prog .tm { width: 46px; flex: 0 0 auto; color: var(--h-muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.h5-prog b { font-size: 12.5px; font-weight: 550; }
.h5-prog.now b { color: var(--h-blue); }
.h5-prog.now .tm { color: var(--h-blue); font-weight: 600; }
.h5-empty { text-align: center; color: var(--h-muted); font-size: 12px; padding: 28px 0; }

@media (min-width: 520px) {
  body { background: #e7ebf2; }
  .h5-app { min-height: 100vh; }
}

#h5MuteBtn { min-width: 30px; padding: 5px 8px; font-size: 13px; }
#h5MuteBtn:active { background: rgba(255,255,255,.28); }