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

:root {
    --bg-dark: #0d1b2a;
    --bg-panel: rgba(255, 255, 255, 0.95);
    --cyan-primary: #1976D2;
    --cyan-glow: rgba(25, 118, 210, 0.3);
    --red-danger: #D32F2F;
    --text-primary: #1a1a1a;
    --text-secondary: #546e7a;
    --border-color: #2196F3;
    --accent-blue: #42A5F5;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
    background: linear-gradient(rgba(13, 27, 42, 0.85), rgba(13, 27, 42, 0.9)), 
                url('/static/fondo-comunidad.jpg') center/cover fixed;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Grid de fondo tecnológico */
.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(33, 150, 243, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(33, 150, 243, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 800px;
    width: 100%;
    position: relative;
    z-index: 1;
    display: block;
}

/* Panel Principal */
.main-panel {
    background: var(--bg-panel);
    border: 3px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(33, 150, 243, 0.3),
                0 0 60px rgba(25, 118, 210, 0.2);
}

/* Header con Holograma */
.header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(33, 150, 243, 0.2);
}

/* Holograma Animado */
.hologram-container {
    flex-shrink: 0;
}

.hologram {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hologram-ring {
    position: absolute;
    border: 2px solid var(--cyan-primary);
    border-radius: 50%;
    opacity: 0.5;
}

.ring-1 {
    width: 90px;
    height: 90px;
    animation: pulse-ring 2s ease-in-out infinite;
}

.ring-2 {
    width: 70px;
    height: 70px;
    animation: pulse-ring 2s ease-in-out infinite 0.5s;
}

.ring-3 {
    width: 50px;
    height: 50px;
    animation: pulse-ring 2s ease-in-out infinite 1s;
}

.hologram-core {
    width: 30px;
    height: 30px;
    background: var(--red-danger);
    border-radius: 50%;
    box-shadow:
        0 0 20px var(--red-danger),
        0 0 40px rgba(211, 47, 47, 0.5);
    position: relative;
}

.hologram.active .hologram-core {
    background: linear-gradient(135deg, var(--accent-blue), var(--cyan-primary));
    box-shadow:
        0 0 20px var(--cyan-primary),
        0 0 40px rgba(25, 118, 210, 0.6);
    animation: core-glow 1.5s ease-in-out infinite;
}

.core-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
}

.hologram.active .core-pulse {
    animation: core-pulse 1.5s ease-out infinite;
}

@keyframes pulse-ring {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes core-glow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes core-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.header-info {
    flex: 1;
}

.title {
    font-size: 2em;
    font-weight: 600;
    color: var(--cyan-primary);
    letter-spacing: 1px;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(25, 118, 210, 0.2);
    font-family: 'Segoe UI', sans-serif;
}

.status-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95em;
}

.status-label {
    color: var(--text-secondary);
}

.status-value {
    color: var(--red-danger);
    font-weight: bold;
}

.status-value.online {
    color: var(--cyan-primary);
}

.status-indicator {
    width: 12px;
    height: 12px;
    background: var(--red-danger);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--red-danger);
}

.status-indicator.online {
    background: var(--cyan-primary);
    box-shadow: 0 0 10px var(--cyan-primary);
    animation: blink 1s infinite;
}

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

/* Visualizador */
.visualizer-section {
    margin-bottom: 30px;
}

.visualizer-frame {
    background: #f5f5f5;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    position: relative;
}

#visualizer {
    width: 100%;
    height: 150px;
    display: block;
    background: #ffffff;
    border-radius: 4px;
}

.frequency-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.75em;
    color: var(--text-secondary);
}

/* Controles */
.controls-section {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.control-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    border: 2px solid;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font-family: 'Segoe UI', sans-serif;
    font-size: 0.95em;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn svg {
    width: 20px;
    height: 20px;
}

.control-btn.primary {
    border-color: var(--cyan-primary);
    color: var(--cyan-primary);
}

.control-btn.primary:hover {
    background: var(--cyan-primary);
    color: var(--bg-dark);
    box-shadow: 0 0 20px var(--cyan-glow);
}

.control-btn.secondary {
    border-color: #ffa500;
    color: #ffa500;
}

.control-btn.secondary:hover {
    background: #ffa500;
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(255, 165, 0, 0.3);
}

.control-btn.danger {
    border-color: var(--red-danger);
    color: var(--red-danger);
}

.control-btn.danger:hover {
    background: var(--red-danger);
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(255, 0, 64, 0.3);
}

.control-btn.hidden {
    display: none;
}

/* Control de Volumen */
.volume-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: #f5f5f5;
}

.volume-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.volume-label {
    color: var(--text-secondary);
    font-size: 0.85em;
}

