/* SynthVerse Synthify — streaming layout (sidebar, top bar, cards, track lists, player bar) */

:root {
    --sy-bg: #07070d;
    --sy-side: #000000;
    --sy-panel: #121220;
    --sy-card: #161628;
    --sy-hover: #1f1f36;
    --sy-line: rgba(255, 255, 255, 0.07);
    --sy-text: #f3f2fb;
    --sy-sub: #a5a3bf;
    --sy-dim: #6d6b88;
    --sy-accent: #00c0a8;
    --sy-accent-hi: #00f0d8;
    --sy-cyan: #e0a526;
    --sy-bar-h: 92px;
    --sy-side-w: 248px;
    --sy-radius: 10px;
}

html.synthify-html, body.synthify-body { background: var(--sy-bg); }

.sy-app {
    position: relative;
    min-height: 100vh;
    color: var(--sy-text);
    background: var(--sy-bg);
    font-size: 14px;
    line-height: 1.45;
}
.sy-app *, .sy-app *::before, .sy-app *::after,
.sy-bar, .sy-bar *, .sy-bar *::before, .sy-bar *::after { box-sizing: border-box; }
.sy-app a { color: inherit; }
.sy-app button, .sy-bar button { font: inherit; }
.sy-app svg, .sy-bar svg { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sy-bar { color: var(--sy-text); font-size: 14px; font-family: inherit; }

/* ---------- Layout grid: sidebar + main ---------- */
.sy-shell { display: grid; grid-template-columns: var(--sy-side-w) minmax(0, 1fr); min-height: 100vh; padding-bottom: calc(var(--sy-bar-h) + 12px); }

.sy-side {
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    background: var(--sy-side);
    padding: 22px 12px 16px;
    display: flex; flex-direction: column; gap: 18px;
}
.sy-logo { display: flex; align-items: center; gap: 10px; padding: 4px 12px 10px; text-decoration: none; }
.sy-logo-mark {
    width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--sy-accent), var(--sy-cyan)); color: #fff; font-weight: 800;
}
.sy-logo-name { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.sy-logo-name span { color: var(--sy-accent-hi); }

.sy-nav { display: flex; flex-direction: column; gap: 2px; }
.sy-nav a {
    display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 8px;
    text-decoration: none; color: var(--sy-sub); font-weight: 600; font-size: 15px;
    transition: color .15s, background .15s;
}
.sy-nav a:hover { color: var(--sy-text); background: var(--sy-panel); }
.sy-nav a.is-active { color: var(--sy-text); background: var(--sy-panel); }
.sy-nav a.is-active svg { color: var(--sy-accent-hi); }

.sy-side-title {
    padding: 0 12px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--sy-dim);
}
.sy-side-note {
    margin: 0 4px; padding: 14px; border-radius: var(--sy-radius);
    background: linear-gradient(160deg, #1d1636, #0d1620); border: 1px solid var(--sy-line);
    color: var(--sy-sub); font-size: 13px;
}
.sy-side-note strong { display: block; color: var(--sy-text); margin-bottom: 4px; font-size: 14px; }
.sy-side-note a { color: var(--sy-accent-hi); font-weight: 700; text-decoration: none; }
.sy-side-foot { margin-top: auto; padding: 0 12px; color: var(--sy-dim); font-size: 12px; }

/* ---------- Top bar ---------- */
.sy-main { min-width: 0; }
.sy-topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 16px;
    padding: 14px 28px; background: rgba(7, 7, 13, 0.82); backdrop-filter: blur(12px);
}
.sy-search {
    flex: 1 1 0; min-width: 0; max-width: 480px; display: flex; align-items: center; gap: 10px;
    height: 44px; padding: 0 16px; border-radius: 999px; background: var(--sy-panel); border: 1px solid var(--sy-line);
}
.sy-search:focus-within { border-color: var(--sy-accent); }
.sy-search svg { width: 18px; height: 18px; color: var(--sy-sub); flex: none; }
.sy-search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--sy-text); font: inherit; }
.sy-search input::placeholder { color: var(--sy-dim); }
.sy-top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sy-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; padding: 0 20px; border-radius: 999px; border: 0; cursor: pointer;
    font-weight: 700; text-decoration: none; background: var(--sy-accent); color: #fff; white-space: nowrap;
}
.sy-btn:hover { background: #009e8a; }
.sy-btn-ghost { background: transparent; color: var(--sy-text); box-shadow: inset 0 0 0 1px var(--sy-line); }
.sy-btn-ghost:hover { background: var(--sy-panel); }
.sy-avatar {
    width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--sy-accent), var(--sy-cyan)); font-weight: 800; color: #fff; text-decoration: none;
}

