:root {
  color-scheme: dark;
  --bg: #0d0c18;
  --panel: #171528;
  --panel-2: #201c39;
  --text: #f6f3ff;
  --muted: #a29bbd;
  --line: rgba(255,255,255,.1);
  --accent: #9b7cff;
  --accent-2: #46d5a0;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 80% 0%, #28204e, var(--bg) 42rem); color: var(--text); font: 15px/1.5 Inter, ui-sans-serif, system-ui, sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.login-panel { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(100%, 410px); padding: 34px; border: 1px solid var(--line); border-radius: 24px; background: rgba(23,21,40,.9); box-shadow: 0 28px 80px rgba(0,0,0,.45); }
.mark { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 24px; border-radius: 15px; background: linear-gradient(135deg, #8e67ff, #5741e8); box-shadow: 0 12px 32px rgba(112,77,255,.35); }
.login-card h1 { font-size: 28px; }
.login-copy { margin: 9px 0 28px; color: var(--muted); }
.login-card label { display: block; margin: 18px 0 8px; color: var(--text); font-size: 13px; font-weight: 650; }
.login-card button { width: 100%; min-height: 48px; margin-top: 20px; }
.app-shell { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 30px 0 64px; }
.topbar, .panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.topbar { margin-bottom: 54px; }
.eyebrow { margin: 0 0 7px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
h1, h2, h3 { margin: 0; letter-spacing: -.04em; }
h1 { font-size: 27px; }
h2 { max-width: 600px; font-size: clamp(38px, 7vw, 72px); line-height: .98; }
h3 { font-size: 22px; }
.mode-switch { display: flex; gap: 5px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: rgba(0,0,0,.18); }
.site-selector-label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.site-selector { border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); color: var(--text); padding: 8px 12px; }
.mode, .quiet-button { border: 0; border-radius: 999px; background: transparent; color: var(--muted); padding: 8px 13px; }
.mode.active, .mode:hover, .quiet-button:hover { background: var(--panel-2); color: var(--text); }
.hero { margin-bottom: 42px; }
.search-form, .source-form { display: flex; gap: 10px; margin-top: 28px; }
input { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.26); color: var(--text); padding: 13px 14px; outline: none; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(155,124,255,.16); }
button[type="submit"] { border: 0; border-radius: 12px; background: var(--accent); color: #140f25; font-weight: 800; padding: 0 18px; white-space: nowrap; }
.status { min-height: 23px; margin: 10px 0 0; color: var(--muted); }
.grid-layout { display: grid; grid-template-columns: minmax(260px, .75fr) minmax(0, 1.25fr); gap: 18px; }
.panel { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: rgba(23,21,40,.82); }
.player-panel { margin-bottom: 18px; }
.player-panel h3 { overflow-wrap: anywhere; }
.player-panel video { width: 100%; margin-top: 16px; border-radius: 12px; background: #000; }
.player-panel audio { display: none; }
.player-controls { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.2); }
.player-toggle { flex: 0 0 36px; width: 36px; height: 36px; border: 0; border-radius: 9px; background: var(--accent); color: #140f25; font-weight: 800; }
.track-select { width: min(38%, 280px); margin: 0; padding: 8px 10px; border-radius: 9px; background: var(--panel-2); color: var(--text); }
.queue-button, .play-fullset { border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--text); }
.queue-button { flex: 0 0 32px; width: 32px; height: 32px; font-size: 22px; line-height: 1; }
.queue-button:hover, .play-fullset:hover { border-color: var(--accent); color: var(--accent); }
.play-fullset { margin-top: 12px; padding: 8px 12px; }
.player-seek { min-width: 0; margin: 0; padding: 0; accent-color: var(--accent); }
.player-time { min-width: 82px; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; text-align: right; }
.source-form { display: grid; grid-template-columns: 1fr 1.5fr auto; margin-top: 20px; }
.source-form button { padding: 0 14px; }
.source-list, .result-list { display: grid; gap: 10px; margin-top: 18px; }
.result-pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.page-size-label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.page-size-label select { border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); color: var(--text); padding: 6px 8px; }
.source-card, .result-card { border: 1px solid var(--line); border-radius: 13px; background: rgba(0,0,0,.14); padding: 14px; }
.source-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.source-name, .result-title { font-weight: 750; }
.source-meta, .result-meta, .empty { color: var(--muted); font-size: 13px; }
.sync-button { border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--text); padding: 6px 9px; }
.sync-button:hover { border-color: var(--accent); }
.result-card { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 14px; }
.artwork { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; background: var(--panel-2); }
.artwork-placeholder { display: grid; place-items: center; color: var(--accent); font-weight: 800; }
.kind { color: var(--accent-2); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.count { min-width: 28px; padding: 3px 8px; border-radius: 999px; background: var(--panel-2); color: var(--muted); text-align: center; }
@media (max-width: 760px) { .topbar { align-items: flex-start; flex-direction: column; } .grid-layout { grid-template-columns: 1fr; } .source-form { grid-template-columns: 1fr; } .source-form button { min-height: 44px; } .search-form { flex-direction: column; } .search-form button { min-height: 44px; } .player-controls { flex-wrap: wrap; } .track-select { flex: 1 1 180px; width: auto; order: 3; } .player-seek { flex: 1 1 140px; } }
