/* Community Broadcasts Web App Styles */
:root {
    --primary-color: #5865f2;
    --secondary-color: #7289da;
    --background-dark: #2c2f33;
    --background-darker: #23272a;
    --background-light: #36393f;
    --text-primary: #ffffff;
    --text-secondary: #b9bbbe;
    --text-muted: #72767d;
    --border-color: #40444b;
    --success-color: #57f287;
    --warning-color: #fee75c;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--background-dark) 0%, var(--background-darker) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Status Messages */
.status-message {
    text-align: center;
    margin: 40px 0;
    padding: 30px;
    background: var(--background-light);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.no-broadcasts h2 {
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.no-broadcasts p {
    color: var(--text-muted);
}

/* Video Container */
.video-container {
    margin-bottom: 40px;
    background: var(--background-light);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    background: #000;
}

#broadcast-player {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    display: block;
}

/* Radio Player Controls */
.radio-player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2a1810 0%, #1a0f0a 100%);
    border-top: 3px solid #8b4513;
    padding: 15px 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.6);
    border-radius: 0 0 12px 12px;
}

.radio-display {
    background: linear-gradient(145deg, #000000 0%, #1a1a1a 100%);
    border: 2px solid #8b4513;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.3);
}

.radio-brand {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #ff6b35;
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
    letter-spacing: 2px;
}

.current-broadcast-info h3 {
    color: #00ff88;
    margin-bottom: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.3);
}

.current-broadcast-info p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 10px;
}

.radio-indicators {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.signal-strength {
    display: flex;
    gap: 2px;
}

.signal-bar {
    width: 4px;
    height: 12px;
    background: #666;
    border-radius: 1px;
    transition: background-color 0.3s ease;
}

.signal-bar.active {
    background: #00ff88;
    box-shadow: 0 0 4px rgba(0, 255, 136, 0.6);
}

.live-indicator-radio {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #ff4444;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(255, 68, 68, 0.5);
}

.live-indicator-radio .live-dot {
    width: 6px;
    height: 6px;
    background: #ff4444;
    border-radius: 50%;
    animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
    }
    50% {
        transform: scale(1.2);
        box-shadow: 0 0 0 4px rgba(255, 68, 68, 0);
    }
}

.radio-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.control-btn {
    background: linear-gradient(145deg, #4a4a4a 0%, #2a2a2a 100%);
    border: 2px solid #666;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.control-btn:hover {
    background: linear-gradient(145deg, #5a5a5a 0%, #3a3a3a 100%);
    border-color: #888;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn.playing {
    border-color: #00ff88;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
}

.control-btn.muted {
    border-color: #ff6b35;
    box-shadow: 0 0 8px rgba(255, 107, 53, 0.4);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    max-width: 150px;
}

.volume-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

.volume-slider {
    flex: 1;
    height: 4px;
    background: #333;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #00ff88;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(0, 255, 136, 0.6);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #00ff88;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 4px rgba(0, 255, 136, 0.6);
}

.radio-tuning {
    display: flex;
    align-items: center;
}

.tuning-display {
    background: linear-gradient(145deg, #1a1a1a 0%, #000000 100%);
    border: 2px solid #8b4513;
    border-radius: 6px;
    padding: 8px 12px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #00ff88;
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.3);
    min-width: 80px;
    text-align: center;
}

/* Broadcasts List */
.broadcasts-list h2 {
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1.8rem;
}

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

/* Broadcast Card */
.broadcast-card {
    background: var(--background-light);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.broadcast-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    border-color: var(--primary-color);
}

.broadcast-card.active {
    border-color: var(--success-color);
    box-shadow: 0 0 0 2px var(--success-color);
}

.card-header {
    padding: 20px;
    background: var(--background-darker);
}

.card-header h3 {
    color: var(--text-primary);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.card-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.card-meta {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
}

.card-meta .meta-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.card-meta .meta-item:last-child {
    margin-bottom: 0;
}

.meta-label {
    color: var(--text-muted);
}

.meta-value {
    color: var(--text-secondary);
    font-weight: 500;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--success-color);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--success-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(87, 242, 135, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(87, 242, 135, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(87, 242, 135, 0);
    }
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-secondary);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hidden utility class */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 2rem;
    }

    .broadcasts-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .video-container {
        margin-bottom: 30px;
    }

    .card-header {
        padding: 15px;
    }

    .card-meta {
        padding: 12px 15px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }

    .broadcasts-list h2 {
        font-size: 1.5rem;
    }

    .radio-player-controls {
        padding: 12px 15px;
    }

    .radio-display {
        padding: 12px;
        margin-bottom: 12px;
    }

    .radio-brand {
        font-size: 1rem;
    }

    .current-broadcast-info h3 {
        font-size: 1rem;
    }

    .radio-controls {
        gap: 15px;
    }

    .control-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .volume-control {
        max-width: 120px;
    }

    .volume-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}
