:root {
    /* Color Palette - Modern Dark Theme */
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --primary-color: #3b82f6;
    --accent-color: #10b981;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Background Blobs for Visual Interest */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background-color: #3b82f6;
    border-radius: 50%;
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background-color: #8b5cf6;
    border-radius: 50%;
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 400px;
    height: 400px;
    background-color: #10b981;
    border-radius: 50%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.1); }
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Top Bar */
.top-bar {
    position: relative;
    padding: 1rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(5px);
    z-index: 100;
    overflow: hidden;
}

.top-aurora-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    margin-top: -150px;
    margin-left: -150px;
    object-fit: cover;
    filter: blur(25px) brightness(0.6);
    z-index: 1;
    animation: auroraSpin 25s linear infinite reverse;
    pointer-events: none;
    transform: translateZ(0);
}

.logo-small {
    height: 80px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
    position: relative;
    z-index: 2;
}

/* Event Presenter Header */
.event-presenter {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 15px 50px rgba(0,0,0,0.5);
    transition: opacity 0.5s ease;
}

.event-image-container {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background-color: #1e293b;
}

.event-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 6s ease-out;
}

.event-presenter:hover .event-image-container img {
    transform: scale(1.05);
}

.event-details {
    padding: 2rem;
    text-align: center;
    width: 100%;
    background: linear-gradient(to top, rgba(30, 41, 59, 1), rgba(30, 41, 59, 0.8));
}

.event-details h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.event-details p {
    font-size: 1.1rem;
    color: #cbd5e1;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.event-indicators {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    justify-content: center;
    width: 100%;
    background: rgba(30, 41, 59, 1);
}

.indicator-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    cursor: pointer;
    transition: var(--transition);
}

.indicator-dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Player Section */
.player-section {
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    overflow: hidden;
    width: 100%;
    max-width: 450px;
    transition: var(--transition);
}

.player-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.player-visual {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background-color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aurora-bg {
    position: absolute;
    top: -20%; left: -20%; width: 140%; height: 140%;
    object-fit: cover;
    filter: blur(25px) brightness(0.6);
    z-index: 1;
    animation: auroraSpin 20s linear infinite;
    pointer-events: none;
    transform: translateZ(0);
}

@keyframes auroraSpin {
    0% { transform: rotate(0deg) scale(1) translateZ(0); }
    33% { transform: rotate(120deg) scale(1.1) translateZ(0); }
    66% { transform: rotate(240deg) scale(0.9) translateZ(0); }
    100% { transform: rotate(360deg) scale(1) translateZ(0); }
}

.player-cover {
    height: 90%;
    width: auto;
    max-width: 90%;
    object-fit: contain;
    position: relative;
    z-index: 2;
    transition: transform 0.5s ease;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

.player-section:hover .player-cover {
    transform: scale(1.05);
}

.live-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: #ef4444;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.5);
    animation: pulse 2s infinite;
    z-index: 10;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.player-controls {
    padding: 2rem;
    text-align: center;
}

.station-name {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.station-slogan {
    color: #94a3b8;
    font-size: 1rem;
    margin-bottom: 2rem;
}

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

.play-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #2563eb);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.5);
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.play-btn.playing {
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.5);
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 250px;
}

.volume-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.status-indicator {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #94a3b8;
}

/* Floating WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 5rem; /* Subido para no tapar el footer/panel */
    right: 2rem;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
    z-index: 100;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

/* Footer */
.main-footer {
    padding: 1.5rem 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: #94a3b8;
    display: flex;
    justify-content: center; /* Centrado en vez de space-between */
    gap: 2rem; /* Espacio entre el texto y el link del panel */
    align-items: center;
    border-top: 1px solid var(--glass-border);
}

.admin-link {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-link:hover {
    color: var(--primary-color);
}

/* Responsive & Layout */
.desktop-layout-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    gap: 2rem;
}

/* Message Banner */
.message-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    border-radius: 100px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    width: 100%;
    overflow: hidden;
}

.banner-icon {
    color: var(--primary-color);
    font-size: 1.5rem;
    animation: pulse 2s infinite;
}

.banner-text-container {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}

#bannerText {
    display: inline-block;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    animation: slideText 8s linear infinite;
    padding-left: 100%;
}

@keyframes slideText {
    0% { transform: translateX(0); }
    100% { transform: translateX(-200%); }
}

/* En móvil se muestran en columna, que es el comportamiento por defecto de flex-direction: column */

.main-columns {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}

@media (min-width: 1024px) {
    .main-columns {
        flex-direction: row;
        align-items: stretch;
    }
    
    .event-presenter {
        flex: 1;
        margin: 0;
        width: 100%;
    }
    
    .main-content {
        flex: 0 0 400px;
        padding: 0;
    }
    
    .player-section {
        height: 100%;
        max-width: 100%;
    }
}

/* Programación Radial - Horizontal Cards */
.programs-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.section-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.programs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .programs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.program-card {
    display: flex;
    flex-direction: row;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
}

.program-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.program-img-container {
    width: 150px;
    height: 150px;
    flex-shrink: 0;
}

.program-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.program-details {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.program-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.25rem;
}

.program-host {
    font-size: 0.95rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.program-schedule {
    font-size: 0.85rem;
    color: #cbd5e1;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.program-desc {
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* En móviles muy pequeños, forzamos a columna para que no se apriete */
@media (max-width: 480px) {
    .program-card {
        flex-direction: column;
    }
    .program-img-container {
        width: 100%;
        height: 180px;
    }
}

@media (max-width: 768px) {
    .top-bar {
        padding: 0.5rem 1rem;
    }
    .logo-small {
        height: 60px;
    }
    .desktop-layout-wrapper {
        padding: 0.5rem;
        gap: 1rem;
    }
    .main-columns {
        gap: 1rem;
    }
    .main-content {
        order: -1; /* El reproductor es lo principal, debe ir primero */
    }
    .player-section {
        border-radius: 16px;
    }
    .player-visual {
        height: 160px;
    }
    .player-controls {
        padding: 1.5rem 1rem;
    }
    .station-name {
        font-size: 1.5rem;
    }
    .play-btn {
        width: 60px;
        height: 60px;
        font-size: 1.3rem;
    }
    .event-presenter {
        border-radius: 16px;
    }
    .event-image-container {
        height: 180px;
    }
    .event-details {
        padding: 1.5rem 1rem;
    }
    .event-details h1 {
        font-size: 1.4rem;
    }
    .event-details p {
        font-size: 0.95rem;
    }
    .section-title {
        font-size: 1.5rem;
    }
    .main-footer {
        flex-direction: column;
        gap: 1rem;
    }
    .whatsapp-float {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}
