:root {
  --background: #f5f7fb;
  --foreground: #14213d;
  --card: #ffffff;
  --card-foreground: #14213d;
  --popover: #ffffff;
  --popover-foreground: #14213d;
  --primary: #e32233;
  --primary-foreground: #ffffff;
  --secondary: #e8edf7;
  --secondary-foreground: #14213d;
  --muted: #edf1f7;
  --muted-foreground: #65708a;
  --accent: #e8edf7;
  --accent-foreground: #14213d;
  --destructive: #c7182a;
  --border: #dbe2ee;
  --input: #d5deec;
  --ring: #e32233;
  --radius: 0.9rem;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(circle at 78% 8%, rgba(35, 84, 157, .08), transparent 25rem), var(--background);
  color: var(--foreground);
  font-family: "Aptos", "Segoe UI", Arial, sans-serif;
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
svg {
  display: block; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 2.25rem; padding: .5rem .9rem; border: 0; border-radius: .65rem;
  color: white; background: #14213d; font-size: .875rem; font-weight: 700;
  cursor: pointer; transition: background .2s ease, color .2s ease, transform .2s ease;
}
.btn:hover { background: #243452; }
.btn:disabled { cursor: wait; opacity: .7; }
.btn:focus-visible, .card-main:focus-visible, input:focus-visible {
  outline: 3px solid rgba(227,34,51,.3); outline-offset: 2px;
}
.btn-outline { color: #14213d; background: white; border: 1px solid #d5deec; }
.btn-outline:hover { background: #edf1f7; }
.btn-ghost { padding: .4rem; color: #69758c; background: transparent; }
.btn-ghost:hover { color: #14213d; background: #edf1f7; }
.btn svg { width: 1rem; height: 1rem; }
.site-shell { min-height: 100vh; padding-bottom: 6.5rem; }
.topbar {
  height: 5rem; display: flex; align-items: center; justify-content: space-between;
  max-width: 76rem; margin: 0 auto; padding: 0 1.5rem;
}
.brand {
  color: #14213d; display: inline-flex; align-items: center; gap: .65rem;
  font-size: 1.25rem; font-weight: 850; letter-spacing: -.035em; text-decoration: none;
}
.brand > span:last-child > span { color: #e32233; }
.brand-mark {
  width: 2.3rem; height: 2.3rem; display: grid; place-items: center; color: white;
  border-radius: .75rem; background: #e32233; transform: rotate(-4deg);
  box-shadow: 0 8px 18px rgba(227, 34, 51, .22);
}
.brand-mark svg { width: 1.25rem; }
.live-status {
  display: flex; align-items: center; gap: .5rem; color: #59657c;
  font-size: .875rem; font-weight: 650;
}
.live-status span, .now-live span {
  width: .55rem; height: .55rem; border-radius: 50%; background: #e32233;
  box-shadow: 0 0 0 .3rem rgba(227, 34, 51, .11); animation: pulse 1.8s infinite;
}
main { max-width: 76rem; margin: 0 auto; padding: 2.4rem 1.5rem 4rem; }
.intro {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(20rem, .72fr);
  align-items: end; gap: 3rem; margin: 2rem 0 2.3rem;
}
.eyebrow {
  display: flex; align-items: center; gap: .45rem; color: #e32233;
  font-size: .75rem; font-weight: 800; letter-spacing: .16em; margin: 0 0 .7rem;
}
.eyebrow svg { width: 1rem; }
h1 {
  max-width: 39rem; margin: 0; color: #101a31;
  font-size: clamp(2.55rem, 5vw, 4.65rem); line-height: .96;
  letter-spacing: -.06em; font-weight: 850;
}
.intro-copy {
  color: #65708a; max-width: 38rem; margin: 1rem 0 0;
  font-size: 1.05rem; line-height: 1.65;
}
.search-wrap {
  height: 3.75rem; display: flex; align-items: center; gap: .35rem;
  padding: 0 .7rem 0 1rem; background: white; border: 1px solid #dce3ee;
  border-radius: 1rem; box-shadow: 0 12px 32px rgba(28, 46, 81, .08);
}
.search-wrap > svg { color: #7c879c; width: 1.2rem; flex: none; }
.search-wrap input {
  height: 100%; padding-inline: .4rem; border: 0; box-shadow: none;
  background: transparent; font-size: 1rem;
  width: 90%;
}
.search-wrap input:focus-visible { box-shadow: none; }
.featured {
  position: relative; overflow: hidden; min-height: 18rem; display: grid;
  grid-template-columns: 15rem minmax(0, 1fr) 19rem; align-items: center;
  gap: 2.5rem; padding: 2.5rem 3rem; border-radius: 1.7rem;
  background: #14213d; color: white; box-shadow: 0 24px 54px rgba(20, 33, 61, .16);
}
.featured::before {
  content: ""; position: absolute; width: 25rem; height: 25rem; right: -7rem; top: -12rem;
  border: 1px solid rgba(255,255,255,.09); border-radius: 50%;
  box-shadow: 0 0 0 4rem rgba(255,255,255,.025), 0 0 0 8rem rgba(255,255,255,.02);
}
.featured-art { display: grid; place-items: center; position: relative; }
.sound-rings {
  position: absolute; width: 12.8rem; height: 12.8rem; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 0 0 1.1rem rgba(255,255,255,.035), 0 0 0 2.2rem rgba(255,255,255,.025);
}
.station-logo {
  width: 3.35rem; height: 3.35rem; border-radius: 1rem; color: white;
  display: grid; place-items: center; overflow: hidden; flex: none;
  font-size: .95rem; font-weight: 900; letter-spacing: -.03em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}
.station-logo img { width: 100%; height: 100%; object-fit: contain; background: white; }
.station-logo-large {
  position: relative; width: 9.5rem; height: 9.5rem; border-radius: 2.2rem;
  font-size: 2.5rem; transform: rotate(-3deg);
  box-shadow: 0 22px 45px rgba(0,0,0,.25), inset 0 0 0 1px rgba(255,255,255,.28);
}
.now-live {
  display: flex; align-items: center; gap: .55rem; margin: 0 0 .6rem;
  color: #ffadb4; font-size: .75rem; font-weight: 850; letter-spacing: .16em;
}
.featured-info { position: relative; z-index: 1; }
.featured-info h2 {
  margin: 0; font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.05; letter-spacing: -.045em;
}
.featured-info > p:not(.now-live) {
  display: flex; align-items: center; gap: .45rem; color: #bfc8da; margin: .75rem 0 1.5rem;
}
.featured-info > p svg { width: 1rem; }
.track-info {
  max-width: 28rem; display: flex; align-items: center; gap: .7rem;
  margin: -.45rem 0 1.2rem; padding: .65rem .8rem;
  color: white; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1); border-radius: .75rem;
}
.track-info > svg { width: 1.1rem; flex: none; color: #ff737f; }
.track-info > span { min-width: 0; display: grid; gap: .05rem; }
.track-info small { color: #ffadb4; font-size: .62rem; font-weight: 850; letter-spacing: .12em; }
.track-info strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .82rem; }
.main-play {
  height: 3.2rem; padding-inline: 1.25rem; border-radius: .9rem;
  background: #e32233; font-size: .95rem; box-shadow: 0 9px 22px rgba(227, 34, 51, .28);
}
.main-play svg { width: 1.15rem; }
.equalizer {
  height: 7rem; display: flex; align-items: center; justify-content: center;
  gap: .32rem; position: relative; z-index: 1;
}
.equalizer i {
  width: .27rem; height: 22%; display: block; background: rgba(255,255,255,.2);
  border-radius: 1rem; transition: height .3s ease;
}
.equalizer.active i { animation: equalize .8s ease-in-out infinite alternate; background: #ff6471; }
.equalizer.active i:nth-child(3n) { animation-duration: .55s; }
.equalizer.active i:nth-child(4n) { animation-duration: 1.05s; }
.equalizer.active i:nth-child(5n) { animation-delay: -.4s; }
.error-message {
  display: flex; align-items: center; gap: .65rem; margin: 1rem 0 0;
  padding: .8rem 1rem; border-radius: .8rem; background: #fff0f1;
  color: #9f1724; font-size: .9rem;
}
.error-message svg { width: 1.1rem; }
.directory { margin-top: 4rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.section-heading h2 { margin: 0; font-size: 2rem; letter-spacing: -.04em; }
.section-heading > p { color: #768197; margin: 0; font-size: .875rem; }
.genre-tabs {
  display: flex; gap: .55rem; overflow-x: auto; padding: 1.4rem 0 1.1rem; scrollbar-width: none;
}
.genre-tabs button { border-radius: 999px; box-shadow: none; }
.genre-tabs button svg { width: .9rem; height: .9rem; }
.filter-button { color: #14213d; background: white; border: 1px solid #d5deec; }
.filter-button:hover { background: #edf1f7; }
.filter-button.active { color: white; background: #14213d; border-color: #14213d; }
.filter-button[data-filter="Favoritas"] svg { transition: fill .2s ease; }
.filter-button[data-filter="Favoritas"].active svg { fill: currentColor; }
.station-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.station-card {
  min-width: 0; display: flex; align-items: center; gap: .25rem; padding: .75rem;
  background: white; border: 1px solid #dfe5ef; border-radius: 1.15rem;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.station-card:hover { transform: translateY(-2px); border-color: #c3ccda; box-shadow: 0 13px 27px rgba(28, 46, 81, .07); }
.station-card.current { border-color: rgba(227, 34, 51, .45); box-shadow: inset 0 0 0 1px rgba(227, 34, 51, .08); }
.card-main {
  min-width: 0; flex: 1; display: flex; align-items: center; gap: .85rem;
  padding: 0; border: 0; background: none; color: inherit; cursor: pointer; text-align: left;
}
.card-copy { min-width: 0; flex: 1; display: grid; gap: .28rem; }
.card-copy strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .98rem; }
.card-copy small {
  display: flex; align-items: center; color: #758097; font-size: .75rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-copy small svg { width: .8rem; margin-right: .2rem; }
.card-copy em {
  width: fit-content; margin-top: .08rem; padding: .15rem .38rem;
  color: #126ca4; background: #e4f4ff; border-radius: .3rem;
  font-size: .58rem; font-style: normal; font-weight: 850; letter-spacing: .1em;
}
.card-play {
  width: 2.2rem; height: 2.2rem; display: grid; place-items: center;
  flex: none; border-radius: 50%; background: #edf1f7; color: #14213d;
}
.current .card-play { background: #e32233; color: white; }
.card-play svg { width: .9rem; }
.favorite { width: 2rem; height: 2rem; min-height: 2rem; padding: 0; color: #8c96a8; flex: none; }
.favorite.saved { color: #e32233; }
.favorite.saved svg { fill: currentColor; }
.empty-state {
  text-align: center; padding: 4rem 1rem; background: white;
  border: 1px dashed #ccd5e2; border-radius: 1.2rem;
}
.empty-state > svg { width: 2.2rem; height: 2.2rem; color: #e32233; }
.empty-state h3 { margin: .8rem 0 .2rem; }
.empty-state p { color: #6b768b; margin: 0 0 1rem; }
footer {
  max-width: 76rem; margin: 0 auto; padding: 2.2rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  border-top: 1px solid #dde3ed; color: #6e798e; font-size: .82rem;
}
.brand.compact { font-size: 1rem; }
.brand.compact .brand-mark { width: 1.9rem; height: 1.9rem; border-radius: .6rem; }
.brand.compact .brand-mark svg { width: 1rem; }
.player-bar {
  position: fixed; left: 50%; bottom: 1rem; z-index: 20;
  width: min(48rem, calc(100% - 2rem)); transform: translate(-50%, calc(100% + 2rem));
  opacity: 0; transition: transform .35s ease, opacity .25s ease;
}
.player-bar.visible { transform: translate(-50%, 0); opacity: 1; }
.player-inner {
  display: flex; align-items: center; gap: .85rem; padding: .72rem .8rem;
  color: white; background: rgba(15, 26, 50, .97);
  border: 1px solid rgba(255,255,255,.13); border-radius: 1.3rem;
  box-shadow: 0 18px 50px rgba(10, 20, 40, .3); backdrop-filter: blur(16px);
}
.player-copy { min-width: 0; flex: 1; display: grid; }
.player-copy small { color: #ff737f; font-size: .65rem; font-weight: 850; letter-spacing: .12em; }
.player-copy strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .9rem; }
.player-copy span {
  max-width: 25rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  color: #bfc8d8; font-size: .7rem;
}
.player-play {
  width: 2.5rem; height: 2.5rem; min-height: 2.5rem; padding: 0;
  flex: none; border-radius: 50%; color: white; background: #e32233;
}
.player-play:hover, .main-play:hover { background: #c91e2e; }
.player-volume { width: 9rem; display: flex; align-items: center; gap: .45rem; }
.player-volume button { min-height: 2rem; color: #bec7d8; }
.volume-slider {
  width: 100%; height: .3rem; accent-color: #f24a59; cursor: pointer;
}
.search-clear { width: 2rem; height: 2rem; min-height: 2rem; padding: 0; flex: none; }
.spin { animation: spin 1s linear infinite; }

@keyframes equalize { from { height: 16%; } to { height: 88%; } }
@keyframes pulse { 50% { box-shadow: 0 0 0 .5rem rgba(227, 34, 51, 0); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; gap: 1.5rem; }
  .featured { grid-template-columns: 10rem minmax(0, 1fr); padding: 2rem; }
  .featured-art { grid-row: 1; }
  .equalizer { display: none; }
  .station-logo-large { width: 7.5rem; height: 7.5rem; font-size: 2rem; }
  .sound-rings { width: 9.4rem; height: 9.4rem; }
  .station-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .site-shell { padding-bottom: 6rem; }
  .topbar { height: 4.5rem; padding-inline: 1rem; }
  .live-status { font-size: 0; }
  main { padding: 1.3rem 1rem 3rem; }
  .intro { margin-top: 1rem; }
  h1 { font-size: 2.75rem; }
  .featured { grid-template-columns: 1fr; text-align: center; gap: 1.5rem; padding: 2rem 1.2rem; }
  .featured-info > p { justify-content: center; }
  .station-grid { grid-template-columns: 1fr; }
  .section-heading h2 { font-size: 1.65rem; }
  footer { flex-direction: column; align-items: flex-start; }
  .player-bar { width: calc(100% - 1rem); bottom: .5rem; }
  .player-inner { border-radius: 1rem; }
  .player-volume { width: auto; }
  .volume-slider { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
