:root {
    --primary-color: #d60000; /* Rojo del logo */
    --bg-dark: #000000;
    --bg-darker: #111111;
    --bg-card: #181818;
    --text-main: #ffffff;
    --text-muted: #aaaaaa;
    --transition-speed: 0.3s;
}

body.light-mode {
    --bg-dark: #f0f0f0;
    --bg-darker: #ffffff;
    --bg-card: #e8e8e8;
    --text-main: #111111;
    --text-muted: #555555;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    position: relative; /* Para el fondo animado */
    overflow-x: hidden;
    padding-top: 0; /* El nav es sticky, no fixed, no necesita padding */
}

/* Background animado muy llamativo con el logo */
body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 70vw;
    height: 70vw;
    max-width: 800px;
    max-height: 800px;
    background: url('images/logo.png') center/contain no-repeat;
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: heartbeat-spin 10s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 30px var(--primary-color));
}

body::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vw;
    background: radial-gradient(circle, rgba(214,0,0,0.12) 0%, rgba(0,0,0,0) 70%);
    z-index: -2;
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: pulse-glow 4s ease-in-out infinite alternate;
}

@keyframes heartbeat-spin {
    0% { 
        transform: translate(-50%, -50%) rotate(-8deg) scale(0.9); 
        filter: drop-shadow(0 0 10px var(--primary-color)) brightness(1); 
    }
    50% { 
        transform: translate(-50%, -50%) rotate(5deg) scale(1.15); 
        filter: drop-shadow(0 0 80px var(--primary-color)) brightness(1.8); 
    }
    100% { 
        transform: translate(-50%, -50%) rotate(-12deg) scale(1.05); 
        filter: drop-shadow(0 0 40px var(--primary-color)) brightness(1.3); 
    }
}

@keyframes pulse-glow {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.4; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

/* Navbar Superior */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: var(--bg-darker);
    border-bottom: 2px solid var(--primary-color);
    position: relative;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.logo-img {
    height: 90px;
    width: auto;
    transition: transform var(--transition-speed);
    filter: drop-shadow(0 0 10px rgba(214, 0, 0, 0.3));
}

.logo-img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 15px rgba(214, 0, 0, 0.6));
}

.social-links a {
    color: var(--text-main);
    margin-left: 1rem;
    font-size: 1.2rem;
    transition: color var(--transition-speed);
}

.social-links a:hover {
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 5%;
}

.content-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.news-section {
    flex: 1;
    min-width: 0;
}

/* Sidebar Ads */
.ads-sidebar {
    width: 350px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.ad-widget {
    background: var(--bg-card);
    border: 1px solid #333;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.ad-widget:hover {
    transform: translateY(-5px);
}

.ad-label {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(214, 0, 0, 0.9); /* primary color */
    color: #fff;
    font-size: 0.7rem;
    padding: 3px 8px;
    font-weight: 700;
    text-transform: uppercase;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 1px;
    border-bottom-left-radius: 4px;
    z-index: 2;
}

.ad-widget img {
    width: 100%;
    height: auto;
    display: block;
}

.sticky-ad {
    /* ya no necesita sticky individual, toda la barra lo es */
}

@media (max-width: 900px) {
    .content-layout {
        flex-direction: column;
    }
    .ads-sidebar {
        width: 100%;
        flex-direction: column;
        position: static;
        max-height: none;
        overflow-y: visible;
    }
    .ad-widget {
        width: 100%;
    }
    .sticky-ad {
        position: static;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    padding: 1.5rem 0;
    flex-wrap: wrap;
}

.pag-btn {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid #444;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Oswald', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.pag-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

.pag-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(214, 0, 0, 0.4);
}

.pag-dots {
    color: var(--text-muted);
    font-size: 1.2rem;
    padding: 0 0.3rem;
}

.section-title {
    margin-bottom: 3rem;
    border-left: 5px solid var(--primary-color);
    padding-left: 1rem;
}

.section-title h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 3rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
}

.yellow-highlight {
    color: var(--primary-color);
}

/* News Grid (Magazine Style) */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}


.news-card {
    background: var(--bg-card);
    border: 1px solid #222;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color var(--transition-speed);
}

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

.news-img-container {
    overflow: hidden;
    position: relative;
}

.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    filter: grayscale(80%);
    transition: filter 0.5s, transform 0.5s;
}

