* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    position: fixed;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #000;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: hidden;
}

.radio-player {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    background: #000;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 15px;
    box-sizing: border-box;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.header-icon:active {
    transform: scale(0.95);
}

.header-icon svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

.album-art-container {
    border: 5px solid white;
    width: 90%;
    aspect-ratio: 1;
    border-radius: 20px;
    overflow: hidden;
    margin: 10px auto 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.album-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.visualizer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 50px;
    margin-bottom: 15px;
}

.bar {
    width: 6px;
    background: #fff;
    border-radius: 3px;
    transition: height 0.1s ease;
}

.bar.bar1 {
    height: 20px;
}

.bar.bar2 {
    height: 35px;
}

.bar.bar3 {
    height: 15px;
}

.visualizer.playing .bar {
    animation: visualize 0.8s ease-in-out infinite;
}

.visualizer.playing .bar1 {
    animation-delay: 0s;
}

.visualizer.playing .bar2 {
    animation-delay: 0.2s;
}

.visualizer.playing .bar3 {
    animation-delay: 0.4s;
}

@keyframes visualize {

    0%,
    100% {
        height: 15px;
    }

    50% {
        height: 40px;
    }
}

.station-name {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.track-info {
    font-size: 14px;
    color: #999;
    text-align: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 15px 0;
    position: relative;
}

.control-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.control-btn:hover {
    opacity: 0.8;
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn svg {
    fill: #fff;
}

.control-btn.small {
    width: 44px;
    height: 44px;
}

.control-btn.small svg {
    width: 28px;
    height: 28px;
}

.play-pause-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #E91E63;
    box-shadow: 0 4px 20px rgba(233, 30, 99, 0.4);
}

.play-pause-btn svg {
    width: 40px;
    height: 40px;
}

.status {
    text-align: center;
    font-size: 14px;
    color: #666;
    min-height: 20px;
}

/* VOLUME CONTROL POPUP */
.volume-popup {
    position: absolute;
    height: 210px;
    width: 50px;
    bottom: 80px;
    right: 65px;
    background: #1a1a1a;
    border-radius: 15px;
    padding: 20px 15px;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    z-index: 100;
    max-width: calc(100vw - 80px);
}

.volume-popup.active {
    display: flex;
}

.volume-slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 80px;
}

.volume-slider {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 150px;
    height: 6px;
    background: #333;
    border-radius: 5px;
    outline: none;
    transform: rotate(-90deg);
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #E91E63;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #E91E63;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.volume-value {
    font-size: 14px;
    color: #fff;
    font-weight: 600;
    margin-top: -5px;
    padding-bottom: 5px;
}

#volumeDisplayLabel {
    right: 50%;
    transform: translateX(50%);
}

/* SLEEP TIMER POPUP */
.timer-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.timer-popup.active {
    display: flex;
}

.timer-content {
    background: #1a1a1a;
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.timer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.timer-title {
    font-size: 24px;
    font-weight: 700;
}

.timer-close {
    background: none;
    border: none;
    color: #999;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timer-close:hover {
    color: #fff;
}

.timer-slider-container {
    margin-bottom: 25px;
}

.timer-value-display {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: #E91E63;
}

.timer-slider {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    height: 8px;
    background: #333;
    border-radius: 5px;
    outline: none;
}

.timer-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #E91E63;
    border-radius: 50%;
    cursor: pointer;
}

.timer-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #E91E63;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.timer-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 12px;
    color: #666;
}

.timer-buttons {
    display: flex;
    gap: 15px;
}

.timer-btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.timer-btn:active {
    transform: scale(0.95);
}

.timer-btn.cancel {
    background: #333;
    color: #fff;
}

.timer-btn.cancel:hover {
    background: #444;
}

.timer-btn.set {
    background: green;
    color: #fff;
}

.timer-btn.set:hover {
    opacity: 0.9;
}

.timer-display {
    position: absolute;
    top: -20px;
    right: -8px;
    background: #E91E63;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 10px;
    min-width: 35px;
    text-align: center;
}

#timerDisplay {
    right: 45%;
    transform: translateX(50%);
}

.timer-btn.cancel-active {
    background: #E91E63;
    color: #fff;
}

/* INFORMATION POPUP */
.info-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.info-popup.active {
    display: flex;
}

.info-content {
    background: #1a1a1a;
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.info-title {
    font-size: 24px;
    font-weight: 700;
}

.info-close {
    background: none;
    border: none;
    color: #999;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-close:hover {
    color: #fff;
}

.info-details {
    color: #ccc;
    line-height: 1.8;
}

.info-details p {
    margin-bottom: 15px;
    font-size: 14px;
}

.info-details strong {
    background-color: white;
    color: black;
    padding: 2px 5px;
    border-radius: 5px;
    font-weight: 600;
    margin-right: 5px;
}

.info-ok-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    background: #4FC3F7;
    color: #fff;
    margin-top: 20px;
}

.info-ok-btn:active {
    transform: scale(0.95);
}

.info-ok-btn:hover {
    opacity: 0.9;
}

@media (max-width: 480px) {
    .station-name {
        font-size: 28px;
    }

    .track-info {
        font-size: 16px;
    }

    .play-pause-btn {
        width: 70px;
        height: 70px;
    }

    .play-pause-btn svg {
        width: 35px;
        height: 35px;
    }

    .volume-popup {
        right: -10px;
    }

    .timer-content {
        padding: 25px;
    }

    .timer-value-display {
        font-size: 42px;
    }
}