@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* Variables del Sistema de Diseño */
:root {
    --bg-base: #0a0812;
    --bg-surface: rgba(26, 22, 38, 0.65);
    --bg-surface-opaque: #161224;
    --bg-surface-hover: rgba(42, 36, 62, 0.8);
    
    --primary: #9d4edd;
    --primary-glow: rgba(157, 78, 221, 0.4);
    --secondary: #00f5d4;
    --secondary-glow: rgba(0, 245, 212, 0.3);
    --accent: #ff007f;
    --accent-glow: rgba(255, 0, 127, 0.3);
    
    --text-main: #f3f0f7;
    --text-muted: #a39cb3;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glowing: rgba(157, 78, 221, 0.25);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --neon-shadow: 0 0 15px var(--primary-glow);
}

/* Reset y Estilos Generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    /* Fondo radial degradado */
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(157, 78, 221, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 245, 212, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(10, 8, 18, 1) 0%, rgba(5, 4, 9, 1) 100%);
    background-attachment: fixed;
    padding-bottom: 90px; /* Espacio para el reproductor flotante inferior */
}

/* Personalización de Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* Glassmorphism General */
.glass-panel {
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
}

.glass-panel:hover {
    border-color: var(--border-glowing);
    box-shadow: 0 8px 32px 0 rgba(157, 78, 221, 0.1), var(--glass-shadow);
}

/* Header & Barra de Navegación */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: rgba(10, 8, 18, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(45deg, #fff, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    color: var(--secondary);
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    font-size: 16px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.nav-btn {
    background: linear-gradient(135deg, var(--primary), #7b2cbf);
    color: #fff;
    font-weight: 600;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--neon-shadow);
}

.nav-btn:hover {
    background: linear-gradient(135deg, #7b2cbf, var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(157, 78, 221, 0.6);
}

/* Contenedor Principal con animación de transición */
.main-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

#main-content {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   PÁGINA DE INICIO (HOME)
   ========================================================================== */

/* Hero Grid */
.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
    margin-bottom: 50px;
}

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
}

/* Reproductor Principal En Vivo */
.live-player-card {
    padding: 30px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 380px;
}

.live-player-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 0, 127, 0.15);
    color: var(--accent);
    border: 1px solid rgba(255, 0, 127, 0.3);
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    align-self: flex-start;
    z-index: 1;
}

.live-badge span {
    width: 8px;
    height: 8px;
    background-color: var(--accent);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.5; box-shadow: 0 0 0 0 rgba(255, 0, 127, 0.7); }
    70% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 8px rgba(255, 0, 127, 0); }
    100% { transform: scale(0.9); opacity: 0.5; box-shadow: 0 0 0 0 rgba(255, 0, 127, 0); }
}

/* Switcher Radio / TV */
.media-switcher {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px;
    border-radius: var(--radius-md);
    margin: 20px 0;
    border: 1px solid var(--border-color);
    z-index: 1;
    position: relative;
    max-width: 280px;
}

.switcher-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    padding: 10px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.switcher-btn.active {
    background: linear-gradient(135deg, var(--primary), #7b2cbf);
    color: #fff;
    box-shadow: 0 4px 15px rgba(157, 78, 221, 0.3);
}

/* Contenido de Medios de Entrada */
.media-viewport {
    position: relative;
    z-index: 1;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.media-container {
    width: 100%;
    display: none;
}

.media-container.active {
    display: block;
}

/* Video Player TV */
.video-player-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Relación de aspecto 16:9 */
    background: #000;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.video-player-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-placeholder-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #161224, #0a0812);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    text-align: center;
    color: var(--text-muted);
}

.video-placeholder-overlay .play-tv-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--secondary);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    box-shadow: var(--neon-shadow);
    transition: var(--transition);
}

.video-placeholder-overlay .play-tv-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px var(--secondary);
}

/* Audio Player Home */
.audio-home-wrapper {
    display: flex;
    align-items: center;
    gap: 25px;
}

