* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; height: 100%; }
:root {
    --bg-primary: #000000;
    --bg-secondary: rgba(10, 10, 10, 0.85);
    --bg-card: rgba(17, 17, 17, 0.9);
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --text-muted: #555555;
    --accent: #7A8B5C;
    --accent-glow: rgba(122, 139, 92, 0.3);
    --border: rgba(34, 34, 34, 0.8);
    --border-light: #333333;
    --header-height: 70px;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    padding-bottom: 100px;
    -webkit-font-smoothing: antialiased;
    position: relative;
    min-height: 100%;
    overflow-x: hidden;
}

/* --- ZONA DE ACTIVACIÓN SUPERIOR --- */
.top-hover-trigger {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    z-index: 1000;
}
.top-hover-trigger:hover ~ header,
header:hover {
    transform: translateY(0) !important;
}

.station-background {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: -1;
    pointer-events: none;
    background-color: var(--bg-primary);
}
.station-background.visible {
    opacity: 0.6;
}

.station-background::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

/* --- HEADER COMPACTO Y AUTO-OCULTABLE --- */
header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1001;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
header.header-hidden {
    transform: translateY(-100%);
}
header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.header-left {
    display: flex;
    flex-direction: column;
}
.logo {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 0;
    line-height: 1;
    white-space: nowrap;
}
.logo span { color: var(--accent); }
.tagline {
    color: var(--text-muted);
    font-size: 0.7rem;
    margin-top: 0.2rem;
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}
header:hover .tagline {
    opacity: 1;
    height: auto;
}
nav {
    display: flex;
    gap: 1.5rem;
    border-top: none;
    padding-top: 0;
    overflow-x: auto;
    align-items: center;
    margin-left: auto;
}
nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: color 0.3s;
}
nav a:hover, nav a.active { color: var(--text-primary); }

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

main {
    padding-top: 80px;
}

.section {
    margin: 3rem 0;
    scroll-margin-top: 100px;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.section-title {
    font-size: 1.5rem;
    font-weight: 600;
}
.view-all {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s;
}
.view-all:hover { color: var(--text-primary); }

/* --- MOSAICO DE ESTACIONES CON MASONRY --- */
.stations-mosaic {
    position: relative;
    width: 100%;
}
.station-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: all 0.3s;
    background-color: var(--bg-card);
    width: calc(25% - 18px);
    float: left;
    margin-bottom: 1.5rem;
}
.station-card.wide { width: calc(50% - 12px); }
.station-card.large { width: calc(50% - 12px); }
.station-card.tall { width: calc(25% - 18px); }
.station-card.normal { width: calc(25% - 18px); }
.station-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.station-card.active {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}
.station-card-bg {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.6s, opacity 0.3s;
    opacity: 0.6;
}
.station-card:hover .station-card-bg {
    transform: scale(1.08);
    opacity: 0.8;
}
.station-card .station-card-bg-placeholder {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    display: block;
}
.station-card.tall .station-card-bg,
.station-card.tall .station-card-bg-placeholder { height: 500px; }
.station-card.large .station-card-bg,
.station-card.large .station-card-bg-placeholder { height: 500px; }
.station-card.normal .station-card-bg,
.station-card.normal .station-card-bg-placeholder { height: 250px; }
.station-card.wide .station-card-bg,
.station-card.wide .station-card-bg-placeholder { height: 250px; }
.station-card-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 60%, transparent 100%);
    color: white;
    z-index: 2;
}
.station-card-location {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}
.station-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}
.station-card-description {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.station-card-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}
.station-card-tag {
    background-color: transparent;
    border: 1px solid var(--border);
    padding: 0.2rem 0.6rem;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}
