@font-face {
    font-family: Blatant;
    src: url(./assets/blatant-font/Blatant-Bold.otf);
}

:root {
    --color-primary: #c40000;
    --color-play: #FFD700;
    --color-bg: #000000;
    --color-text: #ffffff;
    --font-brand: Blatant, sans-serif;
    --transition-fast: 0.3s ease;
}

*,
html,
body {
    font-family: var(--font-brand);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
}

/* Utilidad accesibilidad */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Foco visible para navegación por teclado */
:focus-visible {
    outline: 2px solid var(--color-play);
    outline-offset: 2px;
}

body {
    background: url(assets/bg-movil.jpg);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    width: 100%;
    height: 100vh;
}

.header {
    background-color: var(--color-bg);
    padding: 15px;
    width: 100%;
    margin: 0 auto;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
}

.nav__checkbox {
    display: none;
}

.nav__label {
    width: 40px;
    height: 40px;
    background-image: url(./assets/menu.svg);
    background-size: cover;
    cursor: pointer
}

.nav__social {
    margin: 20px auto;
    display: grid;
    gap: 1.2rem;
    grid-auto-flow: column;
}

.nav__link {
    display: flex;
    justify-content: center;
    align-items: center;
}


.radio {
    margin: 10px;
    height: 90%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.radio__onAir {
    width: 100%;
    color: var(--color-text);
    display: flex;
    justify-content: center;
    align-items: center;
}

.radio__equalizer {
    display: flex;
    justify-content: center;
    align-items: baseline;
    width: 100%;
    font-size: 20px;
    font-weight: bold;
    color: var(--color-text);
    text-transform: uppercase;
}

.equalizer {
    width: 12px;
    height: 25px;
    margin-right: 5px;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    transform-origin: bottom;
}

.equalizer__barra {
    background-color: var(--color-text);
    width: 2px;
    height: 100%;
    margin-right: 2px;
    animation: equalize 2s infinite;
}

.radio__album-art {
    margin: 40px auto;
    border: 5px solid var(--color-play);
    border-radius: 10px;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radio__album-art img{
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

.radio__controls{
    margin: 40px auto;
}

.radio__song--info {
    color: var(--color-text);
    text-transform: uppercase;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
}

.footer__radio {
    width: 50%;
    height: 100px;
    background-color: var(--color-bg);
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.controls__radio {
    display: flex;
    justify-content: center;
    align-items: center;
}

.controls__volume--group {
    display: flex;
    align-items: center;
    position: relative;
}

.volume-slider-container {
    width: 0;
    overflow: hidden;
    transition: width var(--transition-fast);
}

.controls__volume--group:hover .volume-slider-container {
    width: 130px;
}

#volume-muted-btn {
    transition: margin-left var(--transition-fast);
}

/* Barra deslizante de volumen */
.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 15px;
    --fill-pct: 100%;
    background: linear-gradient(to right, var(--color-primary) var(--fill-pct), #b97474 var(--fill-pct));
    outline: none;
    border-radius: 5px;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    background: var(--color-text);
    cursor: pointer;
    border-radius: 50%;
}

.btn_control {
    outline: none;
    background-color: rgba(255, 0, 0, 0);
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    width: 60px;
    height: 60px;
}

.btn_control_play {
    background-color: var(--color-play);
    border-radius: 50%;
    display: flex;
    align-items: center;
    cursor: pointer;
    border: none;
}

.btn_control_play img {
    width: 50px;
    border-radius: 5px;
}

.btn_control img {
    width: 40px;
    height: 40px;
}


/*EFECTO ECUALIZADOR*/

@keyframes equalize {

    0%,
    100% {
        -webkit-clip-path: inset(79% 0 0 0);
        clip-path: inset(79% 0 0 0);
    }

    10% {
        -webkit-clip-path: inset(62% 0 0 0);
        clip-path: inset(62% 0 0 0);
    }

    20% {
        -webkit-clip-path: inset(17% 0 0 0);
        clip-path: inset(17% 0 0 0);
    }

    30% {
        -webkit-clip-path: inset(76% 0 0 0);
        clip-path: inset(76% 0 0 0);
    }

    40% {
        -webkit-clip-path: inset(61% 0 0 0);
        clip-path: inset(61% 0 0 0);
    }

    50% {
        -webkit-clip-path: inset(49% 0 0 0);
        clip-path: inset(49% 0 0 0);
    }

    60% {
        -webkit-clip-path: inset(21% 0 0 0);
        clip-path: inset(21% 0 0 0);
    }

    70% {
        -webkit-clip-path: inset(62% 0 0 0);
        clip-path: inset(62% 0 0 0);
    }

    80% {
        -webkit-clip-path: inset(33% 0 0 0);
        clip-path: inset(33% 0 0 0);
    }

    90% {
        -webkit-clip-path: inset(44% 0 0 0);
        clip-path: inset(44% 0 0 0);
    }
}

.equalizer__barra:nth-child(1) {
    animation-delay: -3.5s;
}

.equalizer__barra:nth-child(2) {
    animation-delay: -5.8s;
}

.equalizer__barra:last-child {
    animation-delay: -1.5s;
}
