:root {
    --neon-red: #ff3e3e;
    --neon-red-glow: rgba(255, 62, 62, 0.7);
    --neon-blue: #00f2ff;
    --neon-purple: #9d00ff;
    --bg-dark: #0a0a14;
    /* Darker purple/blue black */
    --glass-bg: rgba(15, 15, 25, 0.85);
    --text-color: #f0f0f0;
    --accent-color: #ffcc00;
    /* For small details like the 'Web Radio' text */
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.upside-down-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-dark) 90%),
        linear-gradient(rgba(15, 15, 25, 0.4), rgba(15, 15, 25, 0.4)),
        url('https://www.transparenttextures.com/patterns/carbon-fibre.pattern');
    opacity: 0.6;
    pointer-events: none;
    z-index: -1;
    animation: particles 30s infinite linear;
}

@keyframes particles {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 1000px 1000px;
    }
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    text-align: center;
    z-index: 10;
}

.logo-container {
    margin-bottom: 2rem;
    perspective: 1000px;
}

#radio-logo {
    width: 100%;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 0 20px var(--neon-red-glow), 0 0 40px rgba(0, 242, 255, 0.3);
    transition: transform 0.5s;
}

#radio-logo:hover {
    transform: rotateY(5deg) scale(1.02);
}

h1 {
    font-family: 'Bangers', cursive;
    font-size: 2rem;
    color: var(--neon-red);
    text-shadow: 0 0 10px var(--neon-red-glow);
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

.player-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.player-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--neon-red), var(--neon-purple));
    box-shadow: 0 0 15px var(--neon-red-glow);
}

.status-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--neon-blue);
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--neon-red);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-red-glow);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.player-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.play-button {
    width: 80px;
    height: 80px;
    background: transparent;
    border: 2px solid var(--neon-red);
    color: var(--neon-red);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
    box-shadow: 0 0 15px var(--neon-red-glow);
}

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

.play-button:hover {
    background: var(--neon-red);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 30px var(--neon-red-glow);
}

.volume-container {
    width: 100%;
    max-width: 200px;
}

input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]:focus {
    outline: none;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

input[type=range]::-webkit-slider-thumb {
    height: 18px;
    width: 6px;
    /* Narrower like a slider on a mixing board */
    border-radius: 2px;
    background: var(--neon-blue);
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -7px;
    box-shadow: 0 0 10px var(--neon-blue);
}

.track-info #current-song {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.track-info #station-detail {
    font-size: 0.9rem;
    color: #888;
    font-family: 'Courier New', Courier, monospace;
    /* More analog feel */
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--neon-purple);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neon-red);
}

.footer {
    margin-top: 3rem;
    font-size: 0.7rem;
    color: #444;
    line-height: 1.5;
}

/* Glitch Effect */
.glitch-text {
    position: relative;
    text-transform: uppercase;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch-text::before {
    color: var(--neon-blue);
    z-index: -1;
    animation: glitch 3s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    transform: translate(-2px);
}

.glitch-text::after {
    color: var(--neon-purple);
    z-index: -1;
    animation: glitch 2s infinite reverse;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
    transform: translate(2px);
}

@keyframes glitch {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 1px);
    }

    40% {
        transform: translate(-2px, -1px);
    }

    60% {
        transform: translate(2px, 1px);
    }

    80% {
        transform: translate(2px, -1px);
    }

    100% {
        transform: translate(0);
    }
}

/* New CRT effect for the logo */
.logo-container::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 20%;
    bottom: 0;
    right: 20%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 2;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    border-radius: 8px;
}

.play-button {
    width: 80px;
    height: 80px;
    background: transparent;
    border: 2px solid var(--neon-red);
    color: var(--neon-red);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
    box-shadow: 0 0 15px var(--neon-red-glow), inset 0 0 10px var(--neon-red-glow);
}