/* ============================================================
   Emisoras Colombia — Styles
   Apple-inspired minimalist design
   ============================================================ */

/* --- CSS Variables (Light/Dark) --- */
:root,
[data-theme="light"] {
  --bg: #F5F5F7;
  --text: #1D1D1F;
  --accent: #0071E3;
  --surface: #FFFFFF;
  --border: #D2D2D7;
  --muted: #86868B;
  --shadow: rgba(0, 0, 0, 0.08);
  --shadow-hover: rgba(0, 0, 0, 0.14);
  --header-bg: rgba(245, 245, 247, 0.72);
  --player-bg: rgba(255, 255, 255, 0.82);
  --skeleton-base: #E8E8ED;
  --skeleton-shine: #F5F5F7;
  --heart-fill: #FF3B30;
  --online-badge: #34C759;
  --offline-badge: #FF3B30;
}

[data-theme="dark"] {
  --bg: #1C1C1E;
  --text: #F5F5F7;
  --accent: #0A84FF;
  --surface: #2C2C2E;
  --border: #3A3A3C;
  --muted: #98989D;
  --shadow: rgba(0, 0, 0, 0.3);
  --shadow-hover: rgba(0, 0, 0, 0.5);
  --header-bg: rgba(28, 28, 30, 0.72);
  --player-bg: rgba(44, 44, 46, 0.82);
  --skeleton-base: #3A3A3C;
  --skeleton-shine: #48484A;
  --heart-fill: #FF453A;
  --online-badge: #30D158;
  --offline-badge: #FF453A;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

input {
  font: inherit;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* --- Focus Indicators --- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Remove default focus for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* --- Screen Reader Only --- */
.sr-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  gap: 16px;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--text);
  transition: opacity 0.2s;
}

.header__logo:hover {
  opacity: 0.7;
}

.header__logo-icon {
  color: var(--accent);
}

.header__title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* Search */
.header__search {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.header__search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.header__search-input {
  width: 100%;
  height: 40px;
  padding: 0 16px 0 40px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  font-size: 0.9375rem;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.3s;
  -webkit-appearance: none;
  appearance: none;
}

.header__search-input::placeholder {
  color: var(--muted);
}

.header__search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

[data-theme="dark"] .header__search-input:focus {
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.2);
}

/* Remove search clear button styling in webkit */
.header__search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

/* Theme Toggle */
.header__theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background 0.2s;
  color: var(--text);
}

.header__theme-toggle:hover {
  background: var(--border);
}

/* Show/hide sun/moon based on theme */
[data-theme="light"] .icon-moon,
[data-theme="dark"] .icon-sun {
  display: none;
}

[data-theme="light"] .icon-sun,
[data-theme="dark"] .icon-moon {
  display: block;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 20px 96px;
  min-height: 100vh;
}

/* ============================================================
   SEO HEADING
   ============================================================ */
.main__heading {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

/* ============================================================
   OFFLINE BANNER
   ============================================================ */
.offline-banner {
  position: fixed;
  top: 68px; /* below header */
  left: 0;
  right: 0;
  padding: 8px 16px;
  background: var(--offline-badge);
  color: #FFFFFF;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 29;
}

.offline-banner[hidden] {
  display: none;
}

/* ============================================================
   FILTERS
   ============================================================ */
.filters {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filters__row {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  align-items: center;
  flex-wrap: wrap;
}

.filters__row::-webkit-scrollbar {
  display: none;
}

/* Mobile: single-line scroll, no wrap */
@media (max-width: 768px) {
  .filters__row {
    flex-wrap: nowrap;
  }
}

/* Filter Pill */
.filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.6875rem;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  user-select: none;
}

.filter-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-pill--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}

.filter-pill--active:hover {
  opacity: 0.9;
  color: #FFFFFF;
}

/* ============================================================
   SECTIONS: FAVORITES & RECENTS
   ============================================================ */
.section-favorites {
  margin-bottom: 12px;
}

