:root {
  color-scheme: dark;
  --bg: #0b0e12;
  --panel: #11161d;
  --panel2: #18202a;
  --line: #283440;
  --text: #edf2f5;
  --muted: #8d9aa5;
  --accent: #75a99f;
  --accent2: #587f78;
  --danger: #ff6680;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 Inter, ui-sans-serif, system-ui, sans-serif; }
button, input, select, textarea { font: inherit; }
button { border: 1px solid #86b7ad33; border-radius: 9px; padding: 11px 16px; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; font-weight: 750; cursor: pointer; box-shadow: none; transition: transform .14s ease, filter .14s ease, background-color .18s ease, border-color .18s ease, color .18s ease, opacity .18s ease; }
button:hover { filter: brightness(1.08); transform: translateY(-1px); }
button:active { transform: translateY(0) scale(.975); }
button:disabled { cursor: default; opacity: .45; filter: none; transform: none; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px; background: #0c0f15; color: var(--text); resize: vertical; transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #608b83; box-shadow: 0 0 0 3px #75a99f18; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(36px, 7vw, 64px); line-height: 1.02; letter-spacing: -3px; }
h2 { margin-bottom: 0; font-size: 30px; letter-spacing: -1px; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 8px; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.error { color: var(--danger); min-height: 20px; }
.card { border: 1px solid var(--line); background: var(--panel); border-radius: 15px; padding: 22px; transition: border-color .2s ease, background-color .2s ease, transform .2s ease; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 70% 20%, #19282a, transparent 35%), radial-gradient(circle at 20% 85%, #141c25, transparent 30%); }
.login-card { width: min(430px, 100%); display: grid; gap: 16px; }
.remember-login { display: flex; align-items: center; gap: 9px; width: fit-content; cursor: pointer; }
.remember-login input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.brand, .logo span, .player-art span { display: grid; place-items: center; width: 56px; height: 46px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; font-weight: 950; font-size: 15px; letter-spacing: -1px; transform: rotate(-3deg); box-shadow: 0 10px 26px #0005; }
#app { min-height: 100vh; display: grid; grid-template-columns: 235px 1fr; }
aside { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); padding: 26px 18px; display: flex; flex-direction: column; }
.logo { display: flex; align-items: center; gap: 12px; font-size: 18px; }
.logo strong { font-weight: 900; letter-spacing: -1px; }
.logo span { width: 42px; height: 34px; border-radius: 9px; font-size: 11px; }
nav { margin-top: 45px; display: grid; gap: 6px; }
.nav, .ghost { background: transparent; color: var(--muted); text-align: left; }
.nav.active, .nav:hover { background: var(--panel2); color: var(--text); }
.profile { margin-top: auto; padding: 14px; display: grid; }
.profile span { color: var(--accent); font-size: 11px; font-weight: 800; }
.profile .ghost { padding-left: 0; margin-top: 8px; }
.content { padding: 35px clamp(20px, 5vw, 70px); overflow: hidden; }
header { display: flex; align-items: end; justify-content: space-between; margin-bottom: 32px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 17px; }
.playlist { position: relative; min-height: 210px; display: flex; flex-direction: column; background: linear-gradient(145deg, var(--panel2), var(--panel)); transition: transform .2s, border-color .2s; }
.playlist-menu { position: absolute; right: 14px; top: 13px; z-index: 2; }
.playlist-menu + .playlist-status { margin-right: 42px; }
.playlist:hover { transform: translateY(-2px); border-color: #4b6b68; }
.playlist-status { align-self: end; border: 1px solid var(--line); border-radius: 99px; padding: 3px 8px; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: 1px; transition: color .25s ease, background-color .25s ease, border-color .25s ease; }
.playlist-status.playing { border-color: #416c61; color: #8fd4c4; background: #17302a; }
.playlist-status.generating { border-color: #7d7040; color: #d7c27a; background: #292516; }
.playlist-status.error { border-color: #713c48; color: #ff9aaa; background: #28171c; }
.playlist .count { color: var(--accent); font-size: 40px; font-weight: 900; }
.playlist-count { display: flex; align-items: baseline; gap: 7px; }
.count-label { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .4px; }
.playlist .actions { display: flex; gap: 7px; margin-top: auto; }
.playlist .actions button { flex: 1; }
.playlist .actions .ghost { text-align: center; border: 1px solid var(--line); }
.upload-card { display: grid; grid-template-columns: minmax(180px, .6fr) 2fr; gap: 20px; align-items: center; margin-bottom: 18px; }
.upload-card form { display: grid; grid-template-columns: repeat(2, minmax(140px, 1fr)); gap: 9px; }
.transcribe-audio { display: flex; align-items: center; gap: 9px; padding: 0 4px; cursor: pointer; }
.transcribe-audio input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.form-row { display: flex; gap: 9px; }
.library-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 10px; }
.library-toolbar h3 { margin-bottom: 3px; }
.library-toolbar p { margin-bottom: 0; }
.library-toolbar input { max-width: 360px; }
.library-tools { display: flex; align-items: center; justify-content: end; gap: 10px; flex: 1; }
.library-tools input { flex: 1; }
.library-total { min-width: 105px; display: grid; justify-items: end; padding: 5px 10px; border-right: 1px solid var(--line); }
.library-total strong { color: var(--accent); font-size: 22px; line-height: 1; }
.library-total span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.storage-total { min-width: 150px; display: grid; gap: 3px; padding: 5px 10px; border-right: 1px solid var(--line); }
.storage-total strong { color: var(--text); font-size: 12px; line-height: 1; white-space: nowrap; }
.storage-total span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.storage-track { width: 100%; height: 3px; overflow: hidden; border-radius: 99px; background: var(--line); }
.storage-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .25s ease; }
.list { position: relative; display: grid; gap: 2px; overflow: visible; }
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px; border-bottom: 1px solid var(--line); }
.user-item { display: grid; grid-template-columns: 1fr auto auto; transition: background-color .18s ease, opacity .18s ease; }
.user-item:hover { background: #151d25; }
.delete-user-button { padding: 8px 11px; border-color: #713c48; background: #28171c; color: #ff9aaa; box-shadow: none; }
.song-item { position: relative; z-index: 0; display: grid; grid-template-columns: 34px minmax(150px, 1fr) minmax(220px, 420px) auto 42px; align-items: center; gap: 12px; padding: 13px; border-bottom: 1px solid var(--line); transition: background-color .18s ease, opacity .18s ease; animation: settle-in .2s ease both; }
.song-item:has(.song-menu[open]) { z-index: 20; }
.song-item:hover { background: #151d25; }
.single-link-button { border: 1px solid var(--line); padding: 8px 11px; white-space: nowrap; text-align: center; }
.favorite { width: 34px; height: 34px; padding: 0; border-color: transparent; background: transparent; color: var(--muted); box-shadow: none; font-size: 21px; transition: color .16s ease, transform .18s ease; }
.favorite.active { color: #e4c96e; }
.favorite.active:hover { transform: scale(1.12) rotate(-5deg); }
.song-info { display: grid; gap: 3px; min-width: 0; }
.song-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-meta, .song-description { color: var(--muted); font-size: 12px; }
.song-description { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-tags, .tag-filters { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { border: 1px solid #3b4b56; border-radius: 99px; padding: 2px 7px; color: #9fb7b2; background: #131c22; font-size: 10px; }
.transcription-marker { border-color: #665d3c; color: #d8c47b; background: #252217; }
.transcription-marker-toggle { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.transcription-marker-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.tag-filters { min-height: 24px; margin-bottom: 12px; }
.tag-filter { padding: 4px 9px; border-radius: 99px; background: transparent; border-color: var(--line); color: var(--muted); font-size: 11px; box-shadow: none; }
.tag-filter.active { background: #1d3531; border-color: #4e776f; color: var(--text); }
.preview { width: 100%; height: 38px; margin: 0; }
.song-menu { position: relative; z-index: 2; }
.song-menu[open] { z-index: 30; }
.song-menu summary { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); cursor: pointer; list-style: none; font-weight: 900; letter-spacing: 2px; }
.song-menu summary::-webkit-details-marker { display: none; }
.song-menu summary:hover, .song-menu[open] summary { background: var(--panel2); color: var(--text); }
.song-menu-popover { position: absolute; z-index: 40; right: 0; top: calc(100% + 6px); width: 170px; display: grid; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel2); box-shadow: 0 12px 30px #0008; }
.song-menu-popover button { text-align: left; background: transparent; border-color: transparent; color: var(--text); box-shadow: none; }
.song-menu-popover .danger-action { background: #28171c; color: #ff9aaa; }
.badge { border: 1px solid var(--line); border-radius: 99px; padding: 4px 9px; color: var(--accent); font-size: 11px; font-weight: 800; }
dialog { width: min(900px, calc(100% - 30px)); max-height: 92vh; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--text); padding: 0; opacity: 0; transform: translateY(10px) scale(.985); transition: opacity .18s ease, transform .18s ease, overlay .18s ease allow-discrete, display .18s ease allow-discrete; }
dialog[open] { opacity: 1; transform: translateY(0) scale(1); }
dialog::backdrop { background: #0000; backdrop-filter: blur(0); transition: background-color .18s ease, backdrop-filter .18s ease, overlay .18s ease allow-discrete, display .18s ease allow-discrete; }
dialog[open]::backdrop { background: #000b; backdrop-filter: blur(5px); }
@starting-style {
  dialog[open] { opacity: 0; transform: translateY(10px) scale(.985); }
  dialog[open]::backdrop { background: #0000; backdrop-filter: blur(0); }
}
.dialog-card { position: relative; padding: 28px; display: grid; gap: 16px; }
.dialog-actions { display: flex; gap: 8px; }
.dialog-actions button, .dialog-actions .button-link { flex: 1; text-align: center; }
.button-link { display: grid; place-items: center; border-radius: 9px; padding: 11px 16px; color: var(--muted); text-decoration: none; }
.control-button { border: 1px solid var(--line); text-align: center; box-shadow: none; }
.close { position: absolute; right: 14px; top: 14px; padding: 3px 10px; background: transparent; color: var(--muted); font-size: 24px; }
.invite-button { position: absolute; right: 62px; top: 14px; width: 42px; height: 42px; display: grid; place-items: center; padding: 10px; background: transparent; border-color: var(--line); color: var(--muted); box-shadow: none; }
.invite-button:hover { background: var(--panel2); color: var(--text); }
.invite-button svg { width: 21px; height: 21px; fill: currentColor; }
.duplicate-button { right: 110px; }
.picker { max-height: 300px; overflow: auto; display: grid; gap: 5px; }
.pick { display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 9px; }
.pick input { width: auto; accent-color: var(--accent); }
.radio-panel { display: grid; grid-template-columns: 1fr minmax(150px, 260px); align-items: center; gap: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #0d1217; }
.radio-panel p { margin-bottom: 4px; }
.playlist-duration { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.generation-warning { margin-top: 8px; padding: 7px 9px; border: 1px solid #665d37; border-radius: 7px; background: #242114; color: #d7c27a; font-size: 11px; }
.radio-controls { display: flex; gap: 6px; }
.volume-control { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
.volume-control input { padding: 0; accent-color: var(--accent); }
.editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.editor-heading h3 { margin-bottom: 0; }
.playlist-queue { max-height: 320px; overflow: auto; display: grid; gap: 5px; }
.queue-editor-item { display: grid; grid-template-columns: 25px 42px minmax(120px, 1fr) minmax(130px, 190px) 36px 38px; align-items: center; gap: 8px; padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: #0e1319; transition: transform .18s ease, opacity .18s ease, border-color .18s ease, background-color .18s ease; animation: settle-in .2s ease both; }
.queue-editor-item:hover { border-color: #3e514f; background: #111920; }
.queue-editor-item.active { border-color: #4b756d; background: #13221f; }
.queue-editor-item.dragging { opacity: .35; }
.drag-handle { color: var(--muted); cursor: grab; font-size: 20px; }
.queue-position { width: 34px; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.remove-audio { padding: 8px; min-width: 34px; box-shadow: none; }
.remove-audio { background: transparent; border-color: transparent; color: var(--muted); font-size: 20px; }
.audio-edit-button { padding: 7px; background: transparent; border-color: var(--line); color: var(--muted); box-shadow: none; }
.sound-volume { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 7px; }
.sound-volume span { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.sound-volume input { padding: 0; accent-color: var(--accent); }
.team-user-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 7px; }
.team-user { display: flex; align-items: center; gap: 9px; padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: #10171e; cursor: pointer; }
.team-user input { width: auto; accent-color: var(--accent); }
.team-user span { display: grid; }
.team-user small { color: var(--muted); font-size: 10px; }
.team-dialog { width: min(560px, calc(100% - 30px)); }
.owner-transfer { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.empty-queue { display: grid; gap: 4px; place-items: center; padding: 35px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); }
.library-dialog-card { min-height: 500px; grid-template-rows: auto auto auto auto 1fr auto; }
.picker-source-tabs { display: flex; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: #0d1217; width: fit-content; }
.picker-source { padding: 7px 12px; background: transparent; border-color: transparent; color: var(--muted); box-shadow: none; }
.picker-source.active { background: var(--panel2); border-color: var(--line); color: var(--text); }
.compact-dialog { width: min(560px, 100%); }
.library-picker { overflow: auto; display: grid; align-content: start; gap: 7px; }
.library-song { display: grid; grid-template-columns: 22px 34px minmax(150px, 1fr) minmax(220px, 350px); align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #0e1319; cursor: pointer; transition: border-color .18s ease, background-color .18s ease, transform .18s ease; animation: settle-in .2s ease both; }
.library-song:hover { transform: translateY(-1px); border-color: #3e514f; }
.library-song.selected { border-color: #527b73; background: #13221f; }
.library-check { width: auto; accent-color: var(--accent); }
.picker-footer { position: sticky; z-index: 4; right: 0; bottom: 0; justify-self: end; width: max-content; max-width: 100%; display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin: 0 -8px -8px auto; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #111820f2; color: var(--muted); box-shadow: 0 -10px 30px #0008; backdrop-filter: blur(8px); }
.audio-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#toast { position: fixed; z-index: 20; right: 20px; bottom: 20px; padding: 12px 17px; border-radius: 9px; background: var(--accent2); color: #fff; font-weight: 700; opacity: 0; transform: translateY(15px) scale(.97); transition: opacity .18s ease, transform .18s ease; pointer-events: none; }
#toast.show { opacity: 1; transform: translateY(0); }
.page:not([hidden]) { animation: page-in .2s ease both; }
@keyframes page-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes settle-in { from { opacity: .55; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
.player-body { min-height: 100vh; display: grid; place-items: center; padding: 25px; background: radial-gradient(circle at 50% 10%, #19282a, var(--bg) 52%); }
.player-shell { width: min(620px, 100%); text-align: center; }
.player-shell h1 { margin-bottom: 12px; }
.player-art { width: 180px; height: 180px; border: 1px solid var(--line); border-radius: 35px; margin: 0 auto 28px; background: linear-gradient(145deg, #1b252e, #0e1217); display: grid; place-items: center; transform: rotate(2deg); box-shadow: 0 25px 80px #0008; }
.player-art span { width: 96px; height: 80px; font-size: 27px; border-radius: 22px; }
audio { width: 100%; margin: 15px 0 25px; accent-color: var(--accent); }
.queue { display: grid; gap: 5px; text-align: left; }
.queue-item { padding: 11px 14px; border-radius: 9px; color: var(--muted); }
.queue-item.active { color: var(--text); background: var(--panel2); border-left: 3px solid var(--accent); }
@media (max-width: 750px) {
  #app { display: block; }
  aside { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  nav { margin-top: 20px; display: flex; }
  .profile { display: none; }
  .content { padding: 24px 16px; }
  .upload-card, .upload-card form, .form-row, .library-toolbar, .library-tools { display: grid; grid-template-columns: 1fr; }
  .library-total, .storage-total { justify-items: start; border-right: 0; border-bottom: 1px solid var(--line); }
  .song-item { grid-template-columns: 34px 1fr 42px; }
  .song-item .preview { grid-column: 1 / -1; grid-row: 2; }
  .song-item .single-link-button { grid-column: 1 / -1; grid-row: 3; }
  .song-menu { grid-column: 3; grid-row: 1; }
  .radio-panel, .library-song { grid-template-columns: 1fr; }
  .radio-controls { flex-wrap: wrap; }
  .queue-editor-item { grid-template-columns: 20px 38px 1fr 32px; }
  .queue-editor-item .sound-volume { grid-column: 3 / -1; }
  .queue-editor-item .audio-edit-button { grid-column: 3; }
  .owner-transfer, .audio-edit-grid, .library-song { grid-template-columns: 1fr; }
  .user-item { grid-template-columns: 1fr auto; }
  .user-item .delete-user-button { grid-column: 1 / -1; }
  .picker-footer { width: 100%; align-items: stretch; flex-direction: column; }
  .dialog-card { padding: 22px 15px; }
  header { align-items: center; }
}
