:root {
  --aqua: #04eada;
  --red: #dd0510;
  --ink: #050706;
  --night: #080b0a;
  --night-soft: #101514;
  --paper: #f4f6f5;
  --white: #ffffff;
  --muted: #a8b2af;
  --line: rgba(255, 255, 255, 0.15);
  --paper-line: #d9dfdc;
  --header-height: 104px;
  --container: 1240px;
  --radius: 6px;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Gotham, Montserrat, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.admin-bar .site-header {
  top: 32px;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--aqua);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--aqua);
  transform: translateY(-170%);
}

.skip-link:focus {
  transform: translateY(0);
}

#ao-vivo,
#programacao {
  scroll-margin-top: calc(var(--header-height) + 14px);
}

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid rgba(5, 7, 6, 0.1);
  backdrop-filter: blur(14px);
}

.header-inner {
  width: min(calc(100% - 48px), var(--container));
  height: calc(100% - 4px);
  margin: 0 auto;
  padding: 12px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
}

.brand {
  width: 168px;
  height: 76px;
  display: flex;
  align-items: center;
}

.brand img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.main-nav a {
  position: relative;
  padding: 28px 0;
  color: #4c5351;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
}

.main-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 17px;
  left: 0;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.main-nav a:hover::after,
.main-nav a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.broadcast-status {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 800;
}

.broadcast-status time {
  min-width: 42px;
  margin-left: 4px;
  color: #606865;
  font-variant-numeric: tabular-nums;
}

.live-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  display: inline-block;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(221, 5, 16, 0.55);
  animation: live-pulse 1.8s infinite;
}

.brand-line {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  display: grid;
  grid-template-columns: 5fr 1fr;
}

.brand-line span:nth-child(1) { background: var(--aqua); }
.brand-line span:nth-child(2) { background: var(--red); }

.live-stage {
  position: relative;
  overflow: hidden;
  min-height: calc(100svh - var(--header-height));
  color: var(--white);
  background: var(--night);
}

.live-stage::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  width: 5px;
  height: 44%;
  background: var(--red);
}

.live-inner {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 48px), var(--container));
  min-height: calc(100svh - var(--header-height));
  margin: 0 auto;
  padding: 60px 0 62px;
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(300px, 0.78fr);
  align-items: center;
  gap: 64px;
}

.section-kicker,
.eyebrow {
  margin: 0 0 17px;
  color: var(--aqua);
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 800;
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  background: #050706;
  border-top: 5px solid var(--aqua);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.video-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #0d1210;
}

.video-shell::after {
  content: "";
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  width: 24%;
  height: 5px;
  background: var(--red);
}

.video-shell video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-shell.is-playing .signal-art,
.video-shell.is-playing .primary-play {
  opacity: 0;
  pointer-events: none;
}

.signal-art,
.primary-play {
  transition: opacity 180ms ease, background 180ms ease, transform 180ms ease;
}

.signal-art {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 9%;
  background: #0d1210;
}

.signal-art::before,
.signal-art::after {
  content: "";
  position: absolute;
}

.signal-art::before {
  top: 18%;
  right: 25%;
  width: 1px;
  height: 60%;
  background: rgba(4, 234, 218, 0.2);
}

.signal-art::after {
  right: 10%;
  bottom: 29%;
  width: 28%;
  height: 1px;
  background: rgba(221, 5, 16, 0.32);
}

.signal-label {
  position: relative;
  z-index: 1;
  color: var(--muted);
  text-transform: uppercase;
  font-size: clamp(0.62rem, 1.2vw, 0.76rem);
  font-weight: 700;
}

.signal-place {
  position: relative;
  z-index: 1;
  margin-top: 0.3rem;
  color: var(--white);
  text-transform: uppercase;
  font-size: clamp(2rem, 5.2vw, 4.7rem);
  font-weight: 900;
  line-height: 0.96;
}

.signal-frequency {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
  color: var(--aqua);
  font-size: clamp(0.72rem, 1.35vw, 0.95rem);
  font-weight: 700;
}

.primary-play {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--aqua);
  border: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.primary-play:hover {
  background: var(--white);
  transform: translate(-50%, -50%) scale(1.06);
}

.primary-play svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.player-feedback {
  position: absolute;
  z-index: 5;
  right: 22px;
  bottom: 12px;
  left: 22px;
  color: var(--white);
  text-align: center;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.5;
  pointer-events: none;
}

.player-feedback:not(:empty) {
  padding: 10px 14px;
  background: rgba(5, 7, 6, 0.9);
  border-radius: 4px;
}

.primary-play[hidden] {
  display: none;
}

.video-shell.is-loading:not(.is-playing) .signal-art {
  opacity: 0.2;
}

.video-shell.is-loading .player-feedback {
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  background: rgba(5, 7, 6, 0.72);
}

