/* Archivo de estilos centralizado */
:root {
    --primary-color: #d10000;
    --secondary-color: #000;
    --text-color: #fff;
    --bg-color: #111;
    --card-bg: #1a1a1a;
    --border-color: #333;
}
/* Estilos base */
html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    height: 100%;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    
    /* Imagen de fondo que cubre TODO */
    background-image: url('imagen/soloFondo.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}
/* Banner responsive */
.site-banner {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    max-width: 100%;
    margin: 0 auto 10px auto;
    position: relative;
}
.site-banner .banner-imgs {
    display: flex;
    gap: 0;
    flex-shrink: 0;
}
.site-banner .banner-imgs img {
    display: block;
    height: 120px;
    width: auto;
    object-fit: contain;
}

/* Mobile: banner images at 3/4 width */
@media (max-width: 576px) {
    .site-banner .banner-imgs {
        width: 75%;
    }
    .site-banner .banner-imgs img {
        height: auto;
        max-height: 80px;
        width: 50%;
    }
}
/* Header */
.header {
    background: transparent;
    color: var(--text-color);
    padding: 0.5rem 0;
    border-bottom: none;
    width: 100%;
}
.header h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.header .subtitle {
    font-size: clamp(0.65rem, 2vw, 0.9rem);
    margin: 0.3rem 0 0;
    font-weight: 300;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.4), 0 0 8px rgba(209, 0, 0, 0.4);
    position: relative;
    font-style: italic;
    font-family: 'Times New Roman', serif;
    line-height: 1.3;
}
/* Contenedor principal */
.container-main {
    padding: clamp(1rem, 3vw, 2rem);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding-bottom: 100px; /* Espacio para el reproductor fijo */
}
/* Selector de categorías */
.category-selector {
    margin-bottom: 1.5rem;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    padding: 0.5rem 0;
}
.category-btn {
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    font-size: clamp(0.7rem, 2vw, 0.9rem);
}
.category-btn:hover, .category-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}
.category-btn.ext-link {
    background: transparent;
    border-color: transparent;
}

/* Main buttons (Picaflor, Radios, Herramientas) */
.main-btn {
    font-size: clamp(0.85rem, 2.5vw, 1.1rem);
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.main-btn i {
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
}

/* Sub-buttons (Herramientas) */
.herramientas-sub {
    display: none;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeInDown 0.2s ease;
}
.sub-btn {
    font-size: clamp(0.65rem, 1.8vw, 0.8rem);
    padding: 0.35rem 0.9rem;
    border-radius: 14px;
    background: rgba(26, 26, 26, 0.8);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.sub-btn i {
    font-size: clamp(0.6rem, 1.5vw, 0.75rem);
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Radios panel */
.radios-panel {
    position: fixed;
    right: -320px;
    top: 0;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: #111111;
    border-left: 2px solid var(--primary-color);
    box-shadow: -4px 0 20px rgba(0,0,0,0.5);
    padding: 1rem;
    z-index: 1100;
    overflow-y: auto;
    transition: right 0.3s ease;
}
.radios-panel.open { right: 0; }
.radios-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1050;
}
.radios-overlay.open { display: block; }
.close-radios {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    float: right;
}
/* Radios accordion */
.radios-accordion {
    font-size: 0.85rem;
    color: #ddd;
}
.radios-accordion details {
    margin: 0;
}
.radios-accordion summary {
    cursor: pointer;
    padding: 0.5rem 0.6rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    user-select: none;
    list-style: none;
}
.radios-accordion summary::-webkit-details-marker {
    display: none;
}
.radios-accordion summary:hover {
    background: rgba(255,255,255,0.05);
}
.region-summary {
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-top: 0.2rem;
}
.region-summary .region-arrow,
.pais-summary .pais-arrow {
    font-size: 0.65rem;
    transition: transform 0.2s;
    color: var(--primary-color);
    width: 12px;
    flex-shrink: 0;
}
.region-group[open] > .region-summary .region-arrow,
.pais-group[open] > .pais-summary .pais-arrow {
    transform: rotate(90deg);
}
.region-count, .pais-count {
    margin-left: auto;
    background: rgba(255,255,255,0.1);
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    color: #999;
}
.region-content {
    padding-left: 0.5rem;
}
.pais-summary {
    font-weight: 600;
    font-size: 0.82rem;
    color: #eee;
    padding: 0.35rem 0.5rem;
}
.pais-content {
    padding-left: 0.3rem;
}
.radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    margin: 0.15rem 0;
}
.radio-item:hover {
    background: rgba(255,255,255,0.08);
}
.radio-item-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.15);
    flex-shrink: 0;
}
.radio-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.radio-item-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.radio-item-location {
    font-size: 0.65rem;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.radio-item-location i {
    font-size: 0.55rem;
    margin-right: 0.15rem;
}
.radio-item-play {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    font-size: 0.65rem;
}
.radio-item-play:hover {
    background: var(--primary-color);
    color: #fff;
}

.radio-item-fav {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0.2rem 0.3rem;
    flex-shrink: 0;
    transition: color 0.2s;
    line-height: 1;
}
.radio-item-fav:hover {
    color: #ff4444;
}
.radio-item-fav.favorited {
    color: red;
}

/* Tooltip para categorías */
.category-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    z-index: 100;
    margin-bottom: 10px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s;
}
.category-btn:hover::after {
    visibility: visible;
    opacity: 1;
}
.category-btn:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% - 5px);
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #333;
    z-index: 101;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s;
}
.category-btn:hover::before {
    visibility: visible;
    opacity: 1;
}
/* Grid de estaciones */
.stations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: clamp(0.8rem, 2vw, 1.5rem);
    margin-bottom: 0;
    width: 100%;
}
/* Tarjetas de estaciones - con blur para ver fondo pero legibles */
.station-card {
    background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.7) 100%);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.15);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    display: flex !important;
    flex-direction: column;
    position: relative;
}
.station-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    border-color: rgba(209,0,0,0.55);
}
.station-card.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color);
}
.station-card.dragging {
    opacity: 0.7;
    transform: scale(0.98);
}
/* Ocultar emisoras que no son "enelaire" por defecto */
.station-card[data-category]:not([data-category="enelaire"]) {
    display: none !important;
}
.station-img-container {
    width: 100%;
    display: flex !important;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    position: relative;
}
.station-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}
.station-info {
    padding: 0.9rem 0.8rem;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}