.station-card-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: space-between;
    z-index: 3;
}
.station-card-live-badge {
    background-color: var(--accent);
    color: white;
    padding: 0.25rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 2px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.station-card-live-dot {
    width: 6px;
    height: 6px;
    background-color: white;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.station-card-listeners {
    background-color: rgba(0,0,0,0.7);
    color: white;
    padding: 0.25rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 2px;
    backdrop-filter: blur(5px);
}
.station-card-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 50px;
    height: 50px;
    background-color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 3;
    box-shadow: 0 0 20px var(--accent-glow);
}
.station-card:hover .station-card-play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* --- MOSAICO DE EVENTOS --- */
.shows-mosaic {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 280px;
    gap: 1.5rem;
}
.show-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: all 0.3s;
    background-color: var(--bg-card);
}
.show-item:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.show-item-video, .show-item-image {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.show-item:hover .show-item-video, .show-item:hover .show-item-image {
    transform: scale(1.05);
}
.show-item-fallback {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.3);
}
.show-item-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 2rem 1.5rem 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.95), transparent);
    color: white;
    pointer-events: none;
}
.show-item-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; }
.show-item-date {
    font-size: 0.85rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.show-item.large { grid-column: span 2; grid-row: span 2; }
.show-item.tall { grid-column: span 1; grid-row: span 2; }
.show-item.wide { grid-column: span 2; grid-row: span 1; }
.show-item.normal { grid-column: span 1; grid-row: span 1; }
.show-item[data-id="1"] .show-item-fallback { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.show-item[data-id="2"] .show-item-fallback { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.show-item[data-id="3"] .show-item-fallback { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.show-item[data-id="4"] .show-item-fallback { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.show-item[data-id="5"] .show-item-fallback { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.show-item[data-id="6"] .show-item-fallback { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); }
.show-item[data-id="7"] .show-item-fallback { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); }

/* --- MASONRY LAYOUT PARA PROGRAMACIÓN --- */
.schedule-mosaic {
    position: relative;
    width: 100%;
}
.schedule-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: all 0.3s;
    background-color: var(--bg-card);
    width: calc(25% - 18px);
    float: left;
    margin-bottom: 1.5rem;
}
.schedule-item.wide { width: calc(50% - 12px); }
.schedule-item.large { width: calc(50% - 12px); }
.schedule-item.tall { width: calc(25% - 18px); }
.schedule-item.normal { width: calc(25% - 18px); }
.schedule-item:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.schedule-item-bg {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.6s, opacity 0.3s;
    opacity: 0.6;
}
.schedule-item:hover .schedule-item-bg {
    transform: scale(1.08);
    opacity: 0.8;
}
.schedule-item .schedule-item-bg-placeholder {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    display: block;
}
.schedule-item.tall .schedule-item-bg,
.schedule-item.tall .schedule-item-bg-placeholder { height: 440px; }
.schedule-item.large .schedule-item-bg,
.schedule-item.large .schedule-item-bg-placeholder { height: 440px; }
.schedule-item.normal .schedule-item-bg,
.schedule-item.normal .schedule-item-bg-placeholder { height: 220px; }
.schedule-item.wide .schedule-item-bg,
.schedule-item.wide .schedule-item-bg-placeholder { height: 220px; }
.schedule-item-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 60%, transparent 100%);
    color: white;
    z-index: 2;
}
.schedule-item-time {
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.schedule-item-time::before {
    content: '';
    display: block;
    width: 6px; height: 6px;
    background-color: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent);
}
.schedule-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}
.schedule-item-station {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.schedule-play-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 50px; height: 50px;
    background-color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 3;
    box-shadow: 0 0 20px var(--accent-glow);
}
.schedule-item:hover .schedule-play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 1024px) {
    .shows-mosaic {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 220px;
    }
    .show-item.large, .show-item.wide { grid-column: span 2; grid-row: span 1; }
    .show-item.tall { grid-column: span 1; grid-row: span 2; }
    .show-item.normal { grid-column: span 1; grid-row: span 1; }

    .station-card,
    .station-card.tall,
    .station-card.normal { width: calc(50% - 12px); }
    .station-card.wide,
    .station-card.large { width: calc(100% - 0px); }
    .station-card.tall .station-card-bg,
    .station-card.tall .station-card-bg-placeholder { height: 450px; }
    .station-card.large .station-card-bg,
    .station-card.large .station-card-bg-placeholder { height: 450px; }

    .schedule-item,
    .schedule-item.tall,
    .schedule-item.normal { width: calc(50% - 12px); }
    .schedule-item.wide,
    .schedule-item.large { width: calc(100% - 0px); }
    .schedule-item.tall .schedule-item-bg,
    .schedule-item.tall .schedule-item-bg-placeholder { height: 400px; }
    .schedule-item.large .schedule-item-bg,
    .schedule-item.large .schedule-item-bg-placeholder { height: 400px; }
}
@media (max-width: 600px) {
    .shows-mosaic {
        grid-template-columns: 1fr;
        grid-auto-rows: 200px;
    }
    .show-item.large, .show-item.wide, .show-item.tall, .show-item.normal {
        grid-column: span 1;
        grid-row: span 1;
    }

    .station-card,
    .station-card.wide,
    .station-card.large,
    .station-card.tall,
    .station-card.normal { width: 100%; }
    .station-card .station-card-bg,
    .station-card .station-card-bg-placeholder { height: 250px !important; }

    .schedule-item,
    .schedule-item.wide,
    .schedule-item.large,
    .schedule-item.tall,
    .schedule-item.normal { width: 100%; }
    .schedule-item .schedule-item-bg,
    .schedule-item .schedule-item-bg-placeholder { height: 220px !important; }

    header .container {
        flex-direction: column;
        align-items: flex-start;
    }
    nav {
        margin-left: 0;
        width: 100%;
        padding-bottom: 0.5rem;
    }
}