.sy-content { padding: 4px 28px 32px; }
.sy-section { margin: 0 0 40px; }
.sy-h1 { margin: 8px 0 22px; font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.02em; }
.sy-h2 { margin: 0 0 16px; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.sy-sub { color: var(--sy-sub); }
.sy-empty { padding: 48px 0; text-align: center; color: var(--sy-sub); }

/* ---------- Cards ---------- */
.sy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 20px; }
.sy-card {
    position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0;
    padding: 14px; border-radius: 12px; background: var(--sy-card); text-decoration: none;
    transition: background .2s;
}
.sy-card:hover { background: var(--sy-hover); }
.sy-cover {
    position: relative; width: 100%; aspect-ratio: 1; border-radius: 8px; overflow: hidden; margin-bottom: 10px;
    background: linear-gradient(135deg, #003d36, #006b60); box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.sy-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sy-cover-art { width: 100%; height: 100%; display: grid; place-items: center; font-size: 48px; font-weight: 800; color: rgba(255, 255, 255, .35); }
.sy-card-title { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sy-card-meta { color: var(--sy-sub); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sy-card-link { position: absolute; inset: 0; border-radius: 12px; z-index: 1; }
.sy-card-link:focus-visible { outline: 2px solid var(--sy-accent); }
.sy-fab {
    z-index: 2; position: absolute; right: 22px; bottom: 96px; width: 46px; height: 46px; border-radius: 50%;
    display: grid; place-items: center; border: 0; cursor: pointer;
    background: var(--sy-accent); color: #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, .45);
    opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s;
}
.sy-fab svg { width: 20px; height: 20px; fill: currentColor; stroke: none; margin-left: 2px; }
.sy-cover .sy-fab { right: 10px; bottom: 10px; width: 44px; height: 44px; }
.sy-card:hover .sy-fab, .sy-card:focus-within .sy-fab { opacity: 1; transform: none; }
.sy-fab:hover { background: #009e8a; }

/* ---------- Release hero ---------- */
.sy-hero {
    display: flex; gap: 28px; align-items: flex-end; flex-wrap: wrap;
    padding: 56px 28px 26px; margin: -4px -28px 0;
    background: linear-gradient(180deg, rgba(0, 192, 168, .45), rgba(7, 7, 13, 0) 85%);
}
.sy-hero-cover { width: 232px; max-width: 100%; aspect-ratio: 1; border-radius: 6px; overflow: hidden; box-shadow: 0 18px 50px rgba(0, 0, 0, .55); flex: none; }
.sy-hero-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sy-hero-cover .sy-cover-art { font-size: 64px; }
.sy-hero-info { min-width: 0; }
.sy-kicker { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--sy-text); opacity: .85; }
.sy-hero-title { margin: 6px 0 10px; font-size: clamp(28px, 5vw, 56px); font-weight: 900; letter-spacing: -.03em; line-height: 1.05; overflow-wrap: anywhere; }
.sy-hero-meta { color: var(--sy-sub); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sy-hero-meta b { color: var(--sy-text); }
.sy-actions { display: flex; align-items: center; gap: 14px; padding: 22px 0 6px; }
.sy-play-big {
    width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
    background: var(--sy-cyan); color: #04121a; box-shadow: 0 10px 26px rgba(224, 165, 38, .25);
}
.sy-play-big svg { width: 24px; height: 24px; fill: currentColor; stroke: none; margin-left: 3px; }
.sy-play-big:hover { transform: scale(1.04); }
.sy-desc { color: var(--sy-sub); max-width: 760px; margin: 14px 0 0; line-height: 1.6; }

/* ---------- Track table ---------- */
.sy-tracks { width: 100%; border-collapse: collapse; }
.sy-tracks thead th {
    text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--sy-dim);
    padding: 10px 14px; border-bottom: 1px solid var(--sy-line);
}
.sy-tracks tbody tr { cursor: pointer; }
.sy-tracks tbody tr:hover { background: var(--sy-panel); }
.sy-tracks td { padding: 10px 14px; height: 58px; border-bottom: 1px solid transparent; vertical-align: middle; }
.sy-tracks td.sy-num { width: 56px; color: var(--sy-sub); font-variant-numeric: tabular-nums; }
.sy-tracks td.sy-dur { width: 96px; text-align: right; color: var(--sy-sub); font-variant-numeric: tabular-nums; }
.sy-tracks td.sy-album, .sy-tracks th.sy-album { color: var(--sy-sub); }
.sy-track-title { font-weight: 600; font-size: 15px; }
.sy-track-sub { color: var(--sy-sub); font-size: 13px; }
.sy-tracks tr.is-playing .sy-track-title { color: var(--sy-cyan); }
.sy-tracks tr.is-playing td.sy-num { color: var(--sy-cyan); }
.sy-tracks .sy-tag { margin-left: 8px; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--sy-hover); color: var(--sy-sub); }
.sy-num-play { display: none; width: 14px; height: 14px; fill: currentColor; stroke: none; }
.sy-tracks tr:hover .sy-num-text { display: none; }
.sy-tracks tr:hover .sy-num-play { display: inline-block; }
.sy-tracks tr.is-playing .sy-num-text { display: none; }
.sy-tracks tr.is-playing .sy-num-play { display: inline-block; color: var(--sy-cyan); }
.sy-tracks-wrap { overflow-x: auto; }

/* ---------- Library placeholder cards ---------- */
.sy-soon { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.sy-soon-card { padding: 22px; border-radius: 12px; background: var(--sy-card); border: 1px dashed rgba(0, 240, 216, .35); }
.sy-soon-card h3 { margin: 0 0 6px; font-size: 17px; }
.sy-soon-card p { margin: 0; color: var(--sy-sub); font-size: 14px; }
.sy-pill { display: inline-block; margin-bottom: 10px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: rgba(224, 165, 38, .12); color: var(--sy-cyan); }

/* ---------- Library: tabs, toolbar, row actions, playlist menu, toast ---------- */
.sy-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 24px; }
.sy-tab {
    padding: 8px 16px; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 14px;
    color: var(--sy-sub); background: var(--sy-panel); border: 1px solid var(--sy-line);
}
.sy-tab:hover { color: var(--sy-text); }
.sy-tab.is-active { color: #fff; background: var(--sy-accent); border-color: var(--sy-accent); }
.sy-toolbar { display: flex; gap: 10px; margin-bottom: 18px; }
.sy-tracks td.sy-acts { width: 96px; white-space: nowrap; text-align: right; }
.sy-tracks th.sy-acts-h { width: 96px; }
.sy-act {
    width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer; background: transparent;
    color: var(--sy-sub); display: inline-grid; place-items: center; margin-left: 2px;
}
.sy-act:hover { color: var(--sy-text); background: var(--sy-hover); }
.sy-act svg { width: 18px; height: 18px; }
.sy-act.sy-like.is-on { color: #f472b6; }
.sy-act.sy-like.is-on svg path { fill: currentColor; }
.sy-act:disabled { opacity: .5; cursor: default; }
.sy-pop {
    position: absolute; z-index: 90; width: 240px; max-height: 320px; overflow-y: auto;
    background: #1a1a30; border: 1px solid var(--sy-line); border-radius: 12px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .55); padding: 10px;
}
.sy-pop-title { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sy-dim); padding: 4px 8px 8px; }
.sy-pop-body { display: flex; flex-direction: column; gap: 2px; }
.sy-pop-item {
    text-align: left; padding: 9px 10px; border-radius: 8px; border: 0; cursor: pointer;
    background: transparent; color: var(--sy-text); font-weight: 600; font-size: 14px;
}
.sy-pop-item:hover { background: var(--sy-hover); }
.sy-pop-new { color: var(--sy-accent-hi); }
.sy-toast {
    position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%); z-index: 120;
    padding: 11px 18px; border-radius: 999px; background: #f3f2fb; color: #0b0b14;
    font-weight: 700; font-size: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
    transition: opacity .3s; max-width: calc(100vw - 32px); text-align: center;
}
.sy-toast.is-out { opacity: 0; }
.sy-artist-avatar, .sy-artist-avatar .sy-cover-art { border-radius: 50%; }
.sy-artist-avatar { aspect-ratio: 1; }
@media (max-width: 900px) { .sy-toast { bottom: 150px; } }

/* ---------- Bottom player bar ---------- */
.sy-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: var(--sy-bar-h);
    display: grid; grid-template-columns: minmax(180px, 1fr) minmax(320px, 2fr) minmax(180px, 1fr);
    align-items: center; gap: 18px; padding: 12px 22px;
    background: rgba(12, 12, 22, 0.96); border-top: 1px solid var(--sy-line); backdrop-filter: blur(14px);
}
.sy-bar-now { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sy-bar-art { width: 56px; height: 56px; border-radius: 6px; overflow: hidden; flex: none; background: linear-gradient(135deg, #003d36, #006b60); }
.sy-bar-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sy-bar-text { min-width: 0; }
.sy-bar-title { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sy-bar-artist { color: var(--sy-sub); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sy-bar-center { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sy-bar-controls { display: flex; align-items: center; justify-content: center; gap: 18px; }
.sy-ctl {
    width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; cursor: pointer;
    display: grid; place-items: center; color: var(--sy-sub);
}
.sy-ctl:hover { color: var(--sy-text); }
.sy-ctl svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.sy-ctl-main { width: 40px; height: 40px; background: var(--sy-text); color: #000; }
.sy-ctl-main:hover { color: #000; transform: scale(1.04); }
.sy-ctl-main svg { width: 18px; height: 18px; }
.sy-progress { display: flex; align-items: center; gap: 10px; color: var(--sy-dim); font-size: 12px; font-variant-numeric: tabular-nums; }
.sy-progress input[type=range] { flex: 1; min-width: 0; accent-color: var(--sy-accent); }
.sy-bar-right { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.sy-bar-badge { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--sy-hover); color: var(--sy-sub); white-space: nowrap; }
.sy-bar-right input[type=range] { width: 110px; accent-color: var(--sy-accent); }
.sy-bar-idle .sy-bar-title { color: var(--sy-sub); font-weight: 600; }

/* ---------- Mobile: bottom tab bar instead of sidebar ---------- */
@media (max-width: 900px) {
    .sy-shell { grid-template-columns: minmax(0, 1fr); padding-bottom: 170px; }
    .sy-side {
        position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: 64px; z-index: 60;
        flex-direction: row; padding: 0; gap: 0; background: #000; border-top: 1px solid var(--sy-line); overflow: visible;
    }
    .sy-logo, .sy-side-title, .sy-side-note, .sy-side-foot, .sy-side nav[aria-label="Discover"] { display: none; }
    .sy-nav a span { white-space: nowrap; }
    .sy-nav { flex-direction: row; width: 100%; justify-content: space-around; gap: 0; }
    .sy-nav a { flex-direction: column; gap: 3px; padding: 8px 6px; font-size: 11px; background: transparent !important; }
    .sy-nav a svg { width: 20px; height: 20px; }
    /* Phone player bar: title and controls on the first row, progress across the second.
       Height follows the content so nothing hides behind the bottom tab bar. */
    .sy-bar { bottom: 64px; height: auto; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 8px 12px; }
    .sy-bar-center { display: contents; }
    .sy-bar-now { grid-column: 1; grid-row: 1; min-width: 0; }
    .sy-bar-controls { grid-column: 2; grid-row: 1; justify-content: flex-end; gap: 6px; }
    .sy-bar-controls .sy-ctl { width: 34px; height: 34px; }
    .sy-bar-controls .sy-ctl-main { width: 40px; height: 40px; }
    .sy-progress { grid-column: 1 / -1; grid-row: 2; font-size: 11px; gap: 8px; }
    .sy-bar-right { display: none; }
    .sy-bar-art { width: 44px; height: 44px; }
    .sy-hero { padding: 40px 18px 18px; margin: 0 -18px; }
    .sy-topbar { padding: 12px 16px; }
    .sy-content { padding: 4px 16px 24px; }
    .sy-hero-cover { width: 180px; }
    .sy-fab { opacity: 1; transform: none; bottom: 76px; }
    .sy-tracks .sy-album { display: none; }
}
@media (max-width: 520px) {
    .sy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .sy-card { padding: 10px; }
    .sy-search { height: 40px; }
    .sy-btn-label { display: none; }
    .sy-tracks td.sy-dur, .sy-tracks th.sy-dur { display: none; }
}