.volume-value {
    color: var(--cyan-primary);
    font-weight: bold;
}

.volume-slider-container {
    position: relative;
}

.volume-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    position: relative;
    margin-bottom: 5px;
}

.volume-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--cyan-primary));
    width: 80%;
    border-radius: 4px;
    box-shadow: 0 0 10px var(--cyan-glow);
    transition: width 0.1s ease;
}

#volume-slider {
    width: 100%;
    height: 6px;
    background: transparent;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
    position: absolute;
    top: 0;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--cyan-primary);
    border: 2px solid var(--bg-dark);
    cursor: pointer;
    box-shadow: 0 0 10px var(--cyan-glow);
}

#volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--cyan-primary);
    border: 2px solid var(--bg-dark);
    cursor: pointer;
    border-radius: 0;
    box-shadow: 0 0 10px var(--cyan-glow);
}

/* Métricas */
.metrics-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.metric-box {
    background: #f5f5f5;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.metric-label {
    font-size: 0.75em;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.metric-value {
    font-size: 1.3em;
    color: var(--cyan-primary);
    font-weight: bold;
}

/* Panel de Configuración */
.config-panel {
    display: none; /* Ocultar panel de configuración */
    background: var(--bg-panel);
    border: 2px solid var(--border-color);
    padding: 25px;
    max-height: 80vh;
    overflow-y: auto;
}

.config-title {
    color: var(--cyan-primary);
    font-size: 1.2em;
    margin-bottom: 20px;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.config-section {
    margin-bottom: 20px;
}

.config-subtitle {
    color: var(--text-primary);
    font-size: 0.95em;
    margin-bottom: 10px;
    font-weight: bold;
}

.code-block {
    background: #000;
    border: 1px solid var(--border-color);
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    color: var(--cyan-primary);
    margin-bottom: 8px;
    overflow-x: auto;
}

.config-list {
    border: 1px solid var(--border-color);
    background: #080b12;
}

.config-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
}

.config-item:last-child {
    border-bottom: none;
}

.config-label {
    color: var(--text-secondary);
    font-size: 0.85em;
}

.config-value {
    color: var(--cyan-primary);
    font-weight: bold;
}

.config-note {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-top: 8px;
}

.highlight {
    color: var(--cyan-primary);
    font-weight: bold;
}

/* Scrollbar personalizado */
.config-panel::-webkit-scrollbar {
    width: 8px;
}

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

.config-panel::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 0;
}

.config-panel::-webkit-scrollbar-thumb:hover {
    background: var(--cyan-primary);
}

/* Responsive */
@media (max-width: 1024px) {
    .container {
        max-width: 95%;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
    }

    .controls-section {
        flex-direction: column;
    }

    .metrics-section {
        grid-template-columns: 1fr;
    }

    .title {
        font-size: 1.5em;
    }
    
    .main-panel {
        padding: 25px;
    }
}
/* ============================================
   ESTILOS ADICIONALES PARA WINDOWS
   ============================================ */

.stream-info-header {
    margin-top: 8px;
    font-size: 0.85em;
    color: var(--cyan-primary);
    font-family: 'Courier New', monospace;
}

.stream-url {
    padding: 4px 8px;
    background: rgba(0, 255, 200, 0.1);
    border: 1px solid var(--cyan-primary);
}

.config-steps {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.step {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #080b12;
    border-left: 3px solid var(--cyan-primary);
}

.step-number {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    background: var(--cyan-primary);
    color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1em;
}

.step-content {
    flex: 1;
}

.step-content strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin: 0;
}

.start-guide {
    background: #080b12;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.guide-step {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.guide-step:last-child {
    border-bottom: none;
}

.guide-number {
    font-size: 1.5em;
}

.guide-text {
    color: var(--text-primary);
    font-size: 0.9em;
}

.guide-text code {
    background: var(--bg-dark);
    padding: 2px 8px;
    color: var(--cyan-primary);
    border: 1px solid var(--border-color);
}

.troubleshooting {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.problem {
    padding: 15px;
    background: #080b12;
    border-left: 3px solid var(--red-danger);
}

.problem strong {
    display: block;
    color: var(--red-danger);
    margin-bottom: 8px;
}

.problem p {
    color: var(--text-secondary);
    font-size: 0.85em;
    margin: 3px 0;
}

.tips-list {
    list-style: none;
    padding: 0;
}

.tips-list li {
    padding: 10px 15px;
    background: #080b12;
    margin-bottom: 8px;
    border-left: 3px solid var(--cyan-primary);
    color: var(--text-secondary);
    font-size: 0.9em;
}

.tips-list li strong {
    color: var(--cyan-primary);
}
