
/* ==========================================
   8HOL RADIO
   PRIMARY DESIGN SETTINGS
========================================== */

:root {

    --accent: #ff6600;
    --background: #080808;
    --panel: #111111;
    --text: #ffffff;
    --muted: #888888;
    --border: #303030;

    --player-width: 370px;
    --player-padding: 24px;
    --radius: 16px;

    --font: Arial, Helvetica, sans-serif;

    --logo-width: 100%;
    --play-button-size: 80px;

    --background-image: url("images/background.jpg");

}

/* ==========================================
   GLOBAL PAGE STYLING
========================================== */

* {
    box-sizing: border-box;
}

body {

    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;

    display: grid;
    place-items: center;

    padding: 20px;

    background-color: var(--background);
    background-image: var(--background-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    color: var(--text);
    font-family: var(--font);

}

/* ==========================================
   MAIN PLAYER CONTAINER
========================================== */

.player {

    width: 100%;
    max-width: var(--player-width);

    padding: var(--player-padding);

    background: var(--panel);

    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow: 0 25px 80px rgba(0,0,0,.5);

}

/* ==========================================
   TOP STATUS BAR
========================================== */

.topbar {

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 10px;

    font-size: 9px;
    letter-spacing: 1px;

    color: var(--muted);

}

.live {

    color: var(--accent);
    font-weight: bold;

}

/* ==========================================
   ORIGINAL 8HOL LOGO
   No cropping or image modifications
========================================== */

.artwork {

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 24px 0;

    padding: 0;
    background: transparent;

}

.station-logo {

    display: block;

    width: var(--logo-width);
    max-width: 100%;
    height: auto;

    object-fit: contain;

}

/* ==========================================
   STATION INFORMATION
========================================== */

.station-info {

    text-align: center;
    margin-top: 24px;

}

.label {

    color: var(--accent);

    font-size: 10px;
    font-weight: bold;
    letter-spacing: 2px;

}

h1 {

    font-size: 24px;
    line-height: 1.2;

    margin: 12px 0 6px;

    overflow-wrap: anywhere;

}

#artist {

    color: var(--muted);
    font-size: 13px;
    overflow-wrap: anywhere;

}


/* ==========================================
   ANIMATED SIGNAL DISPLAY
========================================== */

.meters {
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin: 25px 0;
}

.bar {
    flex: 1;
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    opacity: .35;
    transform: scaleY(.12);
    transform-origin: center;
}

.playing .bar {
    opacity: 1;
    animation: waveform var(--speed, .6s)
               ease-in-out infinite alternate;
    animation-delay: var(--delay, 0s);
}

@keyframes waveform {
    0% {
        transform: scaleY(.10);
    }

    50% {
        transform: scaleY(.85);
    }

    100% {
        transform: scaleY(.25);
    }
}


/* ==========================================
   PLAYBACK CONTROLS
========================================== */

.controls {

    display: flex;
    justify-content: space-around;
    align-items: center;

}

button {

    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 44px;
    min-height: 44px;

    padding: 0;

    background: transparent;
    color: var(--muted);

    border: none;
    cursor: pointer;

    touch-action: manipulation;

}

button svg {

    width: 24px;
    height: 24px;

}

button:hover {

    color: var(--text);

}

button:focus-visible {

    outline: 2px solid var(--accent);
    outline-offset: 4px;

}

#play {

    width: var(--play-button-size);
    height: var(--play-button-size);

    border-radius: 50%;

    background: var(--accent);
    color: #080808;

    font-size: 32px;

    transition: transform .15s ease;

}

#play:active {

    transform: scale(.94);

}

#mute.muted {

    color: var(--accent);

}

/* ==========================================
   VOLUME CONTROL
========================================== */

#volume {

    display: block;

    width: 100%;

    margin: 28px 0 12px;

    accent-color: var(--accent);
    cursor: pointer;

}

/* ==========================================
   CONNECTION STATUS
========================================== */

#status {

    text-align: center;

    font-size: 10px;
    letter-spacing: 1px;

    color: var(--muted);

    margin-top: 16px;

}

.playing #status {

    color: var(--accent);

}

/* ==========================================
   FOOTER
========================================== */

.footer {

    display: flex;
    justify-content: space-between;

    margin-top: 22px;
    padding-top: 18px;

    border-top: 1px solid var(--border);

    font-size: 10px;
    letter-spacing: 1px;

    color: var(--muted);

}

/* ==========================================
   MOBILE ADJUSTMENTS
========================================== */

@media (max-width: 480px) {

    body {
        padding: 12px;
    }

    .player {
        padding: 20px;
    }

}

@media (prefers-reduced-motion: reduce) {

    .playing .bar {
        animation: none;
    }

    #play {
        transition: none;
    }

}
