@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Roboto+Slab:wght@400;700&family=Orbitron&display=swap');

/* Reset some */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; padding: 0;
  background: linear-gradient(135deg, #1b030d, #000000, #1b0511);
  color: #eee; font-family: 'Roboto Slab', serif;
  display: flex; flex-direction: column; height: 100vh; overflow: hidden;
  overflow: hidden; /* Ya tenías esto, ayuda a que el body no sea scrollable */
}

/* --- Pantalla de Carga --- */
#loading-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: #0c131a; 
    display: flex; 
    flex-direction: column;
    align-items: center; justify-content: center; z-index: 20000;
    color: #ccc; text-align: center;
}
.loading-logo { width: 80px; height: 80px; margin-bottom: 20px; filter: drop-shadow(0 0 5px #fff); }
.loading-title {
    font-family: 'Orbitron', sans-serif; font-size: 2rem; color: #ffffff;
    text-shadow: 0 0 6px #ffffff, 0 0 12px #050505; margin-bottom: 30px;
}
.loading-spinner {
    border: 6px solid #333; border-top: 6px solid #d91e18;
    border-radius: 50%; width: 60px; height: 60px;
    animation: spin 1s linear infinite; margin-bottom: 20px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.loading-status-text { font-size: 1rem; color: #aaa; margin-bottom: 30px; min-height: 1.2em; }
.loading-developer { font-family: 'Orbitron', sans-serif; font-size: 0.8rem; color: #777; position: absolute; bottom: 20px; }

/* --- Header --- */

header {
  background: linear-gradient(135deg, #4b122a, #000000, #390e25); 
  padding: 12px 16px; display: flex;
  align-items: center; 
  gap: 12px; /* Ajustar gap si es necesario */
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  position: relative; 
  z-index: 100; 
}

header img#header-logo { width: 36px; height: 36px; filter: drop-shadow(0 0 2px #fff); flex-shrink: 0;}
header h1#header-title {
  font-family: 'Orbitron', sans-serif; font-size: 1.3rem; 
  font-weight: 700;
  letter-spacing: 1px; 
  margin: 0; color: #ffffff;
  text-shadow: 0 0 6px #070707, 0 0 12px #575757;
  user-select: none; 
  flex-grow: 0.5; /* Puede necesitar ajuste para centrar con el buscador */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: auto; /* Empuja el buscador y el botón de settings (ahora en nav) a la derecha */
}

.header-button:hover { color: #fff; background-color: rgba(255,255,255,0.1); }
.header-button svg { width: 24px; height: 24px; }

/* --- Estilos para el Buscador en el Header --- */
.search-container {
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.08); 
  border-radius: 18px; 
  padding: 5px 10px;
  /* margin-left: auto; Quitado para que se posicione con flex */
  flex-grow: 1; /* Permitir que el buscador ocupe espacio */
  flex-shrink: 1;
  min-width: 120px;
  max-width: 300px; /* Limitar ancho máximo */
  margin-right: 8px; /* Espacio antes del botón de config */
  border: 1px solid rgba(255, 255, 255, 0.15);
}
#search-input {
  flex-grow: 1;
  background: transparent;
  border: none;
  color: #e0e0e0;
  font-size: 0.9rem;
  padding: 4px;
  outline: none;
  font-family: 'Roboto', sans-serif;
}
#search-input::placeholder {
  color: #a0a0a0;
  opacity: 1;
}
.search-clear-button {
  background: transparent;
  border: none;
  color: #a0a0a0;
  font-size: 1.3rem; /* Tamaño de la X */
  line-height: 1;
  padding: 0 0 0 6px; /* Padding a la izquierda de la X */
  cursor: pointer;
  align-self: center;
}
.search-clear-button:hover {
  color: #fff;
}

/* --- Main Content --- */
main#stations-list-container { 
  flex: 1; overflow-y: auto; padding: 12px 16px; 
  padding-bottom: 137px; 
  scrollbar-width: thin; scrollbar-color: #d91e18 transparent;
  overscroll-behavior-y: contain; /* AÑADIDO: Para el contenedor de scroll principal */
}
.station-card {
  background: rgba(255,255,255,0.06); border-radius: 12px; margin-bottom: 16px;
  padding: 14px 16px; display: flex; align-items: center; gap: 12px;
  cursor: pointer; transition: background 0.3s ease, transform 0.15s ease;
  box-shadow: 0 0 20px rgba(217,30,24,0);
}
.station-card:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); box-shadow: 0 0 20px rgba(217,30,24,0.7); }
.station-card.playing { background: #9b054369; box-shadow: 0 0 25px #a71c51; }
.station-logo {
  flex-shrink: 0; width: 60px; height: 60px; border-radius: 10px;
  object-fit: cover; box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  background-color: rgba(255,255,255,0.05); 
}
.station-info { flex: 1; margin-left: 0; color: #eee; overflow: hidden; }
.station-name {
  font-weight: 700; font-size: 1.1rem; margin-bottom: 4px;
  letter-spacing: 0.4px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.station-desc {
  font-size: 0.8rem; color: #bbb; font-style: italic;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.station-actions { display: flex; align-items: center; gap: 8px; }
.play-button, .favorite-button {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: transparent; color: #eee; cursor: pointer;
  transition: color 0.3s ease, transform 0.2s ease; outline-offset: 4px;
  display: flex; align-items: center; justify-content: center;
}
.play-button:hover, .favorite-button:hover { color: #ff7777; transform: scale(1.1); }
.play-button svg, .favorite-button svg { width: 20px; height: 20px; }
.favorite-button.is-favorite svg { fill: #ff5858; stroke: #ff5858; }
.favorite-button.is-favorite:hover svg{ fill: #ff7777; stroke: #ff7777; }

/* --- Player Footer Compacto --- */
footer#player-footer { 
  position: fixed; bottom: 60px; left: 10px; right: 10px; width: auto; 
  background: #4b122a7d; color: #ffffff; border-radius: 12px; 
  padding: 0 15px; height: 65px; display: flex;
  align-items: center; justify-content: space-between;
  font-family: 'Roboto', sans-serif; user-select: none; 
  z-index: 1100; box-shadow: 0 -2px 8px rgba(0,0,0,0.25);
  overflow: hidden; 
}
#btn-main-play-pause-compact { order: 1; margin-right: 12px; }
#player-info-compact { order: 2; flex-grow: 1; overflow: hidden; text-align: left; cursor: pointer;}
#player-station-name-compact {
    font-size: 0.9rem; font-weight: 500; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; margin-bottom: 1px; color: #fff;
}
#player-station-artist-compact { 
    font-size: 0.75rem; opacity: 0.85; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; color: #f0f0f0;
}
#player-accessory-controls-compact { order: 3; display: flex; align-items: center; gap: 10px; margin-left: 12px; }
.player-control-button-compact {
  background: transparent; border: none; color: #ffffff; 
  cursor: pointer; padding: 8px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}
.player-control-button-compact:hover { background-color: rgba(255, 255, 255, 0.15); }
.player-control-button-compact:active { background-color: rgba(255, 255, 255, 0.25); }
.player-control-button-compact svg { width: 20px; height: 20px; fill: currentColor; }
#btn-main-play-pause-compact svg { width: 24px; height: 24px; }
#btn-favorite-compact svg.fav-icon-compact { width: 20px; height: 20px; }
#player-favorite-icon-filled-compact{ color: #fff; }

/* --- Bottom Navigation --- */
#bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; height: 60px;
    background: linear-gradient(135deg, #4b122a, #000000, #390e25); border-top: 1px solid #2c074e;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.6); display: flex;
    justify-content: space-around; align-items: center; z-index: 1050;
}

.nav-button svg { width: 24px; height: 24px; margin-bottom: 2px; fill: currentColor;}
.nav-button.active { color: #ff0068; }
.nav-button:hover { color: rgb(255, 0, 85); }

/* --- Modal de Configuración (Estilos mejorados de respuesta anterior) --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0,0,0,0.8); display: none; 
    align-items: center; justify-content: center; z-index: 15000;
    padding: 16px; opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.modal-overlay.visible { display:flex; opacity: 1; visibility: visible; transition: opacity 0.3s ease, visibility 0s linear 0s; }
.modal-content {
    background: linear-gradient(135deg, #230411, #000000, #230716); padding: 28px; border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5); width: 100%;
    max-width: 500px; position: relative; color: #e0e0e0;
    max-height: 85vh; overflow-y: auto; transform: scale(0.95);
    transition: transform 0.3s ease; font-family: 'Roboto', sans-serif;
}
.modal-overlay.visible .modal-content { transform: scale(1); }
.modal-content h2 {
    margin-top: 0; color: #ef6a6a; font-family: 'Orbitron', sans-serif;
    text-align: center; margin-bottom: 35px; font-size: 1.7rem; letter-spacing: 1px;
}
.close-button {
    position: absolute; top: 15px; right: 15px; background: rgba(255,255,255,0.08);
    border: none; font-size: 1.6rem; color: #b0b0b0; cursor: pointer; line-height: 1;
    border-radius: 50%; width: 36px; height: 36px; display: flex;
    align-items: center; justify-content: center; transition: background-color 0.2s ease, color 0.2s ease;
}
.close-button:hover { color: #fff; background: rgba(255,255,255,0.15); }
.setting-item { margin-bottom: 28px; padding-top: 22px; border-top: 1px solid #3a314f; }
.setting-item:first-of-type { border-top: none; padding-top: 0; }
.setting-item label {
    display: block; font-size: 0.95rem; color: #c8c8c8;
    margin-bottom: 12px; font-weight: 500;
}
.setting-item select {
    width: 100%; padding: 14px 18px; background-color: #1c1627;
    border: 1px solid #4a415f; border-radius: 8px; color: #e0e0e0;
    font-family: 'Roboto', sans-serif; font-size: 1rem;
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c0c0c0' width='20px' height='20px'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 18px center;
    cursor: pointer; transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.setting-item select:focus {
    outline: none; border-color: #8637a7;
    box-shadow: 0 0 0 3px rgba(134, 55, 167, 0.25);
}
.setting-item h3 {
    font-family: 'Roboto Slab', serif; font-size: 1.2rem; color: #d8d8d8;
    margin-bottom: 15px; margin-top: 0; font-weight: 700;
    border-bottom: 1px solid #3a314f; padding-bottom: 10px;
}
.setting-item p {
    font-size: 0.95rem; line-height: 1.65; color: #b8b8b8; margin-bottom: 10px;
}
.setting-item p strong { color: #d0d0d0; font-weight: 500; margin-right: 8px; }
.setting-item a#privacy-policy-link {
    color: #aa77cc; text-decoration: none; font-weight: 500;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}
.setting-item a#privacy-policy-link:hover { color: #c399e6; text-decoration: underline; }

/* --- Reproductor Expandido (Estilos de respuesta anterior) --- */
.full-player-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: #120c18; z-index: 12000; display: flex;
    flex-direction: column; align-items: center; justify-content: flex-start; 
    opacity: 0; visibility: hidden; transform: translateY(100%);
    transition: opacity 0.4s ease-out, visibility 0s linear 0.4s, transform 0.4s ease-out;
    color: #fff; font-family: 'Roboto', sans-serif;
    padding-top: env(safe-area-inset-top, 0); 
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.full-player-overlay.visible {
    opacity: 1; visibility: visible; transform: translateY(0%);
    transition: opacity 0.4s ease-out, visibility 0s linear 0s, transform 0.4s ease-out;
}
#fp-background-art {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    filter: blur(20px) brightness(0.4); transform: scale(1.1); 
    z-index: -1; opacity: 0.7;
}
.fp-content {
    width: 100%; max-width: 500px; height: 100%;
    display: flex; flex-direction: column; padding: 20px;
    box-sizing: border-box; position: relative;
}
.fp-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; margin-bottom: 20px;
}
.fp-header-title {
    font-size: 1rem; font-weight: 500; text-align: center;
    flex-grow: 1; overflow: hidden; white-space: nowrap;
    text-overflow: ellipsis; padding: 0 10px;
}
.fp-control-btn {
    background: transparent; border: none; color: #e0e0e0;
    padding: 8px; cursor: pointer; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.fp-control-btn:hover { color: #fff; }
.fp-control-btn svg { width: 24px; height: 24px; fill: currentColor; }
#fp-close-btn svg { transform: rotate(90deg); }
.fp-art-container {
    width: 100%; padding-top: 75%; position: relative;
    margin-bottom: 30px; border-radius: 12px;
    overflow: hidden; box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}
#fp-station-logo {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; background-color: #333;
}
.fp-info-container { text-align: center; margin-bottom: 25px; }
#fp-station-name {
    font-size: 1.6rem; font-weight: 700;
    margin-bottom: 8px; letter-spacing: 0.5px;
}
#fp-station-description {
    font-size: 0.9rem; color: #b0b0b0;
    max-height: 4.5em; overflow: hidden; text-overflow: ellipsis;
}
.fp-progress-bar-container {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 20px; width: 100%;
}
.fp-time { font-size: 0.75rem; color: #aaa; min-width: 35px; }
#fp-current-time { text-align: right;}
#fp-total-time { text-align: left;}
.fp-progress-bar-wrapper {
    flex-grow: 1; height: 5px; background-color: rgba(255,255,255,0.2);
    border-radius: 3px; overflow: hidden;
}
.fp-progress-bar {
    width: 0%; height: 100%; background-color: #fff;
    border-radius: 3px; transition: width 0.1s linear;
}
.fp-main-controls {
    display: flex; justify-content: space-around; align-items: center;
    padding: 15px 0; margin-top: auto; margin-bottom: 5px;
}
.fp-main-controls .fp-control-btn svg { width: 28px; height: 28px; }
.fp-main-controls .fp-control-btn.large svg { width: 32px; height: 32px; }
.fp-main-controls .fp-control-btn.very-large {
    background-color: rgba(255,255,255,0.1); border-radius: 50%;
    margin: 0 10px;
}
.fp-main-controls .fp-control-btn.very-large:hover { background-color: rgba(255,255,255,0.2); }
.fp-main-controls .fp-control-btn.very-large svg { width: 36px; height: 36px; }
#fp-shuffle-btn.active, #fp-favorite-btn.active { color: #8637a7; }
#fp-favorite-btn.active #fp-favorite-icon-filled { display: inline-block !important; }
#fp-favorite-btn.active #fp-favorite-icon-empty { display: none !important; }

/* --- Estilos para el Contenedor de Volumen --- */
.fp-volume-container {
    display: flex; align-items: center; justify-content: center; 
    gap: 10px; padding: 10px 15px; width: 100%;
    max-width: 380px; margin: 5px auto 15px auto; 
    box-sizing: border-box;
}
.fp-volume-icon-btn { padding: 6px; }
.fp-volume-icon-btn svg { width: 22px; height: 22px; }
.fp-volume-slider {
    flex-grow: 1; height: 6px; -webkit-appearance: none; appearance: none;
    background: rgba(255,255,255,0.2); border-radius: 3px;
    cursor: pointer; outline: none;
}
.fp-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 16px; height: 16px;
    background: #fff; border-radius: 50%; border: none;
    box-shadow: 0 0 4px rgba(0,0,0,0.3); transition: background 0.2s ease;
}
.fp-volume-slider::-webkit-slider-thumb:hover { background: #f0f0f0; }
.fp-volume-slider::-moz-range-thumb {
    width: 16px; height: 16px; background: #fff; border-radius: 50%;
    border: none; box-shadow: 0 0 4px rgba(0,0,0,0.3);
    cursor: pointer; transition: background 0.2s ease;
}
.fp-volume-slider::-moz-range-thumb:hover { background: #f0f0f0; }
.fp-volume-slider::-moz-range-track {
    background: rgba(255,255,255,0.2); border-radius: 3px; height: 6px;
}
.fp-volume-percentage {
    font-size: 0.8rem; color: #bbb; min-width: 40px; text-align: right;
}


noscript {
  display: block; padding: 16px; background: #d91e18;
  color: white; text-align: center; font-weight: bold;
}

@media (max-width: 600px) { 
  header h1#header-title {
     font-size: 1.1rem; /* Más pequeño para dar espacio al buscador */
     /* flex-grow: 0; Si el título es muy largo y quieres que el buscador tenga prioridad */
     /* margin-right: 5px; */
  }
  .search-container {
    margin-left: 5px; 
    flex-grow: 1; 
    max-width: none; 
    margin-right: 5px;
  }
  header { gap: 8px; padding: 10px 12px;}
  main#stations-list-container { padding: 10px 12px; padding-bottom: calc(60px + 56px + 10px); }
  footer#player-footer {
    height: 60px; padding: 0 10px; bottom: 56px; 
    left: 5px; right: 5px; border-radius: 8px;
  }
  #player-info-compact { margin-right: 8px; }
  #player-station-name-compact { font-size: 0.8rem; }
  #player-station-artist-compact { font-size: 0.65rem; }
  #player-accessory-controls-compact { gap: 6px; margin-left: 8px; }
  .player-control-button-compact svg { width: 18px; height: 18px; }
  #btn-main-play-pause-compact svg { width: 22px; height: 22px;}
  #btn-favorite-compact svg.fav-icon-compact { width: 18px; height: 18px; }
  .station-card { padding: 10px 12px; gap: 8px;}
  .station-logo { width: 45px; height: 45px; }
  #bottom-nav { height: 56px; }
  .nav-button { font-size: 0.65rem; padding: 4px 8px; }
  .nav-button svg { width: 22px; height: 22px; }
  .modal-content { padding: 20px; max-height: 90vh;}
  .modal-content h2 { font-size: 1.5rem; margin-bottom: 25px; }
  .setting-item select, .setting-item label, .setting-item p, .setting-item h3 { font-size: 0.9rem; }
  .setting-item h3 { font-size: 1.1rem; }
  .setting-item select { padding: 12px 15px; background-position: right 12px center; }
}
@media (max-width: 380px) { 
    header h1#header-title {
        font-size: 1rem;
    }
    .search-container { padding: 2px 6px; }
    #search-input { font-size: 0.8rem; }

    .fp-art-container { padding-top: 85%; margin-bottom: 20px;}
    #fp-station-name { font-size: 1.4rem; }
    #fp-station-description { font-size: 0.85rem; }
    .fp-main-controls .fp-control-btn svg { width: 24px; height: 24px; }
    .fp-main-controls .fp-control-btn.large svg { width: 28px; height: 28px; }
    .fp-main-controls .fp-control-btn.very-large svg { width: 32px; height: 32px; }
    .fp-header-title { font-size: 0.9rem;}
}

/* ... (Estilos existentes de Reset, Pantalla de Carga) ... */

/* --- Header --- */

header img#header-logo { width: 36px; height: 36px; filter: drop-shadow(0 0 2px #fff); flex-shrink: 0;}
header h1#header-title {
  font-family: 'Orbitron', sans-serif; font-size: 1.4rem; /* Restablecido */
  font-weight: 700;
  letter-spacing: 1.5px; /* Restablecido */
  margin: 0; color: #ffffff;
  text-shadow: 0 0 6px #070707, 0 0 12px #575757;
  user-select: none; 
  flex-grow: 1; /* Título vuelve a crecer */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* ELIMINAR o comentar estilos para .search-container del header si existían */
/* .search-container { ... } */
/* #search-input { ... } */
/* .search-clear-button { ... } */


/* --- Main Content --- */
main#stations-list-container { 
  flex: 1; overflow-y: auto; padding: 12px 16px; 
  /* Ajustar padding-bottom si la barra de búsqueda inferior NO es overlay */
  /* Si es overlay, el padding actual para player + nav está bien */
  padding-bottom: 137px; 
  scrollbar-width: thin; scrollbar-color: #d91e18 transparent;
}