.news-card:hover .news-image {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.news-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-date {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.news-title {
    font-size: 1.25rem;
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.news-title a {
    color: var(--text-main);
    text-decoration: none;
    transition: color var(--transition-speed);
}

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

.news-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Header Radio Player */
/* Header Radio Player */
.header-player.winamp-player {
    display: flex;
    flex: 1;
    max-width: 800px;
    margin: 0 2rem;
    justify-content: space-between;
    align-items: center;
    background: #2a2b2d;
    background-image: linear-gradient(to bottom, #3c3d40 0%, #252628 50%, #1b1c1e 100%);
    border: 2px solid #0f1011;
    box-shadow: inset 1px 1px 0 #5a5c5f, inset -1px -1px 0 #151617, 0 4px 12px rgba(0, 0, 0, 0.6);
    padding: 6px 12px;
    border-radius: 4px; /* Retro blocky corners */
    gap: 12px;
    position: relative;
    overflow: hidden;
    height: 68px;
    box-sizing: border-box;
    transition: box-shadow 0.3s ease;
}

.header-player.winamp-player.playing {
    box-shadow: inset 1px 1px 0 #5a5c5f, inset -1px -1px 0 #151617, 0 0 12px rgba(0, 230, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.7);
}

.winamp-display {
    background-color: #050a05;
    border: 2px solid #1c1d1f;
    border-top-color: #090a0a;
    border-left-color: #090a0a;
    border-right-color: #4a4c4e;
    border-bottom-color: #4a4c4e;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-grow: 1;
    height: 48px;
    box-sizing: border-box;
    font-family: 'Share Tech Mono', monospace;
    overflow: hidden;
    position: relative;
    border-radius: 2px;
}

.winamp-status {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
    font-size: 0.75rem;
    line-height: 1;
    border-right: 1px solid #1c2e1c;
    padding-right: 6px;
    height: 100%;
}

.status-indicator {
    opacity: 0.15;
    color: #00ff00;
    font-weight: bold;
    transition: opacity 0.15s ease, text-shadow 0.15s ease;
}

.status-indicator.active {
    opacity: 1;
    text-shadow: 0 0 5px #00ff00;
}

.winamp-display .player-info {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;
    min-width: 0;
    gap: 2px 8px;
    height: 100%;
    align-content: center;
}

.winamp-display .live-badge {
    color: #00ff00;
    font-size: 0.65rem;
    font-weight: bold;
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 0;
}

.winamp-display .live-badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #00ff00;
    border-radius: 50%;
    box-shadow: 0 0 5px #00ff00;
    animation: winamp-pulse-dot 1.5s infinite alternate ease-in-out;
}

@keyframes winamp-pulse-dot {
    0% { transform: scale(0.9); opacity: 0.5; }
    100% { transform: scale(1.1); opacity: 1; }
}

.winamp-display .station-name {
    color: #00ff00;
    font-size: 0.65rem;
    font-family: 'Share Tech Mono', monospace;
    opacity: 0.7;
    font-weight: normal;
    letter-spacing: 0.5px;
}

.winamp-display .now-playing {
    width: 100%;
    color: #00ff00;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    margin-top: 0;
    white-space: nowrap;
    overflow: hidden;
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    max-width: 100%;
    line-height: 1.2;
    position: relative;
}

.now-playing-scroll {
    display: inline-block;
    white-space: nowrap;
    will-change: transform;
}

@keyframes winamp-bounce {
    0%, 15% { transform: translate3d(0, 0, 0); }
    85%, 100% { transform: translate3d(var(--scroll-dist, 0px), 0, 0); }
}

.winamp-display .now-playing strong {
    color: #00ff00;
    font-weight: bold;
}

.oscilloscope-container {
    background-color: #050a05;
    border: 2px solid #1c1d1f;
    border-top-color: #090a0a;
    border-left-color: #090a0a;
    border-right-color: #4a4c4e;
    border-bottom-color: #4a4c4e;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    height: 48px;
    box-sizing: border-box;
    border-radius: 2px;
}

#oscilloscope {
    display: block;
    width: 150px;
    height: 40px;
    background: #000;
}

.winamp-player .player-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.winamp-player .control-btn {
    background: linear-gradient(to bottom, #4c4d50 0%, #2f3032 50%, #1e1f21 100%);
    border: 1px solid #111;
    box-shadow: inset 1px 1px 0 #6d6f72, 0 1px 2px rgba(0, 0, 0, 0.4);
    color: #c0c2c5;
    width: 36px;
    height: 32px;
    border-radius: 3px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: none;
}

.winamp-player .control-btn:hover {
    background: linear-gradient(to bottom, #57595c 0%, #3a3b3e 50%, #28292c 100%);
    color: #fff;
    transform: none;
    box-shadow: inset 1px 1px 0 #7b7d81, 0 1px 2px rgba(0, 0, 0, 0.4);
}

.winamp-player .control-btn:active {
    background: #171819;
    box-shadow: inset 1px 1px 2px #000;
    color: #00ff00;
    padding-top: 2px;
    padding-left: 2px;
    transform: none;
}

.winamp-player .volume-control {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #171819;
    border: 1px solid #2c2d2f;
    border-top-color: #0a0b0b;
    border-left-color: #0a0b0b;
    border-right-color: #4c4e50;
    border-bottom-color: #4c4e50;
    padding: 4px 8px;
    border-radius: 2px;
    height: 28px;
    box-sizing: border-box;
}

.winamp-player .volume-control i {
    font-size: 0.75rem;
    color: #8a8d90;
    transition: color 0.2s;
}

.winamp-player .volume-control:hover i {
    color: #00ff00;
}

.winamp-player input[type=range] {
    -webkit-appearance: none;
    width: 70px;
    background: transparent;
    cursor: pointer;
    margin: 0;
    height: 12px;
}

.winamp-player input[type=range]:focus {
    outline: none;
}

.winamp-player input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: #090a0a;
    border: 1px solid #3c3d3f;
    border-bottom-color: #4c4e50;
    border-right-color: #4c4e50;
    border-radius: 1px;
}

.winamp-player input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 14px;
    width: 8px;
    background: linear-gradient(to right, #7a7c7e 0%, #484a4c 37.5%, #d60000 37.5%, #d60000 62.5%, #484a4c 62.5%, #383a3c 100%);
    border: 1px solid #000;
    box-shadow: inset 1px 1px 0 #aaa;
    border-radius: 1px;
    cursor: pointer;
    margin-top: -5px;
}

.winamp-player input[type=range]:hover::-webkit-slider-thumb {
    background: linear-gradient(to right, #8a8c8e 0%, #585a5c 37.5%, #ff0000 37.5%, #ff0000 62.5%, #585a5c 62.5%, #484a4c 100%);
}

.winamp-player .progress-bar-fake {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #090a0a;
    border-top: 1px solid #1a1b1c;
}

.winamp-player .progress-fill {
    height: 100%;
    background: linear-gradient(to right, #005500, #00e600);
    width: 0%;
}

.pulse-animation {
    animation: fill-infinite 6s linear infinite;
}

@keyframes fill-infinite {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Responsive adjustments */
@media (max-width: 850px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    .header-player {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }
}
@media (max-width: 650px) {
    .header-player.winamp-player {
        flex-wrap: wrap;
        height: auto;
        padding: 8px 12px;
        gap: 8px 12px;
        align-items: center;
    }
    
    .winamp-display {
        flex: 0 0 100%;
        width: 100%;
        height: 44px;
    }
    
    .oscilloscope-container {
        flex: 1 1 auto;
        height: 38px;
        min-width: 120px;
    }
    
    #oscilloscope {
        width: 100%;
        height: 30px;
    }
    
    .winamp-player .player-controls {
        flex: 1 1 auto;
        justify-content: flex-end;
        gap: 6px;
    }
    
    .winamp-player .control-btn {
        width: 32px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .winamp-player .volume-control {
        display: flex !important; /* Force show on mobile */
        height: 24px;
        padding: 3px 6px;
    }
    
    .winamp-player input[type=range] {
        width: 55px;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
}

.modal.active {
    display: flex;
}

.modal-content {
    width: 90%;
    height: 85%;
    margin: auto;
    background: var(--bg-dark);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    border: 2px solid var(--primary-color);
}

.native-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    background: var(--bg-dark);
}

.native-content img {
    max-width: 100%;
    height: auto;
}

.close-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 1rem;
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: background var(--transition-speed);
}

.close-btn:hover {
    background: #a00000;
}

#news-iframe {
    width: 100%;
    flex-grow: 1;
    border: none;
    background: #fff; /* Al cargar sitios de terceros suele ser mejor fondo blanco */
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    background: var(--bg-card);
    color: var(--text-color);
    font-family: 'Oswald', sans-serif;
    letter-spacing: 1px;
    border-top: 1px solid #333;
}