.video-shell.is-loading .player-feedback::before {
  content: "";
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--aqua);
  border-radius: 50%;
  animation: player-spin 850ms linear infinite;
}

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

.control-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a8b2af;
}

.control-status[data-state="playing"]::before {
  background: var(--red);
}

.control-status[data-state="loading"]::before,
.control-status[data-state="buffering"]::before,
.control-status[data-state="reconnecting"]::before {
  background: var(--aqua);
}

.icon-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.player-controls {
  position: relative;
  z-index: 4;
  height: 54px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #050706;
  border-top: 1px solid var(--line);
}

.player-frame:fullscreen {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-top: 0;
  background: #000;
}

.player-frame:fullscreen .video-shell {
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  aspect-ratio: auto;
}

.player-frame:fullscreen .player-controls {
  flex: 0 0 54px;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

.icon-button:hover {
  color: var(--aqua);
  background: rgba(255, 255, 255, 0.07);
}

.icon-button svg {
  width: 19px;
  height: 19px;
}

.control-status {
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  font-size: 0.64rem;
  font-weight: 800;
}

.control-end {
  margin-left: auto;
}

.station-caption {
  margin: 14px 0 0;
  color: #bac4c1;
  font-size: 0.72rem;
}

.now-panel {
  min-width: 0;
}

.now-panel h1 {
  max-width: 440px;
  margin: 0;
  font-size: clamp(2.65rem, 4.6vw, 4.8rem);
  font-weight: 800;
  line-height: 0.98;
}

.program-summary {
  max-width: 420px;
  margin: 24px 0 0;
  color: #dce3e1;
  font-size: 0.94rem;
  line-height: 1.65;
}

.program-meta {
  margin-top: 25px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.origin {
  padding: 6px 8px;
  color: var(--ink);
  border-radius: 3px;
  text-transform: uppercase;
  font-size: 0.56rem;
  font-weight: 900;
}

.origin-local { background: var(--aqua); }
.origin-rede { background: var(--red); color: var(--white); }

.progress-track {
  height: 3px;
  margin-top: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.2);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--aqua);
  transition: width 500ms ease;
}

.next-header {
  margin-top: 38px;
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #c6cfcc;
  border-top: 1px solid var(--line);
  text-transform: uppercase;
  font-size: 0.65rem;
  font-weight: 800;
}

.share-button {
  color: var(--white);
}

.next-row {
  min-height: 46px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 0.68rem;
}

.next-row time {
  color: var(--aqua);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.next-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.next-row .origin {
  padding: 0;
  color: #a7b5b1;
  background: transparent;
}

.schedule-empty,
.schedule-loading {
  margin: 18px 0;
  color: #a7b5b1;
  font-size: 0.72rem;
  line-height: 1.6;
}

.schedule-empty-light,
.schedule-section .schedule-loading {
  min-height: 150px;
  padding: 42px 0;
  color: #59625f;
  border-bottom: 1px solid var(--paper-line);
}

.schedule-section {
  min-height: 720px;
  padding: 94px 0 108px;
  background: var(--paper);
}

.schedule-inner {
  width: min(calc(100% - 48px), var(--container));
  margin: 0 auto;
}

.schedule-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 48px;
}

.schedule-header .eyebrow {
  margin-bottom: 12px;
  color: var(--red);
}

.schedule-header h2 {
  margin: 0;
  font-size: clamp(3rem, 6.2vw, 6rem);
  font-weight: 800;
  line-height: 0.95;
}

.schedule-header > p {
  max-width: 380px;
  margin: 0 0 6px;
  color: #59625f;
  text-align: right;
  font-size: 0.78rem;
  line-height: 1.6;
}

.day-tabs {
  margin-top: 60px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid var(--paper-line);
  border-bottom: 1px solid var(--paper-line);
}

.day-tab {
  min-width: 0;
  min-height: 78px;
  padding: 14px 10px;
  color: #5c6461;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--paper-line);
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

.day-tab:last-child {
  border-right: 0;
}

.day-tab strong,
.day-tab span {
  display: block;
}

.day-tab strong {
  color: var(--ink);
  text-transform: uppercase;
  font-size: 0.7rem;
}

.day-tab span {
  margin-top: 5px;
  font-size: 0.65rem;
}

.day-tab:hover,
.day-tab[aria-selected="true"] {
  color: var(--white);
  background: var(--ink);
}

.day-tab[aria-selected="true"] strong {
  color: var(--aqua);
}

.schedule-list {
  margin-top: 28px;
}

.schedule-row {
  min-height: 92px;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 100px;
  align-items: center;
  gap: 30px;
  border-bottom: 1px solid var(--paper-line);
  transition: padding 180ms ease, background 180ms ease;
}

.schedule-row:hover {
  padding: 0 18px;
  background: var(--white);
}

.schedule-row.is-current {
  position: relative;
  padding: 0 18px;
  background: var(--white);
}

.schedule-row.is-current::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--red);
}

