.project-home-link {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    background: rgba(34, 34, 34, 0.76);
    color: #f1f1f1;
    font-size: 13px;
    line-height: 1;
    text-decoration: none;
    backdrop-filter: blur(8px);
    transition:
        background-color 120ms ease,
        border-color 120ms ease,
        color 120ms ease;
}

.project-home-link::before {
    content: "←";
    margin-right: 7px;
}

.project-home-link:link,
.project-home-link:visited,
.project-home-link:hover,
.project-home-link:active {
    color: #f1f1f1;
}

.project-home-link:hover,
.project-home-link:active {
    border-color: rgba(255, 255, 255, 0.25);
    background: #555;
}

.project-home-link:active {
    background: #3c3c3c;
}


html {
    height: 100%;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    user-select: none;
    margin: 0;
    min-height: 100svh;
    padding: 15px;
    background-color: #333;
    color: #f1f1f1;
    display: grid;
    place-items: center;
    font-family: var(--project-font-family);
    overflow: auto;
}

.radio-page {
    width: min(100%, 1080px);
}

.radio-hero {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(280px, 420px);
    align-items: center;
    gap: clamp(18px, 4vw, 42px);
}

.picture-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
}

.main-picture {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 6px;
    background: #242424;
    object-fit: contain;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.radio-panel {
    display: grid;
    gap: 14px;
    container-type: inline-size;
}

.project-home-link {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1;
    background: rgba(255, 255, 255, 0.05);
}

.radio-title {
    margin: 0;
    font-size: clamp(30px, 3.6vw, 48px);
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.track-title {
    min-height: 26px;
    margin: 0;
    color: #cfcfcf;
    font-size: clamp(12px, 4.5cqw, 18px);
    line-height: 1.25;
    white-space: nowrap;
}

.sound-visualizer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 44px;
    padding: 8px 12px;
    border-block: 1px solid rgba(255, 255, 255, 0.18);
    background: #292929;
    overflow: hidden;
}

.sound-visualizer span {
    display: block;
    width: 5px;
    height: 8px;
    border-radius: 2px;
    background: #f25f4c;
    opacity: 0.55;
    transform-origin: 50% 100%;
    transition:
        height 160ms ease,
        opacity 160ms ease;
}

.sound-visualizer.is-playing span {
    animation: sound-bar 820ms ease-in-out infinite;
    opacity: 0.9;
}

.sound-visualizer span:nth-child(2n) {
    height: 14px;
}

.sound-visualizer span:nth-child(3n) {
    height: 20px;
}

.sound-visualizer.is-playing span:nth-child(2) {
    animation-delay: -120ms;
}

.sound-visualizer.is-playing span:nth-child(3) {
    animation-delay: -260ms;
}

.sound-visualizer.is-playing span:nth-child(4) {
    animation-delay: -80ms;
}

.sound-visualizer.is-playing span:nth-child(5) {
    animation-delay: -360ms;
}

.sound-visualizer.is-playing span:nth-child(6) {
    animation-delay: -190ms;
}

.sound-visualizer.is-playing span:nth-child(7) {
    animation-delay: -430ms;
}

.sound-visualizer.is-playing span:nth-child(8) {
    animation-delay: -40ms;
}

.sound-visualizer.is-playing span:nth-child(9) {
    animation-delay: -300ms;
}

.sound-visualizer.is-playing span:nth-child(10) {
    animation-delay: -150ms;
}

.sound-visualizer.is-playing span:nth-child(11) {
    animation-delay: -510ms;
}

.sound-visualizer.is-playing span:nth-child(12) {
    animation-delay: -230ms;
}

.broadcast-hint {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin: -2px 0 0;
    color: rgba(207, 207, 207, 0.76);
    font-size: clamp(13px, 1.5vw, 15px);
    line-height: 1.25;
    text-align: left;
    transition:
        color 0.6s ease,
        text-shadow 0.6s ease;
    white-space: nowrap;
}

.broadcast-hint::after {
    content: "";
    flex: 1 1 32px;
    max-width: 58px;
    height: 1px;
    background: rgba(242, 95, 76, 0.35);
    transition: background 0.6s ease;
}

.broadcast-hint.is-hint-accented {
    color: #f08a24;
    text-shadow: 0 0 8px rgba(240, 138, 36, 0.7);
}

.broadcast-hint.is-hint-accented::after {
    background: rgba(240, 138, 36, 0.55);
}

.broadcast-hint.is-commercial-active {
    animation: commercial-hint-pulse 1.6s ease-in-out infinite;
    color: #f0a24a;
    text-shadow: 0 0 9px rgba(240, 138, 36, 0.55);
}

.broadcast-hint.is-commercial-active::after {
    animation: commercial-hint-line 1.6s ease-in-out infinite;
    background: rgba(240, 138, 36, 0.68);
}

@keyframes sound-bar {
    0%,
    100% {
        height: 8px;
    }

    35% {
        height: 26px;
    }

    65% {
        height: 14px;
    }
}

@keyframes commercial-hint-pulse {
    0%,
    100% {
        color: rgba(240, 162, 74, 0.84);
        text-shadow: 0 0 7px rgba(240, 138, 36, 0.36);
    }

    50% {
        color: #ffd28a;
        text-shadow:
            0 0 9px rgba(240, 138, 36, 0.78),
            0 0 18px rgba(242, 95, 76, 0.32);
    }
}

@keyframes commercial-hint-line {
    0%,
    100% {
        max-width: 58px;
        opacity: 0.65;
    }

    50% {
        max-width: 86px;
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .broadcast-hint.is-commercial-active,
    .broadcast-hint.is-commercial-active::after {
        animation: none;
    }
}

.buttons-row {
    display: flex;
    width: 100%;
    justify-content: stretch;
    gap: 10px;
}

.app-button {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background-color: #444;
    color: #f0f0f0;
    font: 500 15px/1 var(--project-font-family);
    padding: 10px 22px;
    border-radius: 6px;
    cursor: pointer;
    transition:
        background-color 120ms ease,
        border-color 120ms ease,
        color 120ms ease;
}

.app-button:hover {
    background-color: #555;
    border-color: rgba(255, 255, 255, 0.25);
}

.app-button:active {
    background-color: #3c3c3c;
}

.app-button:focus-visible {
    outline: 2px solid #6aa9ff;
    outline-offset: 2px;
}

.app-button_primary {
    flex: 1 1 auto;
}

.volume-control {
    display: grid;
    grid-template-columns: auto minmax(120px, 1fr) 46px;
    align-items: center;
    gap: 10px;
    color: #d8d8d8;
    font-size: 15px;
}

.volume-control__label,
.volume-control__value {
    line-height: 1;
    white-space: nowrap;
}

.volume-control__value {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.volume-control__slider {
    width: 100%;
    accent-color: #f25f4c;
    cursor: pointer;
}

.volume-control__slider:focus-visible {
    outline: 2px solid #6aa9ff;
    outline-offset: 4px;
}

@media (max-width: 820px) {
    .radio-hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .radio-panel {
        width: 100%;
    }

    .radio-title,
    .track-title {
        text-align: center;
    }

    .radio-title {
        font-size: clamp(28px, 7.2vw, 38px);
    }
}

@media (max-width: 520px) {
    body {
        padding: 10px;
    }

    .buttons-row {
        flex-direction: column;
    }

    .volume-control {
        grid-template-columns: 1fr 46px;
    }

    .volume-control__label {
        grid-column: 1 / -1;
        text-align: center;
    }
}

