* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary-color: #0C21AB;
    --secondary-color: #0A29F5;
    --topbar-bg: linear-gradient(135deg, #0C21AB 0%, #0A29F5 100%);
    --menu-bg: #ffffff;
    --menu-text: #333333;
    --player-bg: #1a1a2e;
    --player-text: #ffffff;
    --body-bg: #f5f5f5;
    --footer-bg: #111111;
    --footer-text: #aaaaaa;
    --title-color: #333333;
    --gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--body-bg);
    color: var(--menu-text);
    overflow-x: hidden;
    padding-bottom: 120px;
    transition: background-color 0.3s;
}

/* Top Bar */
.top-bar { background: var(--topbar-bg); color: white; padding: 10px 0; font-size: 14px; transition: background 0.3s; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.top-bar-content { display: flex; justify-content: space-between; align-items: center; }
.social-icons-top a { color: white; margin-left: 15px; font-size: 18px; transition: transform 0.3s; }
.social-icons-top a:hover { transform: translateY(-3px); color: #ffd700; }

/* Navegación */
nav {
    background: var(--menu-bg); box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky; top: 0; z-index: 1000; transition: background-color 0.3s;
}
.nav-container { 
    display: flex; justify-content: center; align-items: center; 
    padding: 15px 0; flex-wrap: wrap; gap: 20px;
}
.menu { display: flex; list-style: none; gap: 30px; align-items: center; }
.menu a { text-decoration: none; color: var(--menu-text); font-weight: 600; font-size: 16px; transition: color 0.3s; position: relative; }
.menu a:hover { color: var(--primary-color); }
.menu a::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 3px;
    background: var(--gradient); transition: width 0.3s; border-radius: 2px;
}
.menu a:hover::after { width: 100%; }

/* Reloj */
.nav-clock {
    display: flex; align-items: center; gap: 10px; padding: 8px 20px;
    background: var(--gradient); color: white; border-radius: 25px;
    font-weight: 600; font-size: 16px; box-shadow: 0 3px 10px rgba(12, 33, 171, 0.3);
    margin: 0 20px;
}
.nav-clock i { font-size: 18px; }
.clock-time { font-family: 'Courier New', monospace; letter-spacing: 1px; }

/* Redes Sociales */
.nav-social { display: flex; gap: 15px; align-items: center; }
.nav-social a {
    width: 40px; height: 40px; background: var(--gradient); color: white;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 18px; transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 3px 10px rgba(12, 33, 171, 0.3);
}
.nav-social a:hover { transform: translateY(-3px) scale(1.1); box-shadow: 0 5px 15px rgba(12, 33, 171, 0.4); }

/* Slider */
.slider-container { width: 100%; height: 350px; position: relative; overflow: hidden; background: #000; }
.slider { width: 100%; height: 100%; position: relative; }
.slide {
    position: absolute; width: 100%; height: 100%; opacity: 0;
    transition: opacity 1s ease-in-out; background-size: cover;
    background-position: center; background-repeat: no-repeat;
}
.slide.active { opacity: 1; }
.slider-controls {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 10px; z-index: 10;
}
.slider-dot {
    width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.5);
    cursor: pointer; transition: all 0.3s;
}
.slider-dot.active { background: white; transform: scale(1.2); }

/* Secciones */
.top5-section, .locutores-section, .noticias-section { padding: 60px 0; }
.locutores-section, .noticias-section { background: linear-gradient(135deg, rgba(0,0,0,0.03) 0%, rgba(0,0,0,0.08) 100%); }
.section-title {
    text-align: center; font-size: 36px; color: var(--title-color);
    margin-bottom: 40px; position: relative; transition: color 0.3s;
}
.section-title::after {
    content: ''; display: block; width: 80px; height: 4px;
    background: var(--gradient); margin: 15px auto; border-radius: 2px;
}
.top5-grid, .locutores-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; }
.top5-item, .locutor-card {
    background: var(--menu-bg); border-radius: 15px; overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1); transition: transform 0.3s; position: relative;
}
.top5-item:hover, .locutor-card:hover { transform: translateY(-10px); }
.top5-rank {
    position: absolute; top: 10px; left: 10px; width: 40px; height: 40px;
    background: var(--gradient); color: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; font-size: 18px; z-index: 10;
}
.top5-img, .locutor-img { width: 100%; height: 200px; object-fit: cover; }
.locutor-img { height: 250px; }
.top5-info, .locutor-info { padding: 20px; text-align: center; }
.top5-title, .locutor-name { font-size: 18px; font-weight: bold; margin-bottom: 5px; color: var(--title-color); }
.top5-artist, .locutor-program { color: #666; font-size: 14px; }

/* Noticias */
.noticias-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.noticia-card {
    background: var(--menu-bg); border-radius: 15px; overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1); transition: transform 0.3s, box-shadow 0.3s;
}
.noticia-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.15); }
.noticia-img { width: 100%; height: 220px; object-fit: cover; }
.noticia-content { padding: 25px; }
.noticia-date {
    color: var(--primary-color); font-size: 13px; font-weight: 600;
    margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.noticia-title { font-size: 20px; font-weight: bold; color: var(--title-color); margin-bottom: 12px; line-height: 1.3; }
.noticia-excerpt { color: #666; font-size: 14px; line-height: 1.6; margin-bottom: 15px; }
.noticia-read-more {
    display: inline-flex; align-items: center; gap: 8px; color: var(--primary-color);
    text-decoration: none; font-weight: 600; transition: gap 0.3s;
}
.noticia-read-more:hover { gap: 12px; }

/* Footer */
footer { background: var(--footer-bg); color: var(--footer-text); padding: 40px 0 20px; transition: background-color 0.3s, color 0.3s; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 30px; }
.footer-section h3 { color: var(--primary-color); margin-bottom: 20px; font-size: 20px; }
.footer-section p, .footer-section a { color: var(--footer-text); text-decoration: none; line-height: 1.8; transition: color 0.3s; }
.footer-section a:hover { color: white; }
.whatsapp-btn {
    display: inline-flex; align-items: center; gap: 10px; background: #25d366;
    color: white; padding: 10px 20px; border-radius: 25px; margin-top: 10px;
    text-decoration: none; font-weight: bold; transition: transform 0.3s;
}
.whatsapp-btn:hover { transform: scale(1.05); }
.footer-social { display: flex; gap: 15px; margin-top: 20px; }
.footer-social a {
    width: 40px; height: 40px; background: var(--gradient); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: white; transition: transform 0.3s;
}
.footer-social a:hover { transform: translateY(-3px); }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid #333; color: #666; }

/* Player */
.floating-player {
    position: fixed; bottom: 0; left: 0; right: 0; background: var(--player-bg);
    box-shadow: 0 -5px 30px rgba(0,0,0,0.4); z-index: 9999;
    border-top: 3px solid var(--primary-color); height: 100px; transition: background-color 0.3s;
}
#fullVisualizer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; opacity: 0.7; }
.player-overlay {
    position: relative; z-index: 2; display: flex; align-items: center;
    justify-content: space-between; max-width: 1200px; margin: 0 auto;
    padding: 0 20px; height: 100%; background: rgba(0, 0, 0, 0.3); backdrop-filter: blur(3px);
}
.player-info { display: flex; align-items: center; gap: 15px; flex: 1; }
.player-logo {
    width: 50px; height: 50px; background: var(--gradient); border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; color: white; font-size: 24px; flex-shrink: 0;
}
.player-text h4 { color: var(--player-text); font-size: 16px; margin-bottom: 3px; text-shadow: 1px 1px 2px rgba(0,0,0,0.8); }
.player-text p { color: var(--player-text); font-size: 13px; text-shadow: 1px 1px 2px rgba(0,0,0,0.8); opacity: 0.9; }
.player-controls { display: flex; align-items: center; gap: 20px; }
.control-btn {
    background: none; border: none; color: var(--player-text); font-size: 24px;
    cursor: pointer; transition: all 0.2s; text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}
.control-btn:hover { color: #00ff66; transform: scale(1.1); }
.play-btn {
    width: 60px; height: 60px; background: var(--gradient); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 28px;
    box-shadow: 0 5px 20px rgba(12, 33, 171, 0.5);
}
.volume-control { display: flex; align-items: center; gap: 10px; color: var(--player-text); }
.volume-slider {
    width: 100px; height: 4px; background: rgba(255,255,255,0.3);
    border-radius: 2px; outline: none; -webkit-appearance: none;
}
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none; width: 14px; height: 14px;
    background: #00ff66; border-radius: 50%; cursor: pointer;
}

/* WhatsApp Flotante */
.whatsapp-float {
    position: fixed; bottom: 120px; right: 20px; width: 65px; height: 65px;
    background-color: #25d366; color: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px; box-shadow: 0 4px 15px rgba(37, 211, 102, 0.5);
    z-index: 10000; transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none; animation: bounce 2s infinite;
}
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(37, 211, 102, 0.7); animation: none; }
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Botón Instalar PWA */
.pwa-install-btn {
    position: fixed; bottom: 200px; right: 20px; width: 60px; height: 60px;
    background: var(--gradient); color: white; border-radius: 50%;
    display: none; align-items: center; justify-content: center;
    font-size: 28px; box-shadow: 0 4px 15px rgba(12, 33, 171, 0.5);
    z-index: 10000; cursor: pointer; border: none;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: pulse-install 2s infinite;
}
.pwa-install-btn:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(12, 33, 171, 0.7); }
.pwa-install-btn.show { display: flex; }
@keyframes pulse-install {
    0%, 100% { box-shadow: 0 4px 15px rgba(12, 33, 171, 0.5); }
    50% { box-shadow: 0 4px 25px rgba(12, 33, 171, 0.8); }
}