.schedule-time {
  color: #313735;
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.schedule-program strong,
.schedule-program span {
  display: block;
}

.schedule-program strong {
  font-size: 1.05rem;
}

.schedule-program span {
  margin-top: 5px;
  color: #69716e;
  font-size: 0.7rem;
  line-height: 1.45;
}

.schedule-row .origin {
  justify-self: end;
}

.site-footer {
  color: var(--white);
  background: var(--ink);
  border-top: 4px solid var(--red);
}

.footer-inner {
  width: min(calc(100% - 48px), var(--container));
  min-height: 210px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 34px;
}

.footer-inner strong {
  font-size: 1.15rem;
}

.footer-inner p {
  margin: 7px 0 0;
  color: #aeb8b5;
  font-size: 0.72rem;
}

.footer-inner > p {
  margin: 0;
  text-align: center;
}

.footer-inner a {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--aqua);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 700;
}

.footer-inner a svg {
  width: 16px;
  height: 16px;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100% - 48px));
  padding: 13px 16px;
  color: var(--ink);
  background: var(--aqua);
  border-radius: 4px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.22);
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.intro-item {
  opacity: 0;
  transform: translateY(18px);
  animation: intro-in 620ms ease forwards;
}

.intro-item:nth-child(2) {
  animation-delay: 140ms;
}

.reveal {
  opacity: 1;
  transform: none;
}

.reveal.is-visible {
  animation: reveal-in 560ms ease both;
}

@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(221, 5, 16, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(221, 5, 16, 0); }
  100% { box-shadow: 0 0 0 0 rgba(221, 5, 16, 0); }
}

@keyframes intro-in {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes reveal-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  :root { --header-height: 96px; }

  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .brand {
    width: 155px;
    height: 70px;
  }

  .main-nav {
    display: none;
  }

  .live-inner {
    padding: 42px 0 54px;
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .now-panel {
    max-width: 680px;
  }

  .now-panel h1 {
    max-width: 680px;
  }
}

@media (max-width: 640px) {
  :root { --header-height: 88px; }

  .header-inner,
  .live-inner,
  .schedule-inner,
  .footer-inner {
    width: min(calc(100% - 28px), var(--container));
  }

  .header-inner {
    gap: 14px;
    padding: 9px 0;
  }

  .brand {
    width: 145px;
    height: 66px;
  }

  .broadcast-status span:not(.live-dot),
  .broadcast-status time {
    display: none;
  }

  .live-inner {
    min-height: auto;
    padding: 28px 0 46px;
    gap: 38px;
  }

  .section-kicker {
    margin-bottom: 12px;
    font-size: 0.62rem;
  }

  .player-frame {
    width: calc(100% + 28px);
    margin-left: -14px;
    border-top-width: 4px;
  }

  .signal-art {
    padding: 8%;
  }

  .signal-place {
    font-size: 2.15rem;
  }

  .primary-play {
    width: 56px;
    height: 56px;
  }

  .primary-play svg {
    width: 22px;
    height: 22px;
  }

  .player-controls {
    height: 46px;
    padding: 0 10px;
  }

  .video-shell::after {
    height: 4px;
  }

  .icon-button {
    width: 44px;
    height: 44px;
  }

  .station-caption {
    margin-top: 10px;
    font-size: 0.62rem;
  }

  .now-panel h1 {
    font-size: 2.7rem;
  }

  .program-summary {
    margin-top: 18px;
    font-size: 0.82rem;
  }

  .program-meta {
    margin-top: 20px;
  }

  .next-header {
    margin-top: 30px;
  }

  .schedule-section {
    min-height: 0;
    padding: 66px 0 76px;
  }

  .schedule-header {
    display: block;
  }

  .schedule-header h2 {
    font-size: 3.15rem;
  }

  .schedule-header > p {
    max-width: 290px;
    margin: 18px 0 0;
    text-align: left;
    font-size: 0.68rem;
  }

  .day-tabs {
    margin-top: 36px;
    display: flex;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline mandatory;
    scrollbar-width: thin;
  }

  .day-tab {
    min-width: 92px;
    min-height: 68px;
    scroll-snap-align: start;
  }

  .schedule-list {
    margin-top: 18px;
  }

  .schedule-row {
    min-height: 104px;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
  }

  .schedule-row:hover,
  .schedule-row.is-current {
    padding: 0 10px;
  }

  .schedule-program strong {
    font-size: 0.9rem;
  }

  .schedule-program span {
    font-size: 0.64rem;
  }

  .schedule-row .origin {
    display: none;
  }

  .footer-inner {
    min-height: 230px;
    padding: 42px 0;
    display: block;
  }

  .footer-inner > p {
    margin-top: 28px;
    text-align: left;
  }

  .footer-inner a {
    margin-top: 28px;
  }
}

@media screen and (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

@media (max-width: 360px) {
  .schedule-header h2 {
    font-size: 2.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