.show-artwork {
    width: 130px;
    height: 130px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--border-color);
    box-shadow: var(--glass-shadow);
    position: relative;
}

.show-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.show-info {
    flex: 1;
}

.show-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.show-host {
    font-size: 15px;
    color: var(--secondary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.show-desc {
    color: var(--text-muted);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Onda de Audio Animada */
.sound-wave {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 30px;
    margin-top: 15px;
}

.sound-wave span {
    width: 4px;
    background-color: var(--primary);
    border-radius: 2px;
    height: 5px;
    transition: var(--transition);
}

.sound-wave.playing span {
    animation: bounceWave 1.2s ease-in-out infinite alternate;
}

.sound-wave.playing span:nth-child(2) { animation-delay: 0.1s; background-color: var(--secondary); }
.sound-wave.playing span:nth-child(3) { animation-delay: 0.3s; background-color: var(--accent); }
.sound-wave.playing span:nth-child(4) { animation-delay: 0.5s; background-color: var(--primary); }
.sound-wave.playing span:nth-child(5) { animation-delay: 0.2s; background-color: var(--secondary); }
.sound-wave.playing span:nth-child(6) { animation-delay: 0.4s; background-color: var(--accent); }

@keyframes bounceWave {
    0% { height: 5px; }
    100% { height: 30px; }
}

/* Chat / Interactivo Card */
.interactive-card {
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.interactive-card h3 {
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.interactive-card h3 svg {
    color: var(--secondary);
}

.chat-box {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--radius-sm);
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
}

.chat-message {
    font-size: 13.5px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding-bottom: 8px;
}

.chat-message:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.chat-author {
    font-weight: 700;
    color: var(--secondary);
}

.chat-text {
    color: var(--text-main);
}

.chat-input-group {
    display: flex;
    gap: 10px;
}

.chat-input {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: #fff;
    padding: 10px 15px;
    font-family: inherit;
    font-size: 14px;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary);
}

.chat-send-btn {
    background: var(--secondary);
    color: #000;
    border: none;
    padding: 0 15px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.chat-send-btn:hover {
    background: #00d9bc;
    transform: scale(1.05);
}

/* Sección Título General */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.section-title {
    font-size: 28px;
    font-weight: 800;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -11px;
    width: 60px;
    height: 3px;
    background-color: var(--primary);
}

.view-all-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.view-all-link:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--secondary);
}

/* Noticias Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.news-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.news-card-img {
    height: 200px;
    width: 100%;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.news-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.news-card:hover .news-card-img img {
    transform: scale(1.08);
}

.news-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    gap: 15px;
}

.news-card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-card-title:hover {
    color: var(--primary);
}

.news-card-excerpt {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 15px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more-btn {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--secondary);
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 6px;
}

.read-more-btn:hover {
    gap: 10px;
}

/* ==========================================================================
   PROGRAMACION VISTA (SCHEDULE)
   ========================================================================== */
.schedule-tabs-container {
    margin-bottom: 40px;
}

.schedule-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.schedule-tab {
    flex: 1;
    min-width: 100px;
    background: transparent;
    border: none;
    padding: 12px 15px;
    font-family: inherit;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.schedule-tab.active, .schedule-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.schedule-tab.active {
    background: linear-gradient(135deg, var(--primary), #7b2cbf);
    color: #fff;
    box-shadow: 0 4px 15px rgba(157, 78, 221, 0.3);
}

.schedule-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.schedule-content.active {
    display: block;
}

.program-timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.program-timeline-item {
    display: flex;
    gap: 25px;
    padding: 20px;
    align-items: center;
}

@media (max-width: 600px) {
    .program-timeline-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

.program-time {
    min-width: 140px;
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary);
    border-right: 2px solid var(--border-color);
    padding-right: 15px;
}

@media (max-width: 600px) {
    .program-time {
        border-right: none;
        border-bottom: 2px solid var(--border-color);
        padding-right: 0;
        padding-bottom: 5px;
        width: 100%;
    }
}

.program-timeline-img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
}

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

.program-timeline-info {
    flex-grow: 1;
}

.program-timeline-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 5px;
}

.program-timeline-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 5px;
}

.program-timeline-host {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--primary);
}

