:root {
    --bg: #080b17;
    --bg-soft: rgba(17, 24, 44, 0.8);
    --panel: rgba(12, 18, 34, 0.72);
    --line: rgba(255, 255, 255, 0.08);
    --text: #f4f7ff;
    --muted: #9fb0d2;
    --accent: #b75cff;
    --accent-2: #ff68d8;
    --accent-3: #46d6ff;
    --success: #89ffcf;
    --danger: #ff9099;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(183, 92, 255, 0.18), transparent 24%),
        radial-gradient(circle at top right, rgba(70, 214, 255, 0.16), transparent 28%),
        linear-gradient(145deg, #090d18 0%, #0a1123 36%, #070912 100%);
}

body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
a {
    font: inherit;
}

button {
    cursor: pointer;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.page-shell {
    position: relative;
    padding: 28px;
    max-width: 1480px;
    margin: 0 auto;
}

.ambient {
    position: fixed;
    inset: auto;
    border-radius: 999px;
    filter: blur(80px);
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.ambient-a {
    width: 340px;
    height: 340px;
    top: 60px;
    right: -40px;
    background: rgba(186, 84, 255, 0.28);
    animation: floatBlob 9s ease-in-out infinite;
}

.ambient-b {
    width: 300px;
    height: 300px;
    bottom: 80px;
    left: -20px;
    background: rgba(63, 210, 255, 0.22);
    animation: floatBlob 12s ease-in-out infinite reverse;
}

.ambient-c {
    width: 220px;
    height: 220px;
    top: 40%;
    left: 36%;
    background: rgba(255, 104, 216, 0.16);
    animation: floatBlob 14s ease-in-out infinite;
}

@keyframes floatBlob {
    0%,
    100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(26px, -22px, 0) scale(1.08); }
}

.glass {
    background: linear-gradient(180deg, rgba(18, 24, 44, 0.82), rgba(8, 12, 24, 0.88));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.panel {
    position: relative;
    z-index: 1;
    border-radius: var(--radius-xl);
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    padding: 18px 22px;
    margin-bottom: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.brand-copy {
    min-width: 0;
}

.brand-mark {
    width: 76px;
    height: 76px;
    min-width: 76px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    padding: 10px;
    background: linear-gradient(180deg, rgba(32, 42, 76, 0.95), rgba(14, 20, 36, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 10px 24px rgba(0, 0, 0, 0.24);
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(70, 214, 255, 0.12));
}

.eyebrow {
    margin: 0 0 6px;
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #b6c2eb;
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1 {
    font-size: clamp(1.4rem, 2vw, 2.1rem);
    line-height: 1.05;
    overflow-wrap: anywhere;
}

h2 {
    font-size: clamp(2.6rem, 5vw, 4.8rem);
    line-height: 0.96;
    letter-spacing: -0.04em;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-wrap: pretty;
}

h3 {
    font-size: 1.45rem;
    line-height: 1.15;
}

.album-meta {
    max-width: 420px;
    min-width: 240px;
    text-align: right;
}

.album-meta strong {
    display: block;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.layout {
    display: grid;
    gap: 24px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
    gap: 28px;
    padding: 28px;
    min-height: 520px;
}

.hero-copy,
.visual-panel {
    min-width: 0;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 38px;
}

.hero-headline {
    display: grid;
    gap: 10px;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    justify-items: center;
}

#nowPlayingTitle {
    width: 100%;
    max-width: 720px;
    max-inline-size: 720px;
    margin: 0 auto;
    text-align: center;
}

.hero-cover-wrap {
    position: relative;
    width: min(100%, 400px);
    margin: 6px auto 0;
}

.album-cover {
    width: min(100%, 420px);
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 1;
}

.hero-cover-glow {
    position: absolute;
    inset: 10% 12%;
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(255, 104, 216, 0.34), rgba(70, 214, 255, 0.26));
    filter: blur(36px);
    z-index: 0;
}

.visual-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 18px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.visual-head,
.section-head,
.track-stats,
.player-main,
.progress-wrap,
.player-secondary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.visual-head {
    align-items: flex-start;
}

.visual-head > div:first-child {
    min-width: 0;
}

.status-pill,
.track-count,
.track-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.82rem;
    color: #dce4ff;
}

#visualizer {
    width: 100%;
    min-height: 320px;
    height: 100%;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(8, 10, 20, 0.66), rgba(15, 19, 39, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.track-stats {
    flex-wrap: wrap;
    padding-top: 4px;
    justify-content: flex-start;
}

.track-stats > div {
    min-width: 140px;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
}

.track-stat-main {
    flex: 1 1 280px;
}

.stat-label {
    display: block;
    font-size: 0.72rem;
    color: #94a4ca;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.stat-value {
    display: block;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-area,
.playlist {
    padding: 22px;
}

.player-area {
    display: grid;
    grid-template-columns: auto minmax(0, 1.2fr) minmax(320px, auto);
    gap: 24px;
    align-items: center;
}

.play-btn,
.icon-btn,
.action-btn,
.track-action,
.track-download,
.track-play {
    border: 0;
    transition: 0.24s ease;
}

.play-btn {
    width: 84px;
    height: 84px;
    border-radius: 999px;
    font-size: 1.8rem;
    color: #fff;
    background: linear-gradient(135deg, var(--accent-2), var(--accent), var(--accent-3));
    box-shadow: 0 18px 34px rgba(182, 85, 255, 0.34);
}

.play-btn:hover,
.action-btn:hover,
.track-play:hover,
.track-download:hover,
.track-action:hover,
.icon-btn:hover {
    transform: translateY(-2px);
}

.icon-btn {
    width: 50px;
    height: 50px;
    border-radius: 18px;
    color: #dbe3ff;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.icon-btn.big {
    width: 58px;
    height: 58px;
    font-size: 1.2rem;
}

.progress-wrap {
    width: 100%;
    min-width: 0;
}

.timecode {
    min-width: 56px;
    padding: 8px 0;
    font-variant-numeric: tabular-nums;
    color: #cad6f5;
    font-size: 0.95rem;
}

.range {
    --range-progress: 0%;
    width: 100%;
    height: 14px;
    margin: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(90deg, rgba(255, 104, 216, 0.95), rgba(183, 92, 255, 0.92), rgba(70, 214, 255, 0.95)) 0 / var(--range-progress) 100% no-repeat,
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.06),
        inset 0 0 18px rgba(18, 24, 44, 0.9),
        0 0 0 1px rgba(0, 0, 0, 0.12);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.range::-webkit-slider-runnable-track {
    height: 14px;
    border-radius: 999px;
    background: transparent;
}

.range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    margin-top: -4px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.82);
    background: linear-gradient(135deg, #ffffff, rgba(220, 228, 255, 0.92));
    box-shadow:
        0 0 0 6px rgba(183, 92, 255, 0.14),
        0 6px 16px rgba(0, 0, 0, 0.32);
}

.range::-moz-range-track {
    height: 14px;
    border: 0;
    border-radius: 999px;
    background: transparent;
}

.range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.82);
    background: linear-gradient(135deg, #ffffff, rgba(220, 228, 255, 0.92));
    box-shadow:
        0 0 0 6px rgba(183, 92, 255, 0.14),
        0 6px 16px rgba(0, 0, 0, 0.32);
}

.range-progress {
    flex: 1;
    min-width: 260px;
}

.volume-block {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #d6def8;
    flex: 1;
}

.volume-block .range {
    max-width: 180px;
}

.player-secondary {
    min-width: 0;
    justify-content: flex-end;
}

.action-btn,
.track-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 16px;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, rgba(255, 104, 216, 0.18), rgba(70, 214, 255, 0.18));
    border: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
}

.tracks-list {
    margin-top: 18px;
    display: grid;
    gap: 14px;
}

.track-card {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.track-card.is-active {
    border-color: rgba(183, 92, 255, 0.55);
    box-shadow: inset 0 0 0 1px rgba(70, 214, 255, 0.2);
}

.track-thumb {
    width: 82px;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.track-meta {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.track-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.22;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.track-artist {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.track-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.track-play {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.track-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
    color: #dbe3ff;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.track-action.is-active.like {
    background: rgba(137, 255, 207, 0.14);
    border-color: rgba(137, 255, 207, 0.35);
    color: var(--success);
}

.track-action.is-active.dislike {
    background: rgba(255, 144, 153, 0.12);
    border-color: rgba(255, 144, 153, 0.35);
    color: var(--danger);
}

.track-action .count {
    min-width: 2ch;
    text-align: right;
}

.empty-state {
    padding: 22px;
    border-radius: 18px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.12);
}

@media (max-width: 1240px) {
    .hero {
        grid-template-columns: 1fr;
    }

    #nowPlayingTitle {
        max-width: none;
    }

    .player-area {
        grid-template-columns: 1fr;
    }

    .player-main,
    .progress-wrap,
    .player-secondary {
        width: 100%;
    }

    .player-secondary {
        justify-content: space-between;
    }
}

@media (max-width: 760px) {
    .page-shell {
        padding: 16px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .album-meta {
        text-align: left;
        min-width: 0;
        max-width: none;
    }

    .track-card {
        grid-template-columns: 1fr;
    }

    .track-thumb {
        width: 100%;
        max-width: 150px;
    }

    .track-controls,
    .player-secondary,
    .progress-wrap,
    .volume-block,
    .player-main,
    .visual-head {
        flex-direction: column;
        align-items: stretch;
    }

    .range-progress,
    .volume-block .range {
        min-width: 0;
        max-width: none;
    }

    .timecode {
        min-width: 0;
        text-align: center;
    }

    .action-btn,
    .track-download,
    .track-action,
    .track-play,
    .icon-btn {
        width: 100%;
        justify-content: center;
    }

    .play-btn {
        width: 72px;
        height: 72px;
        align-self: center;
    }

    .hero,
    .player-area,
    .playlist {
        padding: 18px;
    }
}




/* RESPIRATORIUM HERO TITLE SCOPED START */

/* Центрируем только левый hero-блок, не плейлист */
.hero-copy {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 22px !important;
}

.hero-copy > :first-child {
    align-self: flex-start !important;
    width: 100% !important;
}

.hero-headline {
    display: grid !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 700px !important;
    margin: 0 auto !important;
    text-align: center !important;
    justify-items: center !important;
}

/* Только заголовок текущего трека в hero-блоке */
#nowPlayingTitle {
    display: block !important;
    width: 100% !important;
    max-width: 700px !important;
    margin: 0 auto !important;
    text-align: center !important;
    font-size: clamp(34px, 3.6vw, 58px) !important;
    line-height: 0.96 !important;
    letter-spacing: -0.03em !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    text-wrap: balance !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
}

/* Центрируем обложку */
.hero-cover-wrap {
    position: relative !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 auto !important;
    align-self: center !important;
}

.hero-cover-wrap img,
.album-cover {
    display: block !important;
    width: min(100%, 420px) !important;
    max-width: 420px !important;
    margin: 0 auto !important;
}

/* На узких экранах немного уменьшаем */
@media (max-width: 1100px) {
    #nowPlayingTitle {
        font-size: clamp(34px, 5.4vw, 56px) !important;
        max-width: 100% !important;
    }

    .hero-cover-wrap img,
    .album-cover {
        width: min(100%, 360px) !important;
        max-width: 360px !important;
    }
}

/* RESPIRATORIUM HERO TITLE SCOPED END */
