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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.controls {
    text-align: center;
    margin-bottom: 30px;
}

.stream-controls {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.stream-controls input {
    padding: 12px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    width: 250px;
    outline: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.btn-primary {
    background: #4CAF50;
    color: white;
}

.btn-success {
    background: #2196F3;
    color: white;
}

.btn-secondary {
    background: #757575;
    color: white;
}

.btn-danger {
    background: #f44336;
    color: white;
}

.current-stream, .listening {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.streaming-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
}

.pulse {
    width: 12px;
    height: 12px;
    background: #f44336;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.7);
    }
    
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(244, 67, 54, 0);
    }
    
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0);
    }
}

.audio-visualizer {
    display: flex;
    justify-content: center;
    align-items: end;
    gap: 4px;
    height: 40px;
    margin: 15px 0;
}

.bar {
    width: 8px;
    background: #2196F3;
    border-radius: 4px;
    animation: audioBar 1.5s infinite ease-in-out;
}

.bar:nth-child(2) { animation-delay: 0.2s; }
.bar:nth-child(3) { animation-delay: 0.4s; }
.bar:nth-child(4) { animation-delay: 0.6s; }
.bar:nth-child(5) { animation-delay: 0.8s; }

@keyframes audioBar {
    0%, 40%, 100% {
        height: 10px;
    }
    20% {
        height: 30px;
    }
}

main {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

main h2 {
    margin-bottom: 20px;
    text-align: center;
    color: #333;
}

.streams-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.stream-item {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.stream-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.stream-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.stream-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666;
    font-size: 0.9rem;
}

.listener-count {
    display: flex;
    align-items: center;
    gap: 5px;
}

.listener-count::before {
    content: "👥";
}

.no-streams {
    text-align: center;
    color: #999;
    font-style: italic;
    grid-column: 1 / -1;
    padding: 40px;
}

.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .stream-controls {
        flex-direction: column;
    }
    
    .stream-controls input {
        width: 100%;
        max-width: 300px;
    }
    
    .streams-list {
        grid-template-columns: 1fr;
    }
}