.program-type-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-left: 10px;
}

.tag-radio {
    background: rgba(157, 78, 221, 0.15);
    color: var(--primary);
    border: 1px solid rgba(157, 78, 221, 0.3);
}

.tag-tv {
    background: rgba(0, 245, 212, 0.15);
    color: var(--secondary);
    border: 1px solid rgba(0, 245, 212, 0.3);
}

.tag-ambos {
    background: rgba(255, 0, 127, 0.15);
    color: var(--accent);
    border: 1px solid rgba(255, 0, 127, 0.3);
}

/* ==========================================================================
   LOCUTORES (HOSTS) VISTA
   ========================================================================== */
.hosts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.host-card {
    text-align: center;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.host-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--border-color);
    margin-bottom: 20px;
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
}

.host-card:hover .host-avatar {
    border-color: var(--secondary);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 245, 212, 0.3);
}

.host-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.host-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.host-bio {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.host-socials {
    display: flex;
    gap: 12px;
}

.host-social-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 16px;
}

.host-social-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-3px);
}

/* ==========================================================================
   DETALLE DE NOTICIA (NEWS DETAIL)
   ========================================================================== */
.news-detail-container {
    max-width: 800px;
    margin: 0 auto;
}

.news-detail-header {
    margin-bottom: 25px;
}

.news-detail-title {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 15px;
}

.news-detail-meta {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.news-detail-img {
    width: 100%;
    max-height: 450px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.news-detail-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-detail-content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-main);
}

.news-detail-content p {
    margin-bottom: 20px;
}

.back-to-news {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 30px;
}

/* ==========================================================================
   REPRODUCTOR PERSISTENTE INFERIOR (GLOBAL CONTROLLER)
   ========================================================================== */
.persistent-player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 90px;
    background: rgba(10, 8, 18, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 1px solid var(--border-color);
    z-index: 9999;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
}

.player-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    height: 100%;
}

@media (max-width: 768px) {
    .player-container {
        grid-template-columns: 1.2fr 0.8fr;
    }
}

/* Lado izquierdo: Info de reproducción */
.player-current-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.player-thumb {
    width: 55px;
    height: 55px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.player-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-meta {
    overflow: hidden;
}

.player-song-title {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-song-artist {
    font-size: 13px;
    color: var(--secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

/* Centro: Controles del reproductor */
.player-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

@media (max-width: 768px) {
    .player-controls {
        align-items: flex-end;
    }
}

.player-buttons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.play-pause-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #7b2cbf);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    box-shadow: var(--neon-shadow);
    transition: var(--transition);
}

.play-pause-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(157, 78, 221, 0.7);
}

.play-pause-btn svg {
    margin-left: 2px;
}

.play-pause-btn.playing svg {
    margin-left: 0;
}

.live-indicator-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
}

.live-indicator-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

/* Lado derecho: Control de volumen y EQ */
.player-extras {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
}

@media (max-width: 768px) {
    .player-extras {
        display: none;
    }
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
}

.volume-btn:hover {
    color: var(--text-main);
}

.volume-slider {
    -webkit-appearance: none;
    width: 90px;
    height: 4px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--secondary);
    cursor: pointer;
    box-shadow: 0 0 10px var(--secondary);
}

.equalizer-icon {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 15px;
}

.equalizer-icon span {
    width: 2px;
    background-color: var(--secondary);
    height: 3px;
}

.equalizer-icon.active span {
    animation: eqAnim 1s ease-in-out infinite alternate;
}

.equalizer-icon.active span:nth-child(2) { animation-delay: 0.15s; }
.equalizer-icon.active span:nth-child(3) { animation-delay: 0.3s; }
.equalizer-icon.active span:nth-child(4) { animation-delay: 0.08s; }