.section__title {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 4px;
  color: var(--muted);
}

.section__scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 6px 0 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  flex-wrap: wrap;
}

.section__scroll::-webkit-scrollbar {
  display: none;
}

/* Mobile: single-line scroll, no wrap */
@media (max-width: 768px) {
  .section__scroll {
    flex-wrap: nowrap;
  }
}

/* --- Mini Station Card (for Favorites / Recents) --- */
.mini-card {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  min-width: 120px;
  max-width: 120px;
  padding: 4px 8px;
  background: var(--surface);
  border-radius: 8px;
  box-shadow: 0 1px 2px var(--shadow);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  flex-shrink: 0;
  user-select: none;
}

.mini-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px var(--shadow-hover);
}

.mini-card__logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg);
  flex-shrink: 0;
}

.mini-card__logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--muted);
  flex-shrink: 0;
}

.mini-card__logo-placeholder svg {
  width: 12px;
  height: 12px;
}

.mini-card__name {
  font-size: 0.5625rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  flex: 1;
  min-width: 0;
}

.mini-card__heart {
  position: absolute;
  top: -5px;
  right: -4px;
  font-size: 0.55rem;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border-radius: 50%;
  box-shadow: 0 1px 3px var(--shadow);
  color: var(--heart-fill);
  line-height: 1;
}

/* --- Heart on station card --- */
.station-card__fav .icon-heart-sm {
  transition: transform 0.2s;
}

.station-card__fav--active .icon-heart-sm {
  fill: var(--heart-fill);
  stroke: var(--heart-fill);
}

@keyframes heart-pop-card {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.35); }
  60%  { transform: scale(0.85); }
  100% { transform: scale(1); }
}

.station-card__fav--animate {
  animation: heart-pop-card 0.4s ease;
}

/* ============================================================
   STATION GRID
   ============================================================ */
.grid-section {
  min-height: 200px;
}

.station-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .station-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .station-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --- Station Card --- */
.station-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 20px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 1px 3px var(--shadow);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.station-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow-hover);
}

.station-card__logo {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  object-fit: cover;
  background: var(--bg);
  margin-bottom: 12px;
}

.station-card__logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 16px;
  background: var(--bg);
  color: var(--muted);
  margin-bottom: 12px;
}