/* ... (Estilos de .station-card, .player-footer sin cambios) ... */

/* --- Bottom Navigation --- */
#bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; height: 60px;
    background: #110a16; border-top: 1px solid #8d0a3c;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.6); display: flex;
    justify-content: space-around; align-items: center; z-index: 1050;
}
.nav-button {
    background: transparent; border: none; color: #aaa;
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; font-size: 0.7rem; padding: 6px 12px;
    cursor: pointer; flex-grow: 1; transition: color 0.3s ease; height: 100%;
}


/* --- NUEVO: Estilos para la Barra de Búsqueda Inferior --- */
.bottom-search-bar {
    position: fixed;
    bottom: 60px; /* Altura del bottom-nav */
    left: 0;
    right: 0;
    background-color: #180e22; /* Un color de fondo ligeramente diferente al nav */
    padding: 8px 15px;
    box-shadow: 0 -2px 6px rgba(0,0,0,0.3);
    z-index: 1040; /* Debajo del nav y del player footer, pero encima del contenido principal */
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateY(100%); /* Inicialmente oculta abajo */
    transition: transform 0.3s ease-out;
    border-top: 1px solid #2c074e;
}
.bottom-search-bar.visible {
    transform: translateY(0%);
}
.bottom-search-bar #search-input { /* Reutiliza ID search-input */
  flex-grow: 1;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #e0e0e0;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 18px;
  outline: none;
  font-family: 'Roboto', sans-serif;
}
.bottom-search-bar #search-input::placeholder {
  color: #a0a0a0;
}
.bottom-search-bar .search-clear-button { /* Reutiliza clase search-clear-button */
  background: transparent;
  border: none;
  color: #a0a0a0;
  font-size: 1.4rem;
  line-height: 1;
  padding: 0 6px;
  cursor: pointer;
}
.bottom-search-bar .search-clear-button:hover {
  color: #fff;
}

/* ... (Resto de estilos: Modal de Configuración, Reproductor Expandido, etc. sin cambios) ... */

@media (max-width: 600px) {
  /* ... (Ajustes existentes para móvil) ... */
  header h1#header-title {
     font-size: 1.3rem; /* Ajustado para asegurar que no haya problemas de espacio */
  }
  .bottom-search-bar #search-input {
    font-size: 0.9rem;
    padding: 7px 10px;
  }
  main#stations-list-container { 
    /* padding-bottom no necesita cambiar si la barra de búsqueda es overlay */
  }
}
/* ... (Otros media queries) ... */

/* NUEVO: Control de overscroll para el viewport */
html, body {
  overscroll-behavior-y: contain;
}