@keyframes eqAnim {
    0% { height: 3px; }
    100% { height: 15px; }
}

/* ==========================================================================
   PANEL ADMINISTRATIVO (ADMIN UI)
   ========================================================================== */
.admin-body {
    padding-bottom: 0;
}

.admin-header {
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-surface-opaque);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-wrapper {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

@media (max-width: 800px) {
    .admin-wrapper {
        grid-template-columns: 1fr;
    }
}

.admin-sidebar {
    background: #0e0a1b;
    border-right: 1px solid var(--border-color);
    padding: 30px 15px;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-link {
    display: block;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 500;
}

.sidebar-link:hover, .sidebar-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--primary);
}

.admin-content-area {
    padding: 40px;
    overflow-y: auto;
}

/* Formulario Login Admin */
.login-page-bg {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: radial-gradient(circle at center, rgba(157, 78, 221, 0.15) 0%, rgba(10, 8, 18, 1) 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 40px 30px;
}

.login-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 25px;
    text-align: center;
    background: linear-gradient(45deg, #fff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Formularios de Configuración / CRUD */
.admin-card {
    padding: 30px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14.5px;
}

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: #fff;
    padding: 12px 15px;
    font-family: inherit;
    font-size: 15px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(157, 78, 221, 0.2);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: #8b3dc8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-success {
    background: var(--secondary);
    color: #000;
}

.btn-success:hover {
    background: #00d9bc;
}

.btn-danger {
    background: var(--accent);
    color: #fff;
}

.btn-danger:hover {
    background: #e60072;
}

/* Alertas de Feedback */
.alert {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14.5px;
    font-weight: 500;
}

.alert-success {
    background: rgba(0, 245, 212, 0.12);
    border: 1px solid rgba(0, 245, 212, 0.3);
    color: var(--secondary);
}

.alert-danger {
    background: rgba(255, 0, 127, 0.12);
    border: 1px solid rgba(255, 0, 127, 0.3);
    color: var(--accent);
}

/* Tablas Administrativas */
.admin-table-wrapper {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    text-align: left;
}

.admin-table th, .admin-table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: rgba(0, 0, 0, 0.2);
    font-weight: 600;
    color: var(--secondary);
}