/* Modal de Instalación PWA */
.pwa-modal {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85); z-index: 10003;
    justify-content: center; align-items: center; padding: 20px;
}
.pwa-modal.show { display: flex; }
.pwa-modal-content {
    background: white; border-radius: 20px; padding: 30px; max-width: 500px;
    width: 100%; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease-out;
}
@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.pwa-modal-icon {
    width: 100px; height: 100px; margin: 0 auto 20px;
    background: var(--gradient); border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 50px; color: white;
}
.pwa-modal h2 { color: var(--primary-color); margin-bottom: 15px; font-size: 24px; }
.pwa-modal p { color: #666; margin-bottom: 25px; line-height: 1.6; }
.pwa-modal-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.pwa-btn {
    padding: 12px 30px; border: none; border-radius: 25px;
    font-size: 16px; font-weight: 600; cursor: pointer; transition: transform 0.2s;
}
.pwa-btn-primary { background: var(--gradient); color: white; }
.pwa-btn-secondary { background: #f0f0f0; color: #666; }
.pwa-btn:hover { transform: translateY(-2px); }
.pwa-instructions {
    margin-top: 20px; padding: 15px; background: #f9f9f9;
    border-radius: 10px; text-align: left; font-size: 14px;
}
.pwa-instructions h4 { color: var(--primary-color); margin-bottom: 10px; }
.pwa-instructions ol { margin-left: 20px; color: #666; line-height: 1.8; }

/* Login Modal */
.login-modal {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.9); z-index: 10002;
    justify-content: center; align-items: center;
}
.login-box {
    background: white; padding: 40px; border-radius: 15px;
    width: 90%; max-width: 400px; box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    text-align: center;
}
.login-box h2 { color: var(--primary-color); margin-bottom: 10px; font-size: 28px; }
.login-box p { color: #666; margin-bottom: 30px; }
.login-box .form-group { margin-bottom: 20px; text-align: left; }
.login-box label { display: block; margin-bottom: 8px; font-weight: 600; color: #333; }
.login-box input {
    width: 100%; padding: 12px; border: 2px solid #ddd;
    border-radius: 8px; font-size: 16px; transition: border-color 0.3s;
}
.login-box input:focus { outline: none; border-color: var(--primary-color); }
.login-box .btn-login {
    width: 100%; padding: 14px; background: var(--gradient); color: white;
    border: none; border-radius: 8px; font-size: 16px; font-weight: 600;
    cursor: pointer; transition: transform 0.2s;
}
.login-box .btn-login:hover { transform: translateY(-2px); }
.login-box .error-msg { color: #f44336; margin-top: 15px; display: none; }

/* Panel Admin */
.admin-panel {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85); z-index: 10001; overflow: hidden;
}
.admin-layout { display: flex; height: 100%; max-width: 1400px; margin: 0 auto; }
.admin-sidebar {
    width: 280px; background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    color: white; display: flex; flex-direction: column; overflow-y: auto;
}
.admin-logo { padding: 30px 20px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.1); }
.admin-logo-icon {
    width: 80px; height: 80px; background: var(--gradient); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 15px; font-size: 40px; box-shadow: 0 5px 20px rgba(12, 33, 171, 0.4);
}
.admin-logo h2 {
    font-size: 22px; margin-bottom: 5px; background: var(--gradient);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.admin-logo p { font-size: 12px; color: #aaa; }
.admin-menu { flex: 1; padding: 20px 0; }
.admin-menu-item {
    display: flex; align-items: center; gap: 15px; padding: 15px 25px;
    color: #ccc; cursor: pointer; transition: all 0.3s;
    border-left: 4px solid transparent; font-size: 15px;
}
.admin-menu-item:hover { background: rgba(255,255,255,0.05); color: white; }
.admin-menu-item.active {
    background: rgba(12, 33, 171, 0.1); color: white;
    border-left-color: var(--primary-color);
}
.admin-menu-item i { font-size: 20px; width: 24px; }
.admin-sidebar-footer { padding: 20px; border-top: 1px solid rgba(255,255,255,0.1); }
.btn-logout {
    width: 100%; padding: 12px; background: rgba(244, 67, 54, 0.2);
    color: #f44336; border: 1px solid #f44336; border-radius: 8px;
    cursor: pointer; font-weight: 600; transition: all 0.3s;
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-logout:hover { background: #f44336; color: white; }
.admin-content { flex: 1; background: white; overflow-y: auto; padding: 40px; }
.admin-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 30px; padding-bottom: 20px; border-bottom: 2px solid #eee;
}
.admin-header h2 { color: #333; font-size: 28px; }
.close-admin { font-size: 30px; cursor: pointer; color: #666; transition: color 0.3s; }
.close-admin:hover { color: #f44336; }
.admin-section { display: none; }
.admin-section.active { display: block; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 600; color: #333; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 10px; border: 1px solid #ddd;
    border-radius: 5px; font-family: inherit;
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group input[type="color"] { height: 45px; padding: 2px; cursor: pointer; }
.form-group input[type="file"] {
    padding: 10px; background: #f9f9f9; border: 2px dashed #ccc;
    border-radius: 5px; cursor: pointer;
}
.btn-admin {
    padding: 10px 20px; background: var(--gradient); color: white;
    border: none; border-radius: 5px; cursor: pointer; font-weight: 600;
    margin-right: 10px; margin-bottom: 10px;
}
.item-list { margin-top: 20px; }
.item-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px; background: #f9f9f9; border-radius: 5px;
    margin-bottom: 10px; border-left: 4px solid var(--primary-color);
}
.item-actions button {
    margin-left: 5px; padding: 6px 12px; border: none;
    border-radius: 4px; cursor: pointer; color: white; font-size: 14px;
}
.btn-edit { background: #2196f3; }
.btn-delete { background: #f44336; }
.btn-hide { background: #ff9800; }
.btn-show { background: #4caf50; }
.admin-toggle {
    position: fixed; bottom: 120px; left: 20px; width: 50px; height: 50px;
    background: var(--gradient); color: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 10000; box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s; font-size: 20px;
}
.admin-toggle:hover { transform: scale(1.1) rotate(90deg); }
.slider-preview, .noticia-preview {
    width: 100%; max-height: 150px; object-fit: cover;
    border-radius: 5px; margin-top: 10px; border: 1px solid #ddd; display: none;
}
.color-section {
    background: #f9f9f9; padding: 20px; border-radius: 10px; margin-bottom: 20px;
}
.color-section h4 { margin-bottom: 15px; color: var(--primary-color); font-size: 18px; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.2); opacity: 0.7; } }
.live-indicator {
    display: inline-block; width: 10px; height: 10px; background: #00ff66;
    border-radius: 50%; margin-right: 5px; animation: pulse 1.5s infinite;
}

@media (max-width: 768px) {
    .menu { display: none; }
    .top5-grid, .locutores-grid, .noticias-grid { grid-template-columns: 1fr; }
    .slider-container { height: 200px; }
    .player-overlay { flex-wrap: wrap; justify-content: center; gap: 10px; padding: 10px; }
    .volume-control { display: none; }
    .floating-player { height: auto; min-height: 90px; }
    .whatsapp-float { bottom: 110px; right: 15px; width: 55px; height: 55px; font-size: 30px; }
    .admin-toggle { bottom: 110px; left: 15px; width: 45px; height: 45px; }
    .nav-clock { margin: 10px 0; font-size: 14px; padding: 6px 15px; }
    .nav-social { margin: 10px 0; }
    .nav-social a { width: 35px; height: 35px; font-size: 16px; }
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; max-height: 200px; }
    .admin-content { padding: 20px; }
    .admin-logo { padding: 15px; }
    .admin-logo-icon { width: 50px; height: 50px; font-size: 24px; }
    .admin-logo h2 { font-size: 16px; }
    .admin-menu { display: flex; overflow-x: auto; padding: 10px; }
    .admin-menu-item { padding: 10px 15px; white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; }
    .admin-menu-item.active { border-left: none; border-bottom-color: var(--primary-color); }
    .pwa-install-btn { bottom: 190px; right: 15px; width: 50px; height: 50px; font-size: 22px; }
}