* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: #000;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, #252525, #090909 65%);
    color: #eeeeee;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.radio {
    width: min(92vw, 520px);
    padding: 42px;
    border: 1px solid #303030;
    border-radius: 24px;
    background: rgba(15, 15, 15, 0.92);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

header {
    text-align: center;
}

h1 {
    margin: 14px 0 38px;
    font-size: 2rem;
    font-weight: 600;
}

.live {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff3b30;
    animation: livePulse 1.8s ease-in-out infinite;
}

@keyframes livePulse {
    0% {
        opacity: 0.7;
        box-shadow: 0 0 5px rgba(255, 59, 48, 0.35);
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 15px rgba(255, 59, 48, 0.95);
    }

    100% {
        opacity: 0.7;
        box-shadow: 0 0 5px rgba(255, 59, 48, 0.35);
    }
}

.now-playing {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-bottom: 36px;
}

.cover {
    width: 132px;
    height: 132px;
    flex-shrink: 0;
    display: block;
    object-fit: cover;
    border: 1px solid #303030;
    border-radius: 16px;
    background: #202020;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4);
}

.track-info {
    min-width: 0;
}

.artist {
    margin-bottom: 7px;
    color: #9b9b9b;
    font-size: 0.95rem;
}

.title {
    overflow: hidden;
    font-size: 1.45rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Player */

.player-bar {
    display: flex;
    align-items: center;
    width: 100%;
    height: 64px;
    padding: 8px;
    background: #eeeeee;
    border-radius: 999px;
}

.player-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    padding: 0;
    background: #111111;
    color: #ffffff;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.player-button:hover {
    background: #222222;
}

.player-button:active {
    transform: scale(0.94);
}

.player-button .material-symbols-rounded {
    font-size: 28px;
}

.player-divider {
    width: 1px;
    height: 34px;
    flex-shrink: 0;
    margin: 0 14px;
    background: #cccccc;
}

/* Volume */

.mute-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    padding: 0;
    background: transparent;
    color: #111111;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s ease;
}

.mute-button:hover {
    background: rgba(0, 0, 0, 0.08);
}

.mute-button .material-symbols-rounded {
    font-size: 24px;
}

.volume-slider {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    margin-left: 10px;
}

#volume {
    width: 100%;
    height: 4px;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    background: #bbbbbb;
    border-radius: 999px;
    outline: none;
    cursor: pointer;
}

#volume::-webkit-slider-thumb {
    width: 14px;
    height: 14px;
    appearance: none;
    -webkit-appearance: none;
    background: #111111;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

#volume::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #111111;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

#volume::-moz-range-track {
    height: 4px;
    background: #bbbbbb;
    border-radius: 999px;
}

.volume-tooltip {
    position: absolute;
    bottom: 27px;
    z-index: 20;
    padding: 4px 7px;
    background: #eeeeee;
    color: #111111;
    border-radius: 6px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-50%);
    transition: opacity 0.15s ease;
}

.volume-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    border-width: 5px;
    border-style: solid;
    border-color: #eeeeee transparent transparent transparent;
    transform: translateX(-50%);
}

.volume-slider:hover .volume-tooltip,
.volume-slider.is-active .volume-tooltip {
    opacity: 1;
}

/* Playlist */

.playlist-download {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    color: #111111;
    border-radius: 50%;
    text-decoration: none;
    transition: background 0.15s ease;
}

.playlist-download:hover {
    background: rgba(0, 0, 0, 0.08);
}

.playlist-download .material-symbols-rounded {
    font-size: 25px;
}

.playlist-tooltip {
    position: absolute;
    right: 50%;
    bottom: 52px;
    z-index: 30;
    padding: 6px 9px;
    background: #111111;
    color: #ffffff;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateX(50%);
    transition: opacity 0.15s ease;
}

.playlist-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    border-width: 5px;
    border-style: solid;
    border-color: #111111 transparent transparent transparent;
    transform: translateX(-50%);
}

.playlist-download:hover .playlist-tooltip {
    opacity: 1;
}

/* Stats */

.stats {
    display: flex;
    justify-content: space-between;
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid #292929;
    color: #8c8c8c;
    font-size: 0.85rem;
}

/* Mobile */

@media (max-width: 520px) {
    .radio {
        padding: 28px;
    }

    h1 {
        margin-bottom: 30px;
    }

    .now-playing {
        gap: 18px;
        margin-bottom: 30px;
    }

    .cover {
        width: 104px;
        height: 104px;
        border-radius: 14px;
    }

    .title {
        font-size: 1.15rem;
    }

    .player-bar {
        height: 58px;
        padding: 7px;
    }

    .player-button {
        width: 44px;
        height: 44px;
    }

    .player-divider {
        height: 30px;
        margin: 0 9px;
    }

    .mute-button {
        width: 30px;
        height: 30px;
    }

    .volume-slider {
        margin-left: 5px;
    }

    .playlist-download {
        width: 38px;
        height: 38px;
    }
}