.admin-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.admin-table img {
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.table-actions {
    display: flex;
    gap: 8px;
}

.btn-xs {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
}

/* ==========================================================================
   PWA — BANNER DE INSTALACIÓN DE LA APP
   ========================================================================== */
#pwa-install-banner {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    width: calc(100% - 40px);
    max-width: 600px;
    border-radius: 12px;
    background: rgba(26, 22, 38, 0.97);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(157, 78, 221, 0.4);
    box-shadow: 0 0 40px rgba(157, 78, 221, 0.4);
    overflow: hidden;
}
.pwa-install-inner { display: flex; align-items: center; gap: 15px; padding: 16px 20px; }
.pwa-install-icon { width: 48px; height: 48px; border-radius: 8px; background: linear-gradient(135deg, #9d4edd, #7b2cbf); display: flex; align-items: center; justify-content: center; font-size: 22px; color: white; flex-shrink: 0; }
.pwa-install-text { flex: 1; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.pwa-install-title { font-size: 14px; font-weight: 700; color: #ffffff; }
.pwa-install-sub { font-size: 12px; color: #a0a0c0; }
#pwa-install-btn { background: linear-gradient(135deg, #00f5d4, #00d9bc); color: #000; border: none; padding: 10px 16px; border-radius: 8px; font-family: inherit; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; transition: all 0.3s; }
#pwa-install-btn:hover { transform: scale(1.05); }
.pwa-close-btn { background: transparent; border: none; color: #a0a0c0; font-size: 16px; cursor: pointer; padding: 5px; flex-shrink: 0; }
@keyframes pwaSlideIn { from { opacity: 0; transform: translateX(-50%) translateY(30px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes pwaSlideOut { from { opacity: 1; transform: translateX(-50%) translateY(0); } to { opacity: 0; transform: translateX(-50%) translateY(30px); } }
.pwa-slide-in { animation: pwaSlideIn 0.4s ease forwards; }
.pwa-slide-out { animation: pwaSlideOut 0.4s ease forwards; }

/* ==========================================================================
   PWA — TOASTS IN-APP
   ========================================================================== */
.pwa-toast { position: fixed; top: 80px; right: 20px; z-index: 11000; padding: 14px 20px; border-radius: 12px; font-size: 14px; font-weight: 500; max-width: 380px; backdrop-filter: blur(20px); box-shadow: 0 8px 32px rgba(0,0,0,0.5); opacity: 0; transform: translateX(30px); transition: opacity 0.35s ease, transform 0.35s ease; pointer-events: none; }
.pwa-toast.show { opacity: 1; transform: translateX(0); }
.pwa-toast-success { background: rgba(0, 245, 212, 0.15); border: 1px solid rgba(0, 245, 212, 0.4); color: #00f5d4; }
.pwa-toast-warning { background: rgba(255, 160, 0, 0.15); border: 1px solid rgba(255, 160, 0, 0.4); color: #ffa500; }
.pwa-toast-info { background: rgba(157, 78, 221, 0.15); border: 1px solid rgba(157, 78, 221, 0.4); color: #9d4edd; }

/* ==========================================================================
   BOTÓN NOTIFICACIONES HEADER
   ========================================================================== */
.notify-btn { position: relative; background: transparent; border: 1px solid rgba(255,255,255,0.1); border-radius: 50%; width: 38px; height: 38px; color: #a0a0c0; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s; }
.notify-btn:hover { background: rgba(157,78,221,0.1); border-color: #9d4edd; color: #9d4edd; }
.notify-btn .notify-dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; background: #ff006e; border-radius: 50%; animation: pulse 2s infinite; display: none; }
.notify-btn.has-new .notify-dot { display: block; }

/* ==========================================================================
   RESPONSIVE MÓVIL
   ========================================================================== */
@media (max-width: 768px) {
    .player-extras { display: none; }
    #pwa-install-banner { width: calc(100% - 20px); bottom: 95px; }
    .hosts-grid { grid-template-columns: 1fr 1fr; }
    .schedule-tabs { flex-direction: row; overflow-x: auto; flex-wrap: nowrap; }
    .schedule-tab { min-width: 80px; flex-shrink: 0; }
}
@media (max-width: 480px) {
    .hosts-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   DJ VIRTUAL AUTÓNOMO — Widget flotante
   ========================================================================== */
#dj-widget {
    position: fixed;
    right: 20px;
    top: 80px;
    z-index: 9000;
    width: 260px;
    border-radius: 16px;
    background: rgba(12, 8, 25, 0.96);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(157, 78, 221, 0.4);
    box-shadow: 0 0 50px rgba(157, 78, 221, 0.25), 0 0 0 1px rgba(0, 245, 212, 0.05);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: djFadeIn 0.6s ease forwards;
}

@keyframes djFadeIn {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

#dj-widget.dj-disabled { opacity: 0.5; filter: grayscale(0.7); }

#dj-widget.dj-speaking {
    border-color: rgba(0, 245, 212, 0.7);
    box-shadow: 0 0 60px rgba(0, 245, 212, 0.3), 0 0 0 1px rgba(0, 245, 212, 0.2);
}

/* Header */
.dj-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(157, 78, 221, 0.08);
}

.dj-header-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dj-badge {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #00f5d4;
    text-transform: uppercase;
}

.dj-ai-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.35);
}

.dj-controls { display: flex; gap: 6px; }

.dj-ctrl-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.dj-ctrl-btn:hover {
    background: rgba(157, 78, 221, 0.2);
    border-color: rgba(157, 78, 221, 0.5);
    color: #9d4edd;
    transform: scale(1.1);
}

/* Body */
.dj-body {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
}

/* Avatar */
.dj-avatar-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

#dj-avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(157, 78, 221, 0.5);
    position: relative;
    z-index: 2;
    transition: all 0.3s;
}

#dj-avatar-img.dj-avatar-pulse {
    border-color: #00f5d4;
    animation: djAvatarPulse 0.8s ease infinite alternate;
}

@keyframes djAvatarPulse {
    from { box-shadow: 0 0 10px rgba(0, 245, 212, 0.3); transform: scale(1); }
    to   { box-shadow: 0 0 30px rgba(0, 245, 212, 0.8); transform: scale(1.04); }
}

/* Anillos de señal */
.dj-signal-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(157, 78, 221, 0.3);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation: djRingExpand 3s ease-out infinite;
}

.dj-ring-1 { width: 90px;  height: 90px;  animation-delay: 0s;   }
.dj-ring-2 { width: 100px; height: 100px; animation-delay: 1s;   }
.dj-ring-3 { width: 110px; height: 110px; animation-delay: 2s;   }

@keyframes djRingExpand {
    0%   { opacity: 0.6; transform: translate(-50%, -50%) scale(0.9); }
    100% { opacity: 0;   transform: translate(-50%, -50%) scale(1.2); }
}

#dj-widget.dj-speaking .dj-signal-ring {
    border-color: rgba(0, 245, 212, 0.5);
    animation-duration: 1.2s;
}

/* Ecualizador */
.dj-equalizer {
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: flex-end;
    gap: 2px;
    z-index: 3;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    padding: 2px 4px;
}

.dj-equalizer span {
    display: block;
    width: 3px;
    background: linear-gradient(to top, #9d4edd, #00f5d4);
    border-radius: 2px;
    animation: djEq 0.8s ease-in-out infinite alternate;
    height: 5px;
}

.dj-equalizer span:nth-child(1) { animation-duration: 0.6s; }
.dj-equalizer span:nth-child(2) { animation-duration: 0.8s; }
.dj-equalizer span:nth-child(3) { animation-duration: 0.5s; }
.dj-equalizer span:nth-child(4) { animation-duration: 0.9s; }
.dj-equalizer span:nth-child(5) { animation-duration: 0.7s; }
.dj-equalizer span:nth-child(6) { animation-duration: 0.4s; }
.dj-equalizer span:nth-child(7) { animation-duration: 0.85s; }
.dj-equalizer span:nth-child(8) { animation-duration: 0.6s; }

@keyframes djEq {
    from { height: 3px; }
    to   { height: 16px; }
}

#dj-widget.dj-speaking .dj-equalizer span {
    background: linear-gradient(to top, #00f5d4, #9d4edd);
    animation-duration: 0.3s;
}

/* Contenido de texto */
.dj-content { flex: 1; overflow: hidden; }

.dj-name {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 2px;
    line-height: 1;
}

.dj-name span {
    font-weight: 300;
    color: #9d4edd;
}

.dj-subtitle {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    margin: 0 0 8px;
}

.dj-idle-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Overlay del discurso */
.dj-speech-overlay {
    background: rgba(0, 245, 212, 0.06);
    border: 1px solid rgba(0, 245, 212, 0.2);
    border-radius: 8px;
    padding: 8px 10px;
    animation: djTextFadeIn 0.3s ease;
}

@keyframes djTextFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}

#dj-announcement-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    margin: 0;
}

/* Responsive: ocultar en móvil (el reproductor ya ocupa espacio) */
@media (max-width: 900px) {
    #dj-widget {
        width: 200px;
        right: 10px;
        top: 70px;
    }
    .dj-avatar-wrapper { width: 60px; height: 60px; }
    #dj-avatar-img     { width: 60px; height: 60px;  }
    .dj-ring-1 { width: 70px;  height: 70px;  }
    .dj-ring-2 { width: 80px;  height: 80px;  }
    .dj-ring-3 { width: 90px;  height: 90px;  }
}

@media (max-width: 600px) {
    #dj-widget { display: none; } /* En móvil muy pequeño se oculta para no interferir */
}
