
/* Dushanbe Online — собственный радиоплеер */

:root {
    color-scheme: dark;
    --bg: #0b1220;
    --card: #101827;
    --panel: #1a263a;
    --accent: #8665f5;
    --text: #f3f5fb;
    --muted: #a6b6d0;
    --border: #29364b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(
        ellipse at top,
        #192440 0%,
        var(--bg) 65%
    );
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

.site-container {
    width: min(100% - 32px, 850px);
    margin: 0 auto;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 32px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--accent);
    color: white;
    font-size: 30px;
}

.brand h1 {
    margin: 0 0 5px;
    font-size: 25px;
}

.brand p,
.station-details p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.header-label {
    color: var(--muted);
    font-size: 13px;
}

.player-card {
    padding: 28px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}

.now-playing {
    display: flex;
    align-items: center;
    gap: 20px;
}

#station-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 18px;
    background: var(--panel);
}

.station-details {
    min-width: 0;
}

.live-indicator {
    display: inline-block;
    margin-bottom: 10px;
    color: #57db9d;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
}

#station-title {
    margin: 0 0 10px;
    font-size: 25px;
    overflow-wrap: anywhere;
}

.player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    padding: 30px 0 22px;
}

.player-controls button {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    font-size: 25px;
    cursor: pointer;
    transition: transform .2s, background .2s;
}

.player-controls button:hover {
    background: var(--panel);
    transform: scale(1.07);
}

.player-controls .play-button {
    width: 72px;
    height: 72px;
    background: var(--accent);
    color: white;
    font-size: 30px;
}

.player-controls .play-button:hover {
    background: #9a7cff;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 14px;
}

#volume-slider {
    flex: 1;
    min-width: 0;
    accent-color: var(--accent);
    cursor: pointer;
}

#volume-value {
    width: 44px;
    color: var(--muted);
    font-size: 13px;
    text-align: right;
}

#player-status {
    min-height: 20px;
    margin: 20px 0 26px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 22px 0 14px;
    border-top: 1px solid var(--border);
}

.playlist-header h3 {
    margin: 0;
    font-size: 18px;
}

#station-count {
    color: var(--muted);
    font-size: 13px;
}

.station-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.station-item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 13px;
    background: transparent;
    color: var(--text);
    text-align: left;
    font: inherit;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}

.station-item:hover {
    background: var(--panel);
}

.station-item.active {
    background: #243451;
    border-color: #465579;
}

.station-item img {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 10px;
    background: var(--panel);
}

.station-name {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 500;
}

.station-icon {
    color: var(--muted);
    font-size: 18px;
}

.station-item.active .station-icon {
    color: #aa91ff;
}

.site-footer {
    padding: 30px 0;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

/* Адаптация для телефонов */

@media (max-width: 600px) {
    .site-container {
        width: min(100% - 20px, 850px);
    }

    .site-header {
        padding: 22px 0;
    }

    .brand h1 {
        font-size: 20px;
    }

    .header-label {
        display: none;
    }

    .player-card {
        padding: 18px;
        border-radius: 18px;
    }

    #station-logo {
        width: 76px;
        height: 76px;
    }

    #station-title {
        font-size: 19px;
    }

    .now-playing {
        gap: 13px;
    }

    .player-controls {
        gap: 22px;
    }
}


/* Анимированный индикатор воспроизведения */

.sound-bars {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 24px;
    height: 24px;
}

.sound-bars span {
    display: block;
    width: 3px;
    height: 6px;
    border-radius: 3px;
    background: #aa91ff;
    animation: radio-wave 0.8s ease-in-out infinite alternate;
}

.sound-bars span:nth-child(2) {
    animation-delay: 0.2s;
}

.sound-bars span:nth-child(3) {
    animation-delay: 0.4s;
}

.sound-bars span:nth-child(4) {
    animation-delay: 0.1s;
}

@keyframes radio-wave {
    0% {
        height: 5px;
    }

    100% {
        height: 21px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sound-bars span {
        animation: none;
        height: 12px;
    }
}

