:root {
    /* Colors - Light Mode (Default) */
    --primary-color: #ff6700;
    --primary-hover: #e65100;
    --bg-color: #ffffff;
    --bg-secondary: #f4f4f4;
    --text-color: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #888888;
    --border-color: #e5e5e5;
    --header-bg: #ffffff;
    --footer-bg: #ffffff;
    --card-bg: #ffffff;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --player-bg: #ffffff;
    --player-border: #eaeaea;
    --nav-link-color: #333333;
    --rank-number-color: #000000;
}

[data-theme="dark"] {
    /* Colors - Dark Mode */
    --bg-color: #121212;
    --bg-secondary: #1e1e1e;
    --text-color: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #888888;
    --border-color: #333333;
    --header-bg: #121212;
    --footer-bg: #121212;
    --card-bg: #1e1e1e;
    --shadow: 0 4px 12px rgba(0,0,0,0.3);
    --player-bg: #121212;
    --player-border: #333333;
    --nav-link-color: #e0e0e0;
    --rank-number-color: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    padding-bottom: 90px; /* Space for sticky player */
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 45px;
    display: block;
}

.main-nav ul {
    display: flex;
    gap: 32px;
}

.main-nav a {
    font-weight: 500;
    font-size: 15px;
    color: var(--nav-link-color);
    transition: color 0.2s;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    gap: 15px;
}

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

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.section-header h2 {
    font-size: 24px;
    font-weight: 700;
    position: relative;
}

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

/* Hero Grid */
.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 40px;
}

.news-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.main-news {
    height: 400px;
}

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

.news-column .news-card {
    height: 190px;
}

.news-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
}

.category {
    background-color: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: inline-block;
}

.news-overlay h2 {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
}

.news-overlay h3 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

/* News Grid (General) */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.news-grid .news-card {
    height: auto;
    display: flex;
    flex-direction: column;
}

.news-grid .img-wrapper {
    height: 180px;
    overflow: hidden;
}

.news-grid .news-body {
    padding: 15px;
}

.news-grid h3 {
    font-size: 18px;
    margin-top: 10px;
    color: var(--text-color);
}

/* Ranking Preview (Home) */
.top20-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.song-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.song-img {
    position: relative;
    height: 200px;
}

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

.overlay-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.song-card:hover .overlay-text {
    opacity: 1;
}

.play-preview-btn {
    background-color: var(--primary-color);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
}

.song-info {
    padding: 15px;
    display: flex;
    gap: 10px;
}

.rank {
    font-size: 32px;
    font-weight: 900;
    color: var(--primary-color);
    line-height: 1;
}

.details h4 {
    font-size: 16px;
    margin-bottom: 4px;
    color: var(--text-color);
}

.details p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Sections Grid */
.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.section-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 150px;
    cursor: pointer;
}

.section-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.section-card:hover img {
    transform: scale(1.1);
}

.section-overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.section-overlay h3 {
    color: white;
    font-size: 18px;
    text-align: center;
}

/* Podcasts Grid */
.podcasts-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
}

.podcast-item {
    min-width: 200px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.podcast-item img {
    width: 100%;
    border-radius: 12px;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    cursor: pointer;
}

.podcast-item:hover .play-overlay {
    opacity: 1;
}

/* Footer */
.main-footer {
    background-color: var(--footer-bg);
    padding: 60px 0 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.footer-logo {
    text-align: center;
    margin-bottom: 20px;
}

.footer-logo img {
    max-width: 250px;
    height: auto;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-col h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-color);
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: var(--text-secondary);
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
}

.app-buttons {
    display: flex;
    gap: 10px;
}

.app-buttons img {
    height: 40px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Sticky Player */
.sticky-player {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--player-bg);
    border-top: 1px solid var(--player-border);
    padding: 15px 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

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

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

.player-logo {
    height: 40px;
}

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

.play-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timer {
    font-family: monospace;
    color: var(--text-secondary);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
}

/* --- Las 20 Latinas Ranking Styles --- */

/* Banner */
.ranking-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff8e53 100%);
    padding: 60px 20px;
    border-radius: 16px;
    margin-bottom: 40px;
    margin-top: 30px;
    text-align: center;
    color: white;
    box-shadow: 0 10px 30px rgba(255, 103, 0, 0.2);
}

.banner-content .banner-subtitle {
    display: block;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
    opacity: 0.9;
}

.banner-content h1 {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.banner-content p {
    font-size: 18px;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

/* Table Container */
.ranking-table-container {
    background-color: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 60px;
}

/* Header Row */
.ranking-header {
    display: flex;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* List Rows */
.full-ranking-list {
    display: flex;
    flex-direction: column;
}

.ranking-row {
    display: flex;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.ranking-row:last-child {
    border-bottom: none;
}

.ranking-row:hover {
    background-color: var(--bg-secondary);
}

/* Column Widths & Styles */
.h-pos, .cell-pos {
    width: 60px;
    text-align: center;
    flex-shrink: 0;
}

.cell-pos {
    font-size: 24px;
    font-weight: 900;
    color: var(--primary-color);
}

.h-song, .cell-song {
    flex: 2;
    padding-left: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.song-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.song-details h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-color);
}

.song-details p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.song-duration {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.h-votes, .cell-votes {
    flex: 1.5;
    padding: 0 20px;
}

.vote-bar-container {
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.vote-bar {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 4px;
}

.vote-stats {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Videos Section */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.video-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.video-card:hover {
    transform: translateY(-5px);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumbnail .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.6);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: 2px solid white;
    opacity: 0.8;
    transition: all 0.3s;
}

.video-card:hover .play-icon {
    background: var(--primary-color);
    border-color: var(--primary-color);
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Stations Section */
.stations-banner {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
    margin-bottom: 40px;
}

.stations-banner h3 {
    margin-bottom: 30px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
}

.stations-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.stations-logos img {
    height: 40px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s;
    cursor: pointer;
}

.stations-logos img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

.h-actions, .cell-actions {
    width: 220px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Buttons */
.action-btn {
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.play-btn-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.play-btn-small:hover {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.vote-btn-small {
    padding: 8px 16px;
    border-radius: 50px;
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vote-btn-small:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Listeners Counter Modern Design */
.listeners-counter {
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.listeners-counter:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(255, 103, 0, 0.2);
}

.listeners-counter i {
    font-size: 24px;
    color: var(--primary-color);
    background: rgba(255, 103, 0, 0.1);
    padding: 10px;
    border-radius: 50%;
    transition: all 0.3s;
}

.listeners-counter:hover i {
    background: var(--primary-color);
    color: white;
}

.listeners-counter .counter-text {
    display: flex;
    flex-direction: column;
}

.listeners-counter .count {
    font-size: 22px;
    font-weight: 900;
    color: white;
    line-height: 1;
    font-family: 'Roboto', sans-serif;
}

.listeners-counter .label {
    font-size: 11px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
    font-weight: 500;
}

/* Live Pulse Indicator */
.listeners-counter::after {
    content: '';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 8px;
    height: 8px;
    background-color: #28a745;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    
    .header-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .main-nav ul {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .ranking-header {
        display: none;
    }

    .ranking-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 20px;
        position: relative;
    }

    .cell-pos {
        position: absolute;
        top: 20px;
        left: 20px;
        font-size: 18px;
    }

    .cell-song {
        width: 100%;
        padding-left: 0;
        margin-left: 30px;
    }
    
    .cell-votes {
        width: 100%;
        padding: 0;
    }
    
    .cell-actions {
        width: 100%;
        justify-content: flex-start;
    }
}