@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

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

body {
    background: #0a0a0a;
    color: #ffffff;
    font-family: 'Orbitron', monospace;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 255, 198, 0.05) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundPulse 8s ease-in-out infinite alternate;
}

@keyframes backgroundPulse {
    0% { opacity: 0.3; }
    100% { opacity: 0.7; }
}

/* Main container */
.container {
    text-align: center;
    padding: 40px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    max-width: 500px;
    width: 90vw;
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00ff88, transparent);
    animation: scanLine 3s infinite;
}

@keyframes scanLine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Status indicator */
.status-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin: 0 auto 20px;
    position: relative;
}

.online .status-indicator {
    background: #00ff88;
    box-shadow: 0 0 20px #00ff88, 0 0 40px #00ff88;
    animation: pulse 2s infinite;
}

.offline .status-indicator {
    background: #ff0040;
    box-shadow: 0 0 20px #ff0040;
    animation: slowPulse 3s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes slowPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Typography */
h1 {
    font-size: clamp(1.4rem, 3.8vw, 2.5rem);
    font-weight: 900;
    letter-spacing: 0.06em;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #ffffff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 255, 136, 0.3);
    word-break: keep-all;
    white-space: nowrap;
}

/* Live badge */
.live-badge {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(45deg, #ff0040, #ff4080);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(255, 0, 64, 0.4);
    animation: liveBadgeGlow 2s ease-in-out infinite alternate;
}

@keyframes liveBadgeGlow {
    0% { box-shadow: 0 4px 15px rgba(255, 0, 64, 0.4); }
    100% { box-shadow: 0 4px 25px rgba(255, 0, 64, 0.8); }
}

/* Offline message */
.offline-message {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff0040;
    letter-spacing: 0.2em;
    opacity: 0.7;
}

/* Player section */
.player-section {
    margin: 30px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

#stream-player {
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    outline: none;
}

#stream-player::-webkit-media-controls-panel {
    background-color: rgba(0, 0, 0, 0.8);
}

#stream-player::-webkit-media-controls-play-button,
#stream-player::-webkit-media-controls-pause-button {
    background-color: #00ff88;
    border-radius: 50%;
}

#stream-player::-webkit-media-controls-current-time-display,
#stream-player::-webkit-media-controls-time-remaining-display {
    color: #00ff88;
}

/* Listeners counter */
.listeners {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(255, 0, 64, 0.1));
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.listener-count {
    display: block;
    font-size: 3rem;
    font-weight: 900;
    color: #00ff88;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
    margin-bottom: 5px;
}

.listener-label {
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    opacity: 0.8;
    font-weight: 400;
}

/* Playing state effects */
body.playing .container {
    animation: playingGlow 4s ease-in-out infinite alternate;
}

@keyframes playingGlow {
    0% { 
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.3),
            inset 0 1px 1px rgba(255, 255, 255, 0.1),
            0 0 0 rgba(0, 255, 136, 0.3);
    }
    100% { 
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.3),
            inset 0 1px 1px rgba(255, 255, 255, 0.1),
            0 0 40px rgba(0, 255, 136, 0.3);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 20px;
    }
    
    h1 {
        font-size: 1.4rem;
        letter-spacing: 0.05em;
    }
    
    .listener-count {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.2rem;
        letter-spacing: 0.03em;
    }
    
    .container {
        padding: 15px;
    }
}

/* Glitch effect for offline state */
.offline h1 {
    animation: glitch 2s infinite;
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}