.station-card__name {
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 4px;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.station-card__city {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.station-card__genre {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--accent);
  color: #FFFFFF;
  opacity: 0.85;
}

/* Play overlay on hover — default state (not playing) */
.station-card__play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 16px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.station-card:hover .station-card__play-overlay {
  opacity: 1;
}

.station-card__play-overlay svg {
  color: #FFFFFF;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* --- Buffering state: spinner centered, always visible --- */
.station-card--buffering {
  box-shadow: 0 0 0 2px var(--accent), 0 8px 24px var(--shadow-hover);
}

.station-card--buffering .station-card__play-overlay {
  opacity: 1;
  background: rgba(0, 0, 0, 0.45);
}

.station-card--buffering .station-card__play-overlay svg {
  display: none;
}

.station-card--buffering .station-card__play-overlay::after {
  content: '';
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #FFFFFF;
  animation: spin 0.7s linear infinite;
}

/* --- Playing state: pause icon visible on hover --- */
.station-card--playing {
  box-shadow: 0 0 0 2px var(--accent), 0 8px 24px var(--shadow-hover);
}

/* Station number */
.station-card__number {
  position: absolute;
  bottom: 6px;
  right: 6px;
  font-size: 0.5625rem;
  font-weight: 500;
  color: var(--muted);
  opacity: 0.5;
  pointer-events: none;
  z-index: 1;
}

/* Offline badge */
.station-card__badge-offline {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  background: var(--offline-badge);
  color: #FFFFFF;
}

/* Favorite heart on card */
.station-card__fav {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 4px var(--shadow);
  transition: transform 0.2s;
  z-index: 2;
}

.station-card__fav:hover {
  transform: scale(1.15);
}

/* ============================================================
   SKELETON LOADING
   ============================================================ */
.skeleton-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 20px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 1px 3px var(--shadow);
}

.skeleton-card__circle {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  background: var(--skeleton-base);
  margin-bottom: 12px;
  animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-card__line {
  height: 14px;
  border-radius: 7px;
  background: var(--skeleton-base);
  animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-card__line--title {
  width: 70%;
  margin-bottom: 8px;
  animation-delay: 0.1s;
}

.skeleton-card__line--subtitle {
  width: 50%;
  margin-bottom: 10px;
  animation-delay: 0.2s;
}

.skeleton-card__line--badge {
  width: 40%;
  height: 22px;
  border-radius: 10px;
  animation-delay: 0.3s;
}

@keyframes shimmer {
  0%, 100% {
    background: var(--skeleton-base);
  }
  50% {
    background: var(--skeleton-shine);
  }
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 20px;
  text-align: center;
}

.empty-state__icon {
  color: var(--muted);
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state__text {
  font-size: 1.0625rem;
  color: var(--muted);
  margin-bottom: 20px;
}

.empty-state__btn {
  padding: 10px 24px;
  border-radius: 20px;
  font-size: 0.9375rem;
  font-weight: 600;
  background: var(--accent);
  color: #FFFFFF;
  transition: opacity 0.2s;
}

.empty-state__btn:hover {
  opacity: 0.85;
}

/* ============================================================
   PLAYER BAR
   ============================================================ */
.player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--player-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.3s ease, border-color 0.3s ease;
}

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

.player__shortcuts-hint {
  text-align: center;
  padding: 4px 0 6px;
  font-size: 0.625rem;
  color: var(--muted);
  opacity: 0.6;
  letter-spacing: 0.02em;
}

.player__shortcuts-hint kbd {
  display: inline-block;
  padding: 1px 5px;
  font-size: 0.6rem;
  font-family: inherit;
  background: rgba(128,128,128,0.15);
  border-radius: 3px;
  border: 1px solid rgba(128,128,128,0.25);
}

.player__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  height: 64px;
  padding: 0 20px;
  height: 100%;
  gap: 16px;
}

/* Player Left: Info */
.player__info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.player__logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.player__logo img {
  width: 40px;
  height: 40px;
  object-fit: cover;
}

.player__logo-placeholder {
  color: var(--muted);
}

.player__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.player__name {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player__city {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Player Center: Controls */
.player__controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.player__play-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #FFFFFF;
  transition: transform 0.15s, opacity 0.2s;
}

.player__play-btn:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

.player__play-btn:active {
  transform: scale(0.95);
}

/* Audio Visualization Bars */
.player__viz {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 24px;
}

.player__viz-bar {
  width: 3px;
  border-radius: 1.5px;
  background: var(--accent);
  animation: viz-pulse 1s ease-in-out infinite;
  animation-play-state: paused;
}

.player__viz-bar:nth-child(1) { height: 8px;  animation-delay: 0s; }
.player__viz-bar:nth-child(2) { height: 16px; animation-delay: 0.15s; }
.player__viz-bar:nth-child(3) { height: 12px; animation-delay: 0.3s; }
.player__viz-bar:nth-child(4) { height: 20px; animation-delay: 0.45s; }

.player--playing .player__viz-bar {
  animation-play-state: running;
}

@keyframes viz-pulse {
  0%, 100% { transform: scaleY(0.4); }
  50%      { transform: scaleY(1); }
}

/* Player Right: Actions */
.player__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  position: relative;
}

/* Volume */
.player__volume {
  display: flex;
  align-items: center;
  gap: 6px;
}

.player__volume-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: background 0.2s;
  color: var(--text);
}

.player__volume-btn:hover {
  background: var(--border);
}

/* Volume Slider — Apple style */
.player__volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  outline: none;
  cursor: pointer;
  transition: background 0.2s;
}