.station-name {
    color: #ffffff;
    font-weight: 800;
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    margin: 0;
    line-height: 1.05;
    letter-spacing: 0.2px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
    display: inline-block;
    padding: 0.18rem 0.5rem;
    border-radius: 6px;
}
.station-location {
    color: #f0f0f0;
    font-size: clamp(0.75rem, 1.5vw, 0.88rem);
    margin: 0;
    text-shadow: 0 1px 4px rgba(0,0,0,0.7);
    opacity: 0.95;
}
/* REPRODUCTOR - FONDO CON LA IMAGEN DE FONDO EN TONALIDADES NEGRAS */
.player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    border-top: 3px solid var(--primary-color);
    padding: clamp(0.5rem, 2vw, 1rem);
    padding-bottom: calc(clamp(0.5rem, 2vw, 1rem) + env(safe-area-inset-bottom, 0px));
    display: flex !important;
    align-items: center;
    gap: clamp(0.3rem, 1.5vw, 0.8rem);
    z-index: 1000;
    flex-wrap: wrap;
    background: transparent;
    isolation: isolate;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
}

.player::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--player-bg, url('imagen/soloFondo.jpeg'));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    filter: grayscale(1) brightness(0.35);
    z-index: -1;
}

/* Todos los textos del reproductor con máximo contraste */
.player * {
    color: #ffffff;
}
.player-cover {
    width: clamp(40px, 8vw, 60px);
    height: clamp(40px, 8vw, 60px);
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    transition: transform 0.5s;
}
.player-info {
    flex-grow: 1;
    color: #fff;
    min-width: 80px;
    overflow: hidden;
}
.player-title {
    font-size: clamp(0.8rem, 2vw, 1rem);
    margin: 0;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.player-station {
    font-size: clamp(0.6rem, 1.5vw, 0.7rem);
    color: #dddddd;
    margin: 0.2rem 0 0 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.player-controls {
    display: flex !important;
    align-items: center;
    gap: clamp(0.3rem, 1vw, 0.6rem);
    justify-content: center;
    flex-shrink: 0;
}
.player-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #ffffff;
    font-size: clamp(0.8rem, 2vw, 1rem);
    cursor: pointer;
    transition: all 0.3s;
    width: clamp(30px, 6vw, 40px);
    height: clamp(30px, 6vw, 40px);
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.player-btn:hover {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.2);
}
.visualizer {
    display: flex !important;
    align-items: flex-end;
    gap: 2px;
    height: 30px;
    margin: 0 0.3rem;
    flex-shrink: 0;
}
.visualizer-bar {
    width: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: height 0.05s;
    height: 2px;
}
.player-meta {
    text-align: center;
    font-size: clamp(0.6rem, 1.2vw, 0.75rem);
    color: #eeeeee;
    min-width: 120px;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.volume-control {
    display: flex !important;
    align-items: center;
    gap: 0.3rem;
    margin-left: 0.3rem;
    flex-shrink: 0;
}
.volume-slider {
    width: clamp(50px, 8vw, 70px);
}
/* Estado de conexión */
.connection-status {
    font-size: clamp(0.6rem, 1.2vw, 0.7rem);
    margin-top: 0;
    line-height: 1;
    color: #cccccc;
}
.status-connecting { color: #ffcc00; }
.status-playing { color: #4CAF50; }
.status-error { color: #f44336; }
/* Favoritos */
.favorite-control .fa-star { color: #ccc; transition: all 0.3s; }
.favorite-control .favorited { color: red; }
.station-card .favorite-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    color: red;
    font-size: 12px;
    display: none;
    z-index: 2;
}
.station-card.favorited .favorite-badge { display: block; }
/* Grid responsive */
.radio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(0.6rem, 2vw, 1rem);
    margin-bottom: 0;
    width: 100%;
}
@media (max-width: 992px) {
    .radio-grid { grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
}
@media (max-width: 768px) {
    .radio-grid { grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
}
@media (max-width: 576px) {
    .radio-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
    .station-img { width: 68px; height: 68px; }
}
@media (max-width: 360px) {
    .radio-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .station-img { width: 56px; height: 56px; }
}
/* Slider de volumen */
input[type="range"] {
    -webkit-appearance: none;
    width: 100px;
    background: transparent;
    height: 6px;
}
input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    background: var(--primary-color);
    border-radius: 3px;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #fff;
    border: 1px solid var(--primary-color);
    border-radius: 50%;
    margin-top: -4px;
    cursor: pointer;
}
/* Media queries para móvil */
@media (max-width: 768px) {
    .container-main { padding-bottom: 140px; }
}
/* Misc */
.sort-toggle-btn.active { background: var(--primary-color); border-color: var(--primary-color); }
.card-favorite-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.7);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 3;
    color: #ccc;
}
.card-favorite-btn.favorited { color: red; }

/* Panel de despertador */
.alarm-panel {
    position: fixed;
    right: -320px;
    top: 0;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: #111111;
    border-left: 2px solid var(--primary-color);
    box-shadow: -4px 0 20px rgba(0,0,0,0.5);
    padding: 1rem;
    z-index: 1100;
    overflow-y: auto;
    transition: right 0.3s ease;
}
.alarm-panel.open { right: 0; }
.alarm-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1050;
}
.alarm-overlay.open { display: block; }
.alarm-body { padding: 0.5rem 0; }
.alarm-label {
    display: block;
    color: #ccc;
    font-size: 0.8rem;
    margin: 0.8rem 0 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.alarm-time-row {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.alarm-select {
    background: #222;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 0.4rem;
    font-size: 1rem;
    width: 70px;
    text-align: center;
}
.alarm-station-select { width: 100%; }
.alarm-time-sep {
    color: #fff;
    font-size: 1.2rem;
    font-weight: bold;
}
.alarm-days {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}
.alarm-day {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #555;
    background: transparent;
    color: #999;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.alarm-day.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
.alarm-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}
.alarm-btn {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #555;
    border-radius: 4px;
    background: transparent;
    color: #ccc;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.alarm-btn:hover { background: rgba(255,255,255,0.1); }
.alarm-btn-save {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
.alarm-btn-save:hover { background: #b00000; }
.alarm-btn-toggle.active {
    background: #4CAF50;
    border-color: #4CAF50;
    color: #fff;
}
.alarm-status {
    text-align: center;
    margin-top: 0.8rem;
    font-size: 0.8rem;
    color: #888;
    padding: 0.3rem;
    border-radius: 4px;
}
.alarm-status.active { color: #4CAF50; }
.close-alarm {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    float: right;
}
#alarmToggleBtn.alarm-enabled { color: #4CAF50; }

/* === Panel Sobre Huitzi === */
.sobre-panel {
    position: fixed;
    right: -360px;
    top: 0;
    width: 340px;
    max-width: 90vw;
    height: 100vh;
    background: #111111;
    border-left: 2px solid var(--primary-color);
    box-shadow: -4px 0 20px rgba(0,0,0,0.5);
    padding: 1rem;
    z-index: 1100;
    overflow-y: auto;
    transition: right 0.3s ease;
}
.sobre-panel.open { right: 0; }
.sobre-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1050;
}
.sobre-overlay.open { display: block; }
.close-sobre {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    float: right;
}
.sobre-body {
    padding: 0.5rem 0;
    color: #ddd;
    font-size: 0.85rem;
    line-height: 1.6;
}
.sobre-body h2 {
    color: #fff;
    font-size: 1.1rem;
    margin: 1rem 0 0.5rem;
    border-bottom: 1px solid var(--primary-color);
    padding-bottom: 0.3rem;
}
.sobre-body h3 {
    color: var(--primary-color);
    font-size: 0.95rem;
    margin: 0.8rem 0 0.3rem;
}
.sobre-body p {
    margin: 0.5rem 0;
}
.sobre-body ul {
    margin: 0.3rem 0 0.5rem;
    padding-left: 1.2rem;
}
.sobre-body li {
    margin: 0.3rem 0;
}
.sobre-body hr {
    border: none;
    border-top: 1px solid #333;
    margin: 1rem 0;
}
.sobre-body strong {
    color: #fff;
}
.sobre-body em {
    color: #ffcc00;
}

/* === Panel Temporizador === */
.timer-panel {
    position: fixed;
    right: -320px;
    top: 0;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: #111111;
    border-left: 2px solid var(--primary-color);
    box-shadow: -4px 0 20px rgba(0,0,0,0.5);
    padding: 1rem;
    z-index: 1100;
    overflow-y: auto;
    transition: right 0.3s ease;
}
.timer-panel.open { right: 0; }
.timer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1050;
}
.timer-overlay.open { display: block; }
.close-timer {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    float: right;
}
.timer-body {
    padding: 0.5rem 0;
    text-align: center;
}
.timer-display {
    font-size: 3rem;
    font-weight: bold;
    color: #fff;
    font-family: 'Courier New', monospace;
    margin: 1.5rem 0;
    letter-spacing: 3px;
}
.timer-display span {
    min-width: 60px;
    display: inline-block;
}
.timer-presets {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin: 1rem 0;
}
.timer-preset-btn {
    background: #222;
    color: #ccc;
    border: 1px solid #444;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.timer-preset-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
.timer-custom {
    margin: 1rem 0;
}
.timer-label {
    display: block;
    color: #ccc;
    font-size: 0.8rem;
    margin: 0.8rem 0 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.timer-custom-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.timer-input {
    background: #222;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 0.4rem;
    font-size: 1.2rem;
    width: 80px;
    text-align: center;
}
.timer-custom-label {
    color: #999;
    font-size: 0.9rem;
}
.timer-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: center;
}
.timer-btn {
    flex: 1;
    max-width: 120px;
    padding: 0.6rem;
    border: 1px solid #555;
    border-radius: 4px;
    background: transparent;
    color: #ccc;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.timer-btn:hover { background: rgba(255,255,255,0.1); }
.timer-btn-start {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
.timer-btn-start:hover { background: #b00000; }
.timer-btn-stop {
    background: #f44336;
    border-color: #f44336;
    color: #fff;
}
.timer-btn-stop:hover { background: #d32f2f; }
.timer-status {
    text-align: center;
    margin-top: 0.8rem;
    font-size: 0.8rem;
    color: #888;
    padding: 0.3rem;
    border-radius: 4px;
}
.timer-status-active { color: #4CAF50; }
.timer-status-done { color: #ffcc00; font-weight: bold; }

/* === Floating categories === */
.floating-categories-container {
    position: fixed;
    left: -60px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 900;
    transition: left 0.3s ease;
    display: none;
}
.floating-categories-container.visible {
    left: 10px;
    display: block;
}
.floating-categories-inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 0 10px 10px 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}
.floating-categories-container .category-btn {
    width: 50px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

/* === Favorites panel === */
.favorites-panel {
    position: fixed;
    right: 10px;
    top: 80px;
    width: 300px;
    max-width: 85vw;
    max-height: 70vh;
    overflow-y: auto;
    background: #111;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.5);
    padding: 10px;
    z-index: 1200;
    display: none;
    color: #ddd;
}
.favorites-panel.visible { display: block; }
.favorites-panel h4 { margin: 0 0 8px 0; font-size: 16px; color: #fff; }
.favorite-list { list-style: none; margin: 0; padding: 0; }
.favorite-item { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 6px; cursor: grab; border-bottom: 1px solid #222; }
.favorite-item.dragging { opacity: 0.5; }
.favorite-item img { width: 46px; height: 46px; object-fit: cover; border-radius: 4px; }
.favorite-item .fav-meta { flex: 1; font-size: 14px; }
.favorite-item .fav-meta small { color: #999; }
.favorite-item .fav-actions { display:flex; gap:6px; }
.favorite-item .fav-actions button { background: transparent; border: none; cursor: pointer; color: #ccc; font-size: 1rem; }
.favorite-item .fav-actions button:hover { color: var(--primary-color); }
.card-favorite-btn.startup .fa-star { color: red; }
.card-favorite-btn.startup { color: red; }



/* === Player oculto al inicio */
.player-hidden {
    display: none !important;
}

/* === Player minimizado (como viejo) === */
.player.minimized {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    top: 10px !important;
    left: 10px !important;
    bottom: auto !important;
    right: auto !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.player.minimized .player-info,
.player.minimized .player-controls,
.player.minimized .player-meta,
.player.minimized #visualizer,
.player.minimized .favorite-control,
.player.minimized .share-control,
.player.minimized .volume-control {
    display: none !important;
}
.player.minimized .player-cover {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    border: 2px solid var(--primary-color) !important;
    cursor: pointer !important;
    min-width: 60px;
    min-height: 60px;
}
.player.minimized::before {
    display: none !important;
}

/* === Social buttons (solo iconos, abajo a la derecha) === */
.social-buttons {
    position: absolute;
    bottom: 0;
    right: 0;
    display: flex;
    gap: 6px;
    padding: 4px;
    z-index: 10;
}
.social-buttons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    color: #0a0 !important;
    transition: opacity 0.2s;
}
.social-buttons a:hover { opacity: 0.7; }
.social-buttons a svg { display: block; }

/* === Responsive: copiado de viejo/xestilos.css === */
@media (max-width: 992px) {
    .radio-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    .radio-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    .player {
        flex-wrap: wrap;
        gap: 0.8rem;
        padding: 0.8rem;
        padding-bottom: calc(0.8rem + env(safe-area-inset-bottom, 0px));
    }
    .player-controls {
        order: 1;
        width: 100%;
        justify-content: center;
    }
    #visualizer {
        order: 2;
        width: 100%;
        justify-content: center;
        margin: 0;
        display: flex !important;
    }
    .player-meta {
        order: 3;
        width: 100%;
        text-align: center;
    }
    .volume-control {
        margin: 0.5rem auto;
    }
    .container-main { padding-bottom: 200px; }
    .radios-panel, .alarm-panel, .sobre-panel, .timer-panel, .redes-panel {
        width: 85vw !important;
        max-width: 85vw !important;
        right: -90vw;
    }
    .radios-panel.open, .alarm-panel.open, .sobre-panel.open, .timer-panel.open, .redes-panel.open { right: 0; }
    .floating-categories-container.visible { left: 3px; }
    .floating-categories-container .category-btn {
        width: 38px; height: 38px; font-size: 0.75rem;
    }
    .floating-categories-inner { gap: 5px; padding: 6px; }
    .favorites-panel {
        right: 5px; top: 60px; width: 85vw; max-width: 85vw;
    }
    .timer-display { font-size: 2rem; }
    .sobre-body { font-size: 0.8rem; }
    .sobre-body h2 { font-size: 1rem; }
    .sobre-body h3 { font-size: 0.85rem; }
}

@media (max-width: 576px) {
    .radio-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.8rem;
    }
    .station-img { width: 60px; height: 60px; }
    .player-cover { width: 40px; height: 40px; }
    .player-title { max-width: 100%; }
    .player-meta div { font-size: 0.65rem; }
}

@media (max-width: 480px) {
    .header h1 { font-size: clamp(1.1rem, 3vw, 1.3rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 0.5rem; }
    .header .subtitle { font-size: clamp(0.6rem, 1.5vw, 0.65rem); white-space: normal; line-height: 1.2; max-width: 100%; padding: 0 0.5rem; margin: 0.2rem 0 0; }
    .category-selector { overflow-x: auto; white-space: nowrap; flex-wrap: nowrap; justify-content: flex-start; padding-bottom: 5px; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0.5rem 0; }
    .category-selector::-webkit-scrollbar { display: none; }
    .category-btn { flex: 0 0 auto; font-size: 0.75rem; padding: 0.4rem 0.8rem; }
    .main-btn { font-size: 0.75rem; padding: 0.35rem 0.7rem; gap: 0.3rem; }
    .main-btn i { font-size: 0.75rem; }
    .radio-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .player { padding: 0.5rem; gap: 0.5rem; }
    .station-img { width: 50px; height: 50px; }
    .floating-categories-container.visible { left: 2px; }
    .floating-categories-container .category-btn { width: 32px; height: 32px; font-size: 0.65rem; }
    .floating-categories-inner { gap: 4px; padding: 4px; }
}

@media (max-width: 360px) {
    .radio-grid { grid-template-columns: repeat(2, 1fr); gap: 0.4rem; }
    .station-img { width: 50px; height: 50px; }
    .main-btn { font-size: 0.7rem; padding: 0.3rem 0.5rem; }
    .main-btn i { font-size: 0.7rem; }
    .category-btn { font-size: 0.7rem; padding: 0.3rem 0.5rem; }
    .main-buttons { gap: 0.25rem; }
}

/* === Visualizer más visible === */
.visualizer-bar {
    height: 8px;
    min-height: 8px;
    background: #ff3333;
    box-shadow: 0 0 4px rgba(255, 0, 0, 0.5);
}
#visualizer {
    margin: 0 0.3rem;
    flex-shrink: 0;
}

/* === Rotación del cover al reproducir === */
.player-cover.playing {
    animation: spin 8s linear infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* === Main buttons siempre en una línea === */
.main-buttons {
    display: flex;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: center;
    gap: 0.4rem;
}
.main-buttons::-webkit-scrollbar { display: none; }


/* ============================================================
   SISTEMA DE VISTAS - MODALIDADES
   ============================================================ */

/* ===== PANEL DE SELECCIÓN DE VISTA ===== */
.vista-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    z-index: 999; opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.vista-overlay.open { opacity: 1; pointer-events: auto; }

.vista-panel {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.95);
    background: #050505; color: #fff; border-radius: 16px; padding: 24px;
    width: 90%; max-width: 380px; z-index: 1000;
    opacity: 0; pointer-events: none; transition: all 0.3s ease;
    border: 1px solid rgba(209,0,0,0.3);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.vista-panel.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }

.vista-panel h3 {
    display: flex; justify-content: space-between; align-items: center;
    margin: 0 0 20px 0; font-size: 1.15rem; color: #fff;
}
.close-vista {
    background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer;
    transition: color 0.2s;
}
.close-vista:hover { color: var(--primary-color); }

.vista-body { display: flex; flex-direction: column; gap: 12px; }

.vista-option {
    display: flex; align-items: center; gap: 16px;
    background: #2a2a2a;; border: 2px solid transparent; border-radius: 12px;
    padding: 16px; color: #fff; cursor: pointer; transition: all 0.2s;
    text-align: left; width: 100%; border: none;
}
.vista-option:hover { background: #8b0000; border-color: #e94560; transform: translateX(4px); }
.vista-option.active-vista { border-color: #4CAF50; background: #cc0000; box-shadow: 0 0 0 2px rgba(76,175,80,0.3); }

.vista-option i { font-size: 1.5rem; width: 32px; text-align: center; color: #e94560; }
.vista-option-text { display: flex; flex-direction: column; }
.vista-option-text span { font-weight: 600; font-size: 1rem; }
.vista-option-text small { color: #aaa; font-size: 0.8rem; margin-top: 2px; }

/* ===== MARQUEE SIMPLE (modo minimalista) ===== */
/* ===== MARQUEE SIMPLE (modo minimalista) ===== */
.marquee-simple {
    display: none;
    width: 100%;
    overflow: hidden;
    background: rgba(0,0,0,0.5);
    border-radius: 8px;
    padding: 10px 0;
    margin-bottom: 12px;
    border: 1px solid rgba(255,255,255,0.1);
}
.marquee-simple-track {
    display: inline-block;
    white-space: nowrap;
    animation: marqueeScroll 320s linear infinite;  /* ← ANTES: 20s, AHORA: 45s (más lento) */
    color: #fff;
    font-size: 0.9rem;
    padding-left: 100%;
}
@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* ===== MINI PLAYER (debajo del logo - modo minimalista) ===== */
.mini-player {
    display: none;
    margin-top: 6px;
    text-align: center;
    width: 100%;
}
.mini-play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #222;
    border: 2px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    transition: all 0.2s ease;
}
.mini-play-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
    border-color: #fff;
}
/* Efecto cuando está conectando (amarillo) */
.mini-play-btn.connecting {
    background: #f0c040;
    border-color: #f0c040;
    box-shadow: 0 0 0 0 rgba(240,192,64,0.4);
}
/* Efecto cuando está reproduciendo */
.mini-play-btn.playing {
    background: #4CAF50;
    border-color: #4CAF50;
    animation: miniPulse 1.2s ease infinite;
    box-shadow: 0 0 0 0 rgba(76,175,80,0.4);
}
@keyframes miniPulse {
    0% { box-shadow: 0 0 0 0 rgba(76,175,80,0.5); transform: scale(1); }
    50% { box-shadow: 0 0 0 8px rgba(76,175,80,0); transform: scale(1.1); }
    100% { box-shadow: 0 0 0 0 rgba(76,175,80,0); transform: scale(1); }
}
/* Efecto de onda al hacer click */
.mini-play-btn:active {
    transform: scale(0.9);
}

/* ===== FEED DE NOTICIAS ===== */
.noticias-feed {
    display: none;
    max-width: 900px;
    margin: 0 auto 20px;
    padding: 16px;
    background: rgba(0,0,0,0.4);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
}
.noticias-feed h2 {
    margin: 0 0 16px 0;
    font-size: 1.2rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.noticias-feed h2 i { color: var(--primary-color); }
.noticias-lista {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.noticia-item {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 12px 16px;
    border-left: 3px solid var(--primary-color);
}
.noticia-item h4 {
    margin: 0 0 6px 0;
    font-size: 0.95rem;
}
.noticia-item h4 a {
    color: #fff;
    text-decoration: none;
}
.noticia-item h4 a:hover { color: var(--primary-color); }
.noticia-item p {
    margin: 0;
    color: #aaa;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* ===== GRID COMPACTO (minimalista y noticia) ===== */
.grid-compacto {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important;
    gap: 0.6rem !important;
}
.grid-compacto .station-card {
    padding-bottom: 8px;
}
.grid-compacto .station-img-container {
    padding: 0.5rem 0.5rem 0 0.5rem;
}
.grid-compacto .station-img {
    width: 60px !important;
    height: 60px !important;
}
.grid-compacto .station-info {
    display: none !important;
}
.grid-compacto .card-favorite-btn {
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
    top: 2px;
    right: 2px;
}

/* ============================================================
   MODO MINIMALISTA
   ============================================================ */
/* ============================================================
   MODO MINIMALISTA
   ============================================================ */
body.modo-minimalista .marquee-simple {
    display: block;
}
/* OCULTAR el marquee original COMPLETAMENTE */
body.modo-minimalista .marquee-container,
body.modo-minimalista .marquee-wrapper,
body.modo-minimalista .marquee-track,
body.modo-minimalista [class*="marquee"]:not(.marquee-simple):not(.marquee-simple-track) {
    display: none !important;
}
/* Mostrar mini-player */
body.modo-minimalista .mini-player {
    display: block;
}
/* Ocultar reproductor flotante */
body.modo-minimalista #player {
    display: none !important;
}
/* Ocultar info de estación en fichas */
body.modo-minimalista .station-info {
    display: none !important;
}
/* Ocultar footer */
body.modo-minimalista footer {
    display: none !important;
}
/* Ocultar noticias */
body.modo-minimalista .noticias-feed {
    display: none !important;
}

/* ============================================================
   MODO NOTICIA
   ============================================================ */
body.modo-noticia .noticias-feed {
    display: none !important;
}
body.modo-noticia .marquee-simple {
    display: none !important;
}

body.modo-noticia .marquee-wrapper {
    display: block !important;
}

body.modo-noticia .marquee-wrapper .marquee-carousel {
    background: rgba(0,0,0,0.6);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.15);
}

body.modo-noticia .marquee-wrapper .marquee-label {
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 12px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

body.modo-noticia .marquee-wrapper .marquee-row {
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
    flex: none;
    gap: 12px;
}

body.modo-noticia .marquee-wrapper .marquee-item.active {
    display: flex !important;
    align-items: flex-start !important;
    gap: 16px;
    padding: 8px 4px;
}

body.modo-noticia .marquee-wrapper .marquee-link {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 16px;
    text-decoration: none;
    width: 100%;
}

body.modo-noticia .marquee-wrapper .marquee-thumb {
    width: 120px !important;
    height: 120px !important;
    min-width: 120px;
    min-height: 120px;
    border-radius: 10px !important;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

body.modo-noticia .marquee-wrapper .marquee-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
    text-align: left;
}

body.modo-noticia .marquee-wrapper .marquee-title {
    font-size: 1.25rem !important;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    margin: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

body.modo-noticia .marquee-wrapper .marquee-extracto {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.4;
    max-width: 600px;
    margin: 0;
}

body.modo-noticia .marquee-wrapper .marquee-controls {
    margin-left: 0;
    justify-content: center;
    width: 100%;
    display: flex;
    gap: 12px;
    padding: 4px 0;
}

body.modo-noticia .marquee-wrapper .marquee-controls button {
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}
body.modo-noticia .marquee-wrapper .marquee-controls button:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

body.modo-noticia .marquee-wrapper .marquee-player {
    margin-top: 12px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    height: 42px;
    gap: 12px;
}
body.modo-noticia .marquee-wrapper .mp-play-btn {
    width: 30px;
    height: 30px;
    font-size: 14px;
}
body.modo-noticia .marquee-wrapper .mp-label {
    font-size: 13px;
}
body.modo-noticia .marquee-wrapper .mp-download {
    width: 30px;
    height: 30px;
    font-size: 15px;
}

/* Modo noticia: player simplificado (solo ícono, nombre, play/pausa) */
body.modo-noticia #player .visualizer,
body.modo-noticia #player .player-meta,
body.modo-noticia #player #prevBtn,
body.modo-noticia #player #nextBtn,
body.modo-noticia #player .volume-control,
body.modo-noticia #player .favorite-control,
body.modo-noticia #player .share-control {
    display: none !important;
}

body.modo-noticia #player {
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
    gap: 0.3rem;
}

/* Tablet: 768-480px */
@media (max-width: 768px) {
    body.modo-noticia .marquee-wrapper .marquee-thumb {
        width: 100px !important;
        height: 100px !important;
        min-width: 100px;
        min-height: 100px;
    }
    body.modo-noticia .marquee-wrapper .marquee-title {
        font-size: 1.1rem !important;
    }
    body.modo-noticia .marquee-wrapper .marquee-controls button {
        width: 38px;
        height: 38px;
        font-size: 1.3rem;
    }
}

/* Mobile: 480-360px */
@media (max-width: 480px) {
    body.modo-noticia .marquee-wrapper .marquee-link {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center;
    }
    body.modo-noticia .marquee-wrapper .marquee-thumb {
        width: 140px !important;
        height: 140px !important;
        min-width: 140px;
        min-height: 140px;
    }
    body.modo-noticia .marquee-wrapper .marquee-title {
        font-size: 1rem !important;
    }
    body.modo-noticia .marquee-wrapper .marquee-text {
        align-items: center;
    }
    body.modo-noticia .marquee-wrapper .marquee-extracto {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-align: center;
    }
    body.modo-noticia .marquee-wrapper .marquee-controls button {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }
}

/* Very small: below 360px */
@media (max-width: 360px) {
    body.modo-noticia .marquee-wrapper .marquee-thumb {
        width: 120px !important;
        height: 120px !important;
        min-width: 120px;
        min-height: 120px;
    }
}


/* ============================================================
   MODO COMPLETA (default)
   ============================================================ */
body.modo-completa .mini-player {
    display: none !important;
}
body.modo-completa .marquee-simple {
    display: none !important;
}
body.modo-completa .noticias-feed {
    display: none !important;
}

body.modo-completa .marquee-wrapper .marquee-extracto {
    display: none !important;
}

/* Responsive para grid compacto */
@media (max-width: 576px) {
    .grid-compacto {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    .grid-compacto .station-img {
        width: 50px !important;
        height: 50px !important;
    }
    .mini-play-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}
@media (max-width: 360px) {
    .grid-compacto {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.4rem !important;
    }
}


/* Panel Redes Sociales - Estilos correctos (sin romper otros paneles) */
.redes-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1050;
}

.redes-overlay.open {
    display: block;
}

.redes-panel {
    position: fixed;
    right: -360px;
    top: 0;
    width: 340px;
    max-width: 90vw;
    height: 100vh;
    background: #111111;
    border-left: 2px solid var(--primary-color);
    box-shadow: -4px 0 20px rgba(0,0,0,0.5);
    padding: 1rem;
    z-index: 1100;
    overflow-y: auto;
    transition: right 0.3s ease;
}

.redes-panel.open { right: 0; }

.close-redes {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    float: right;
}

.redes-body {
    padding: 0.5rem 0;
    color: #ddd;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* Items internos del panel redes */
.redes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.redes-item {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 0.75rem;
    border: 1px solid rgba(255,255,255,0.1);
    transition: background 0.2s;
}

.redes-item:hover {
    background: rgba(255,255,255,0.08);
}

.redes-btn {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    background: rgba(209,0,0,0.15);
    border: 1px solid rgba(209,0,0,0.3);
    cursor: pointer;
    transition: background 0.2s;
}

.redes-btn:hover {
    background: rgba(209,0,0,0.35);
}

.redes-desc {
    font-size: 0.7rem;
    color: #888;
    margin-top: 0.4rem;
    padding-left: 0.25rem;
}

.redes-panel h3 i {
    margin-right: 0.4rem;
    color: var(--primary-color);
}