:root {
    --bg: #09090b;
    --panel: #101014;
    --panel-2: #1a1a20;
    --elevated: #26262e;
    --text: #fff;
    --muted: #b3b3b3;
    --accent: #fff;
    --accent-2: #b49bff;
    --line: rgba(255,255,255,.08);
    --player-h: 90px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.sc-body {
    background: var(--bg);
    color: var(--text);
    font-family: Vazirmatn, Tahoma, sans-serif;
    -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
svg { display: block; }

.sc-app {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 0;
    height: 100vh;
    min-height: 100vh;
    background: var(--bg);
}

.sc-sidebar {
    background: var(--panel);
    border-left: 1px solid var(--line);
    padding: 18px 14px calc(var(--player-h) + 18px);
    display: flex;
    flex-direction: column;
    gap: 18px;
    height: 100vh;
    min-height: 0;
}
.sc-side-logo {
    display: flex;
    justify-content: center;
    padding: 4px 8px 8px;
}
.sc-side-logo img {
    width: auto;
    height: 52px;
    max-width: 100%;
    object-fit: contain;
}

.sc-side-block h2 {
    margin: 0 8px 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    color: #8e8e98;
}
.sc-side-grow { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sc-side-grow .sc-side-list { flex: 1; overflow: auto; }

.sc-filter, .sc-artist {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    color: #d7d7de;
    text-align: right;
    font-weight: 600;
    font-size: 14px;
}
.sc-filter { justify-content: space-between; }
.sc-filter small, .sc-artist small { color: #8d8d98; font-weight: 500; font-size: 12px; }
.sc-filter:hover, .sc-artist:hover { background: rgba(255,255,255,.06); color: #fff; }
.sc-filter.active, .sc-artist.active { background: rgba(255,255,255,.08); color: #fff; }
.sc-filter.active small, .sc-artist.active small { color: #b7b7c0; }

.sc-artist-mark, .sc-artist img {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 4px;
    object-fit: cover;
}
.sc-artist-mark {
    display: grid;
    place-items: center;
    background: #2a2a32;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}
.sc-artist.active .sc-artist-mark { background: #3a3a44; color: #fff; }
.sc-artist-copy { min-width: 0; display: grid; gap: 2px; }
.sc-artist-copy b {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sc-main {
    background: #141418;
    border-radius: 0;
    overflow: hidden;
    min-width: 0;
    min-height: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: var(--player-h);
}

.sc-top {
    display: flex;
    align-items: center;
    direction: ltr;
    justify-content: flex-start;
    gap: 16px;
    padding: 14px 20px;
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgba(18,18,18,.92);
    backdrop-filter: blur(16px);
}

.sc-search {
    flex: 1;
    direction: rtl;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 560px;
    background: #1c1c22;
    color: #fff;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 999px;
    padding: 0 16px;
    height: 44px;
    transition: border-color .15s, background .15s;
}
.sc-search:focus-within {
    background: #24242c;
    border-color: rgba(255,255,255,.28);
}
.sc-search-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    fill: none;
    stroke: #b7b7c2;
    stroke-width: 2;
    stroke-linecap: round;
}
.sc-search input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    font-size: 14px;
}
.sc-search input::placeholder { color: #8d8d98; }

.sc-toast {
    position: fixed;
    left: 50%;
    bottom: calc(var(--player-h) + 18px);
    z-index: 80;
    width: min(440px, calc(100% - 32px));
    transform: translateX(-50%);
    padding: 14px 16px;
    border-radius: 14px;
    background: #fff;
    color: #111;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.7;
    text-align: center;
    box-shadow: 0 16px 40px rgba(0,0,0,.35);
}
.sc-toast[hidden] { display: none; }

.sc-mood {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    padding: 8px 14px;
    color: #eee;
    font-size: 13px;
    font-weight: 600;
}

.sc-scroll {
    overflow: auto;
    flex: 1;
    min-height: 0;
    padding-bottom: 24px;
}

.sc-slider {
    position: relative;
    height: 460px;
    margin: 18px 28px 4px;
    border-radius: 28px;
    overflow: hidden;
    background: #1a1428;
    box-shadow: 0 28px 70px rgba(0,0,0,.42);
}
.sc-slider > .sc-slide.sc-hero {
    position: absolute;
    inset: 0;
    display: flex;
    min-height: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(1.045);
    transition: opacity .7s ease, transform .9s cubic-bezier(.22,.8,.24,1), visibility .7s;
}
.sc-slider > .sc-slide.sc-hero.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    z-index: 1;
}
.sc-slide-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.22);
    background: rgba(12,12,16,.42);
    color: #fff;
    backdrop-filter: blur(10px);
    display: grid;
    place-items: center;
    transition: transform .2s ease, background .2s ease;
}
.sc-slide-arrow:hover { transform: scale(1.08); background: rgba(255,255,255,.16); }
.sc-slide-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.sc-slide-arrow.prev { right: 18px; }
.sc-slide-arrow.next { left: 18px; }
.sc-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18px;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 8px;
}
.sc-dot {
    width: 28px;
    height: 4px;
    padding: 0;
    border-radius: 99px;
    background: rgba(255,255,255,.28);
    overflow: hidden;
}
.sc-dot.is-active { background: rgba(255,255,255,.28); }
.sc-dot.is-active::after {
    content: "";
    display: block;
    height: 100%;
    width: 0;
    background: #fff;
    animation: scDot var(--slide-ms, 6.5s) linear forwards;
}
@keyframes scDot { to { width: 100%; } }

.sc-hero {
    position: relative;
    min-height: 320px;
    padding: 36px 28px 28px;
    display: flex;
    align-items: flex-end;
    gap: 28px;
    background:
        linear-gradient(180deg, transparent 10%, #121212 100%),
        radial-gradient(circle at 20% 20%, rgba(139,108,255,.35), transparent 45%),
        #2a2144;
    overflow: hidden;
}
.sc-hero::before {
    content: "";
    position: absolute;
    inset: -8%;
    background-image: var(--hero-cover);
    background-size: cover;
    background-position: center;
    filter: blur(36px) saturate(1.35);
    opacity: .5;
    transform: scale(1.08);
}
.sc-slide.is-active::before { animation: scKen 8.5s ease-out forwards; }
@keyframes scKen { to { transform: scale(1.2); } }
.sc-slide.is-active .sc-hero-cover { animation: scCover .8s cubic-bezier(.22,.8,.24,1) both; }
.sc-slide.is-active .sc-hero-copy > * { animation: scRise .7s ease both; }
.sc-slide.is-active .sc-hero-copy > :nth-child(2) { animation-delay: .08s; }
.sc-slide.is-active .sc-hero-copy > :nth-child(3) { animation-delay: .14s; }
.sc-slide.is-active .sc-hero-copy > :nth-child(4) { animation-delay: .2s; }
@keyframes scCover {
    from { opacity: 0; transform: translateY(16px) scale(.94); }
    to { opacity: 1; transform: none; }
}
@keyframes scRise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}
.sc-hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(18,18,18,.95));
}
.sc-hero-cover {
    position: relative;
    z-index: 1;
    width: 220px;
    height: 220px;
    border-radius: 0;
    aspect-ratio: 1;
    object-fit: cover;
    box-shadow: 0 24px 60px rgba(0,0,0,.55);
    flex-shrink: 0;
}
.sc-hero-copy { position: relative; z-index: 1; min-width: 0; padding-bottom: 8px; }
.sc-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
}
.sc-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 0 rgba(255,255,255,.7);
    animation: scPulse 1.8s ease-out infinite;
}
@keyframes scPulse {
    70% { box-shadow: 0 0 0 7px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
.sc-hero-copy h1 {
    position: relative;
    margin: 0 0 10px;
    max-width: min(100%, 420px);
    font-size: clamp(22px, 2.2vw, 32px);
    line-height: 1.35;
    letter-spacing: 0;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sc-hero-copy h1.is-truncated:hover::after {
    content: attr(data-full);
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    z-index: 3;
    max-width: min(420px, 70vw);
    padding: 8px 12px;
    border-radius: 8px;
    background: #2c2c34;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    white-space: normal;
    overflow: visible;
    box-shadow: 0 12px 28px rgba(0,0,0,.45);
}
.sc-hero-copy p {
    margin: 0 0 22px;
    color: #eaeaea;
    font-size: 15px;
}
.sc-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.sc-play-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #000;
    font-weight: 800;
    font-size: 15px;
    padding: 14px 28px;
    border-radius: 999px;
}
.sc-play-main svg { width: 16px; height: 16px; fill: currentColor; }
.sc-play-main:hover { transform: scale(1.04); }
.sc-block { padding: 8px 28px 10px; }
.sc-block-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 18px 0 14px;
}
.sc-block-head h2 { margin: 0; font-size: 22px; font-weight: 800; }
.sc-block-head p { margin: 0; color: var(--muted); font-size: 13px; }

.sc-list-head {
    display: grid;
    grid-template-columns: 48px minmax(180px, 2fr) minmax(120px, 1fr) minmax(100px, .8fr) 72px 48px;
    gap: 12px;
    padding: 0 12px 8px;
    color: var(--muted);
    font-size: 12px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 6px;
}

.sc-list { display: grid; }
.sc-row {
    display: grid;
    grid-template-columns: 48px minmax(180px, 2fr) minmax(120px, 1fr) minmax(100px, .8fr) 72px 48px;
    gap: 12px;
    align-items: center;
    width: 100%;
    text-align: right;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--muted);
    transition: .15s;
}
.sc-row:hover, .sc-row.is-playing {
    background: rgba(255,255,255,.08);
    color: #fff;
}
.sc-row-num { direction: ltr; text-align: center; font-variant-numeric: tabular-nums; }
.sc-row:hover .sc-row-num, .sc-row.is-playing .sc-row-num { color: var(--accent); }
.sc-row-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.sc-row-title img {
    width: 42px;
    height: 42px;
    aspect-ratio: 1;
    border-radius: 0;
    object-fit: cover;
    flex-shrink: 0;
}
.sc-row-title span { min-width: 0; display: grid; gap: 3px; text-align: right; }
.sc-row-title b {
    color: #fff;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sc-row-title small {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sc-row-artist, .sc-row-genre {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sc-row-play {
    opacity: 0;
    display: grid;
    place-items: center;
    color: #fff;
}
.sc-report {
    justify-self: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.16);
    color: #d0d0d6;
    font-size: 12px;
    font-weight: 700;
}
.sc-report:hover { color: #fff; border-color: rgba(255,255,255,.4); }
.sc-row-play svg { width: 16px; height: 16px; fill: currentColor; }
.sc-dialog {
    width: min(440px, calc(100% - 32px));
    border: 0;
    border-radius: 16px;
    padding: 22px;
    background: #16161c;
    color: #fff;
}
.sc-dialog::backdrop { background: rgba(0,0,0,.62); }
.sc-dialog h2 { margin: 0 0 6px; font-size: 18px; }
.sc-dialog p { margin: 0 0 14px; color: #b7b7c0; }
.sc-reasons { display: grid; gap: 8px; margin-bottom: 14px; }
.sc-reasons label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.sc-dialog textarea {
    width: 100%;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    background: #101014;
    color: #fff;
    padding: 10px 12px;
    resize: vertical;
}
.sc-report-error { color: #ff8d9a !important; font-size: 13px; }
.sc-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.sc-dialog-actions button {
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 700;
}
.sc-dialog-actions button[type="submit"] { background: #fff; color: #111; }
.sc-dialog-actions button[type="button"] { color: #ddd; }
.sc-row:hover .sc-row-play, .sc-row.is-playing .sc-row-play { opacity: 1; color: var(--accent); }

.sc-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}
.sc-empty h3 { color: #fff; margin: 0 0 8px; }

/* Spotify-like bottom player — forced LTR */
.sc-player {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    height: var(--player-h);
    background: #181818;
    border-top: 1px solid #282828;
    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr;
    align-items: center;
    gap: 16px;
    padding: 0 16px;
    direction: ltr;
    unicode-bidi: isolate;
}
.sc-player[hidden] { display: none !important; }

.sc-player-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.sc-player-left img {
    width: 56px;
    height: 56px;
    aspect-ratio: 1;
    border-radius: 0;
    object-fit: cover;
    background: #333;
}
.sc-player-meta { min-width: 0; }
.sc-player-meta b {
    display: block;
    font-size: 13px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sc-player-meta span {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sc-player-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.sc-player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
}
.sc-player-controls button {
    color: #b3b3b3;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
}
.sc-player-controls button svg { width: 18px; height: 18px; fill: currentColor; }
.sc-player-controls button:hover { color: #fff; }
.sc-player-play {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50%;
    background: #fff !important;
    color: #000 !important;
}
.sc-player-play svg { width: 16px; height: 16px; }
.sc-player-play:hover { transform: scale(1.06); }

.sc-player-seek {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    gap: 8px;
    align-items: center;
    width: min(560px, 100%);
}
.sc-player-seek span {
    font-size: 11px;
    color: #a7a7a7;
    font-variant-numeric: tabular-nums;
    text-align: center;
}
.sc-player-seek input,
.sc-player-right input {
    width: 100%;
    accent-color: #fff;
    height: 4px;
}
.sc-player-seek input:hover,
.sc-player-right input:hover { accent-color: var(--accent); }

.sc-player-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}
.sc-player-right input { width: 110px; }
.sc-vol { width: 18px; height: 18px; fill: #b3b3b3; flex-shrink: 0; }

.sc-tabbar, .sc-sheet { display: none; }

@media (max-width: 980px) {
    .sc-app { grid-template-columns: 1fr; height: auto; min-height: 100vh; }
    .sc-sidebar { display: none; }
    .sc-tabbar {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 60;
        height: calc(68px + env(safe-area-inset-bottom));
        padding: 6px 4px env(safe-area-inset-bottom);
        background: #101014;
        border-top: 1px solid var(--line);
    }
    .sc-tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        color: #9a9aa6;
        font-size: 11px;
        font-weight: 700;
    }
    .sc-tab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .sc-tab.is-on { color: #fff; }
    .sc-main { height: auto; min-height: 100vh; border-radius: 0; padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
    body:has(#listenPlayer:not([hidden])) .sc-main { padding-bottom: calc(188px + env(safe-area-inset-bottom)); }
    body:has(#listenPlayer:not([hidden])) .sc-toast { bottom: calc(188px + env(safe-area-inset-bottom)); }
    .sc-sheet { display: block; position: fixed; inset: 0; z-index: 80; }
    .sc-sheet[hidden] { display: none; }
    .sc-sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
    .sc-sheet-panel {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        max-height: min(72vh, 560px);
        overflow: auto;
        background: #16161c;
        border-radius: 22px 22px 0 0;
        padding: 10px 16px calc(22px + env(safe-area-inset-bottom));
        animation: scSheet .28s ease;
    }
    .sc-sheet-handle { width: 42px; height: 4px; border-radius: 99px; background: rgba(255,255,255,.28); margin: 4px auto 12px; }
    .sc-sheet-panel h2 { margin: 0 0 12px; font-size: 18px; }
    .sc-sheet-item {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 14px 12px;
        border-radius: 12px;
        color: #eee;
        font-weight: 700;
        text-align: right;
    }
    .sc-sheet-item small { color: #9a9aa6; font-weight: 500; }
    .sc-sheet-item.active { background: rgba(255,255,255,.1); color: #fff; }
    @keyframes scSheet { from { transform: translateY(100%); } to { transform: none; } }
    .sc-list-head, .sc-row-genre { display: none; }
    .sc-row { grid-template-columns: 36px 1fr auto 40px; }
    .sc-row-artist { display: none; }
    .sc-slider { height: 540px; margin: 12px; border-radius: 20px; }
    .sc-slide-arrow { width: 36px; height: 36px; margin-top: -18px; }
    .sc-hero { flex-direction: column; align-items: flex-start; min-height: 0; padding: 24px 18px 48px; }
    .sc-hero-cover { width: 160px; height: 160px; }
    .sc-hero-copy h1 { font-size: 24px; }
    .sc-block { padding-left: 16px; padding-right: 16px; }
    .sc-player {
        grid-template-columns: 1fr auto;
        grid-template-areas: "left controls" "seek seek";
        bottom: calc(68px + env(safe-area-inset-bottom));
        z-index: 55;
        height: 104px;
        padding: 10px 12px 12px;
        gap: 8px;
    }
    .sc-toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
    .sc-player-left { grid-area: left; }
    .sc-player-center { grid-area: controls; width: auto; }
    .sc-player-seek { grid-area: seek; width: 100%; }
    .sc-player-right { display: none; }
    .sc-player-controls { gap: 10px; }
}
@media (max-width: 560px) {
    .sc-top { padding: 12px; gap: 10px; }
    .sc-search { max-width: none; }
}