.show-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 2rem;
}
.show-modal.visible { opacity: 1; pointer-events: all; }
.show-modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}
.show-modal.visible .show-modal-content { transform: translateY(0); }
.show-modal-media-container {
    width: 100%; height: 100%;
    min-height: 300px;
    overflow: hidden;
    background-color: var(--bg-primary);
}
.show-modal-video, .show-modal-image { width: 100%; height: 100%; object-fit: cover; }
.show-modal-details {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.show-modal-date {
    color: var(--accent);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 1rem;
}
.show-modal-title { font-size: 2rem; font-weight: 700; margin-bottom: 1.5rem; line-height: 1.2; }
.show-modal-description { color: var(--text-secondary); line-height: 1.7; margin-bottom: 2rem; font-size: 1rem; }
.show-modal-btn {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    width: fit-content;
}
.show-modal-btn:hover { background-color: #8fa36b; transform: translateY(-2px); }
.show-modal-close {
    position: absolute;
    top: 1rem; right: 1rem;
    background: rgba(0,0,0,0.6);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
    z-index: 10;
}
.show-modal-close:hover { background: var(--accent); border-color: var(--accent); }
@media (max-width: 768px) {
    .show-modal-content { grid-template-columns: 1fr; max-height: 95vh; }
    .show-modal-media-container { height: 250px; min-height: auto; }
    .show-modal-details { padding: 1.5rem; }
    .show-modal-title { font-size: 1.5rem; }
}

/* --- REPRODUCTOR FIJO --- */
.player-wrapper {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    pointer-events: none;
    width: 100% !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    will-change: transform;
}

.player-bar {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 0.5rem 0;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    width: 100%;
    position: relative;
}

.player-bar.visible {
    transform: translateY(0);
}

.player-container {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}
.player-controls { display: flex; align-items: center; gap: 0.75rem; }
.play-btn {
    width: 32px; height: 32px;
    border-radius: 50%;
    background-color: var(--text-primary);
    color: var(--bg-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s;
    flex-shrink: 0;
}
.play-btn:hover { transform: scale(1.05); background-color: var(--accent); color: white; }
.volume-btn {
    background: none; border: none; color: var(--text-primary);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    padding: 0.3rem; border-radius: 50%; transition: all 0.2s; opacity: 0.8;
}
.volume-btn:hover { opacity: 1; background-color: rgba(255, 255, 255, 0.1); }
.player-now-playing { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.now-playing-art {
    width: 36px; height: 36px; border-radius: 4px; object-fit: cover;
    background-color: var(--border); flex-shrink: 0; transition: all 0.5s;
}
.now-playing-art.playing { animation: albumSpin 20s linear infinite; }
@keyframes albumSpin { to { transform: rotate(360deg); } }
.now-playing-info { min-width: 0; flex: 1; }
.now-playing-station {
    font-size: 0.7rem; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.15rem;
}
.now-playing-title {
    font-weight: 600; font-size: 0.85rem; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; transition: opacity 0.3s;
}
.now-playing-artist {
    color: var(--text-secondary); font-size: 0.75rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.now-playing-show { font-size: 0.7rem; color: var(--accent); margin-top: 0.15rem; }

/* --- VISUALIZADOR REAL Y FALLBACK COMPACTO --- */
#realVisualizer {
    display: none;
    width: 80px;
    height: 18px;
}
#realVisualizer.active {
    display: block;
}
.visualizer { display: flex; align-items: flex-end; gap: 2px; height: 18px; }
.visualizer.hidden { display: none; }
.visualizer.playing .bar { animation: equalizerWave 0.8s ease-in-out infinite; }
.visualizer.playing .bar:nth-child(1) { animation: equalizerWave1 0.7s ease-in-out infinite; animation-delay: 0s; }
.visualizer.playing .bar:nth-child(2) { animation: equalizerWave2 0.9s ease-in-out infinite; animation-delay: 0.1s; }
.visualizer.playing .bar:nth-child(3) { animation: equalizerWave3 0.85s ease-in-out infinite; animation-delay: 0.2s; }
.visualizer.playing .bar:nth-child(4) { animation: equalizerWave4 0.75s ease-in-out infinite; animation-delay: 0.05s; }
.visualizer.playing .bar:nth-child(5) { animation: equalizerWave5 0.95s ease-in-out infinite; animation-delay: 0.15s; }
@keyframes equalizerWave1 { 0%, 100% { height: 20%; opacity: 0.5; } 25% { height: 60%; opacity: 0.8; } 50% { height: 40%; opacity: 0.6; } 75% { height: 80%; opacity: 1; } }
@keyframes equalizerWave2 { 0%, 100% { height: 30%; opacity: 0.4; } 20% { height: 50%; opacity: 0.7; } 40% { height: 90%; opacity: 1; } 60% { height: 35%; opacity: 0.5; } 80% { height: 65%; opacity: 0.8; } }
@keyframes equalizerWave3 { 0%, 100% { height: 25%; opacity: 0.5; } 30% { height: 70%; opacity: 0.9; } 50% { height: 45%; opacity: 0.6; } 70% { height: 85%; opacity: 1; } 90% { height: 30%; opacity: 0.4; } }
@keyframes equalizerWave4 { 0%, 100% { height: 35%; opacity: 0.4; } 25% { height: 55%; opacity: 0.7; } 45% { height: 75%; opacity: 0.9; } 65% { height: 40%; opacity: 0.6; } 85% { height: 95%; opacity: 1; } }
@keyframes equalizerWave5 { 0%, 100% { height: 20%; opacity: 0.5; } 20% { height: 45%; opacity: 0.7; } 40% { height: 65%; opacity: 0.8; } 60% { height: 30%; opacity: 0.5; } 80% { height: 80%; opacity: 1; } }

.volume-control { display: flex; align-items: center; gap: 0.5rem; }
.volume-slider {
    width: 70px; height: 3px; background-color: var(--border);
    border-radius: 2px; outline: none; -webkit-appearance: none; cursor: pointer;
}
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none; width: 10px; height: 10px;
    background-color: var(--text-primary); border-radius: 50%; cursor: pointer;
}
.close-player {
    background: none; border: none; color: var(--text-secondary);
    cursor: pointer; font-size: 1.2rem; padding: 0.3rem; transition: color 0.3s;
}
.close-player:hover { color: var(--text-primary); }

/* --- PANEL DE HISTORIAL --- */
.history-panel {
    position: fixed;
    bottom: 100px;
    right: 1rem;
    left: auto;
    width: 320px;
    max-width: calc(100vw - 2rem);
    max-height: 400px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    z-index: 999;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    backdrop-filter: blur(15px);
}
.history-panel.visible { transform: translateY(0); opacity: 1; pointer-events: all; }
.history-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.history-title { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.history-list { overflow-y: auto; max-height: 320px; }
.history-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s;
}
.history-item:hover { background-color: rgba(10, 10, 10, 0.95); }
.history-item-art {
    width: 36px; height: 36px;
    border-radius: 3px;
    object-fit: cover;
    background-color: var(--border);
    flex-shrink: 0;
}
.history-item-info { flex: 1; min-width: 0; }
.history-item-title {
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.history-item-artist {
    font-size: 0.7rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.history-item-time { font-size: 0.65rem; color: var(--text-muted); flex-shrink: 0; }
.history-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.3s;
}
.history-toggle:hover { color: var(--text-primary); border-color: var(--border-light); }
.fade-in { animation: fadeIn 0.5s ease-in; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- MEDIA QUERIES PARA MÓVIL (REPRODUCTOR MINIMALISTA) --- */
@media (max-width: 768px) {
    .player-container {
        grid-template-columns: auto auto 1fr;
        gap: 0.75rem;
        padding: 0 0.75rem;
        justify-content: center;
        align-items: center;
    }

    /* Ocultar información de reproducción y botones extra en móvil */
    .player-now-playing,
    .history-toggle,
    .close-player {
        display: none !important;
    }

    /* Forzar visualización y ajuste del espectro musical */
    #realVisualizer {
        display: block !important;
        width: 100px;
        height: 24px;
    }
    .visualizer {
        display: flex !important;
        height: 24px;
        gap: 3px;
    }
    .visualizer .bar {
        width: 4px;
        border-radius: 2px;
    }

    /* Forzar visualización del control de volumen */
    .volume-control {
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
    }
    .volume-slider {
        width: 80px;
    }

    .history-panel {
        right: 1rem;
        left: auto;
        width: 280px;
        max-width: calc(100vw - 2rem);
        bottom: 90px;
    }
}

@media (max-width: 480px) {
    body {
        padding-bottom: 100px;
    }

    .player-container {
        grid-template-columns: auto auto 1fr;
        gap: 0.5rem;
        padding: 0 0.5rem;
    }

    #realVisualizer {
        width: 70px;
        height: 20px;
    }
    .visualizer {
        height: 20px;
        gap: 2px;
    }
    .visualizer .bar {
        width: 3px;
    }
    .volume-slider {
        width: 60px;
    }

    .history-panel {
        bottom: 85px;
        width: 260px;
    }
}

@media (hover: none) and (pointer: coarse) {
    .player-bar {
        transform: translateY(100%);
    }
    .player-bar.visible {
        transform: translateY(0);
    }
}