.player__volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
  transition: transform 0.15s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.player__volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.player__volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.player__volume-slider::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: var(--border);
}

/* Volume slider focus */
.player__volume-slider:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Muted state — dim the slider */
.player__volume--muted .player__volume-slider {
  opacity: 0.4;
}

/* Timer Button */
.player__timer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: background 0.2s;
  color: var(--text);
}

.player__timer-btn:hover {
  background: var(--border);
}

.player__timer-btn--active {
  color: var(--accent);
}

.player__timer-btn--active .player__timer-countdown {
  font-size: 0.6875rem;
  font-weight: 600;
}

/* Timer Popover */
.timer-popover {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 8px 32px var(--shadow-hover);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 120px;
  z-index: 110;
}

.timer-popover[hidden] {
  display: none;
}

.timer-popover__option,
.timer-popover__cancel {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  transition: background 0.15s;
  color: var(--text);
}

.timer-popover__option:hover {
  background: var(--bg);
}

.timer-popover__cancel {
  color: var(--offline-badge);
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 10px;
}

.timer-popover__cancel:hover {
  background: var(--bg);
}

/* Favorite Heart Button */
.player__fav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: background 0.2s, transform 0.2s;
  color: var(--text);
}

.player__fav-btn:hover {
  background: var(--border);
}

.player__fav-btn--active {
  color: var(--heart-fill);
}

.player__fav-btn--active .icon-heart {
  fill: var(--heart-fill);
  stroke: var(--heart-fill);
}

/* Heart animation */
@keyframes heart-pop {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.3); }
  60%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}

.player__fav-btn--animate {
  animation: heart-pop 0.4s ease;
}

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 767px) {
  .header__title {
    font-size: 0;
    width: 0;
    overflow: hidden;
  }

  .header__search {
    max-width: none;
  }

  .main {
    padding: 72px 16px 80px;
  }

  /* Player: simplify on mobile */
  .player__shortcuts-hint {
    display: none;
  }

  .player__volume {
    display: none;
  }

  .player__inner {
    padding: 0 12px;
    gap: 8px;
  }

  .player__play-btn {
    width: 40px;
    height: 40px;
  }

  .player__play-btn svg {
    width: 24px;
    height: 24px;
  }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
  .main {
    padding: 80px 24px 96px;
  }
}

/* ============================================================
   TRANSITIONS — Theme Switching
   ============================================================ */
.header,
.player,
.station-card,
.filter-pill,
.header__search-input,
.empty-state__btn,
.player__play-btn,
.timer-popover {
  transition-property: background, background-color, border-color, color, box-shadow;
  transition-duration: 0.3s;
  transition-timing-function: ease;
}

/* Player bar transform transition override (keep slide animation) */
.player {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.3s ease, border-color 0.3s ease;
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 24px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 8px 32px var(--shadow-hover);
  z-index: 200;
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  white-space: nowrap;
}

.toast--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Timer button — active state with countdown */
.player__timer-btn--active {
  width: auto;
  border-radius: 16px;
  padding: 0 10px;
}

/* ============================================================
   BUFFERING INDICATOR
   ============================================================ */
.player--buffering .player__play-btn {
  position: relative;
  pointer-events: none;
}

/* Hide play/pause icons during buffering — spinner is the only indicator */
.player--buffering .player__play-btn svg {
  visibility: hidden;
}

.player--buffering .player__play-btn::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,0.25);
  border-top-color: #FFFFFF;
  animation: spin 0.7s linear infinite;
}

.player--buffering .player__station-name::after {
  content: ' — Cargando...';
  color: var(--muted);
  font-weight: 400;
  font-size: 0.75rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 120px;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
}

.footer__heading {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.footer__link {
  font-size: 0.8125rem;
  color: var(--text);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.footer__link:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer__about {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 12px;
}

.footer__bottom {
  grid-column: 1 / -1;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.footer__copy {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}

/* Footer responsive */
@media (max-width: 768px) {
  .footer__inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
