:root {
  --red: #e31e24;
  --navy: #1a1633;
  --muted: #4a4f6a;
  --surface: #f8f9fb;
  --white: #ffffff;
  --border: #e4e7ef;
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  margin: 0;
  font-family: "Montserrat", sans-serif;
  color: var(--navy);
  background:
    radial-gradient(1200px 650px at -10% 10%, rgba(227, 30, 36, 0.18), transparent 58%),
    radial-gradient(900px 520px at 108% 16%, rgba(241, 136, 0, 0.16), transparent 55%),
    radial-gradient(1000px 580px at -12% 86%, rgba(246, 194, 8, 0.15), transparent 58%),
    radial-gradient(980px 560px at 112% 90%, rgba(53, 32, 127, 0.18), transparent 60%),
    var(--white);
  font-size: 18px;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1450px 780px at -10% 8%, rgba(227, 30, 36, 0.42), transparent 62%),
    radial-gradient(1100px 650px at 110% 12%, rgba(241, 136, 0, 0.38), transparent 60%),
    radial-gradient(1250px 700px at -10% 92%, rgba(246, 194, 8, 0.34), transparent 62%),
    radial-gradient(1200px 700px at 110% 94%, rgba(53, 32, 127, 0.44), transparent 64%);
}

.wrap {
  width: min(1100px, 94%);
  margin: 0 auto;
}

/* Header */
.topbar {
  background:
    radial-gradient(900px 260px at -8% 20%, rgba(227, 30, 36, 0.18), transparent 62%),
    radial-gradient(700px 220px at 108% 15%, rgba(241, 136, 0, 0.16), transparent 60%),
    radial-gradient(820px 260px at 108% 90%, rgba(53, 32, 127, 0.18), transparent 64%),
    rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(1.05);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.85rem 0;
}

.logo-link {
  background: var(--white);
  display: inline-flex;
  padding: 0.25rem 0.4rem;
}

.logo {
  width: min(200px, 42vw);
  height: auto;
  display: block;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.nav a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding-bottom: 0.2rem;
  border-bottom: 2px solid transparent;
}

.nav a.active,
.nav a:hover {
  color: var(--red);
}

.nav a.active {
  border-bottom-color: var(--red);
}

.btn-pill {
  border: none;
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.75rem 1.25rem 0.75rem 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.btn-pill:hover {
  filter: brightness(1.06);
}

.btn-large {
  font-size: 1.05rem;
  padding: 0.95rem 1.5rem 0.95rem 1rem;
}

.play-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  display: inline-grid;
  place-items: center;
  font-size: 0.65rem;
}

/* Intro + player */
.intro {
  background: linear-gradient(180deg, rgba(248, 249, 251, 0.88) 0%, rgba(255, 255, 255, 0.88) 100%);
  padding: 2rem 0 2.5rem;
}

.tag {
  margin: 0;
  color: var(--red);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}

.intro h1 {
  margin: 0.5rem 0 0;
  font-size: clamp(2.2rem, 5.2vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  max-width: none;
}

.brand-title span {
  display: inline-block;
  margin-right: 0.2em;
}

.c-red {
  color: #e31e24;
}

.c-orange {
  color: #f18800;
}

.c-yellow {
  color: #f6c208;
}

.lead {
  margin: 1rem 0 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 1.2rem;
  max-width: none;
}

.home-socials {
  margin: 0.65rem 0 0;
  font-size: 1rem;
  color: var(--muted);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.home-socials a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--red);
  color: var(--red);
  background: rgba(255, 255, 255, 0.9);
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}

.home-socials a:hover {
  background: #fff1f2;
}

.player-box {
  margin-top: 1.75rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.35rem 1.5rem;
  box-shadow: 0 8px 24px rgba(26, 22, 51, 0.07);
  width: 100%;
  position: relative;
  overflow: hidden;
}

.player-box::before {
  content: "";
  position: absolute;
  inset: -20% -10%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(520px 260px at 10% 20%, rgba(227, 30, 36, 0.18), transparent 62%),
    radial-gradient(520px 260px at 90% 15%, rgba(241, 136, 0, 0.16), transparent 60%),
    radial-gradient(620px 280px at 50% 100%, rgba(53, 32, 127, 0.16), transparent 65%);
}

.player-box > * {
  position: relative;
  z-index: 1;
}

.player-label {
  margin: 0 0 0.75rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--navy);
}

#radio-player {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.player-actions {
  margin-top: 1rem;
}

.custom-player {
  background: linear-gradient(180deg, #fbfbff 0%, #f3f5fc 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem 1rem;
}

.player-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.player-main-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--red);
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
}

.player-main-btn:hover {
  filter: brightness(1.06);
}

.player-live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #ffeef0;
  color: var(--red);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 1.2s infinite;
}

.equalizer {
  margin-left: auto;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
}

.equalizer span {
  width: 4px;
  border-radius: 6px;
  background: var(--navy);
  animation: equalize 0.9s infinite ease-in-out;
}

.equalizer span:nth-child(1) { height: 8px; animation-delay: 0s; }
.equalizer span:nth-child(2) { height: 16px; animation-delay: 0.15s; }
.equalizer span:nth-child(3) { height: 11px; animation-delay: 0.3s; }

.player-bottom {
  margin-top: 0.8rem;
}

.volume-wrap {
  display: grid;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 700;
}

#volume-slider {
  width: 100%;
  accent-color: var(--red);
}

.status {
  margin: 0.85rem 0 0;
  font-size: 1rem;
  color: var(--muted);
  font-weight: 600;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes equalize {
  0%, 100% { transform: scaleY(0.6); }
  50% { transform: scaleY(1.2); }
}

/* Classifica */
.charts {
  padding: 0.5rem 0 2rem;
}

.news-section {
  padding-top: 0.25rem;
}

.charts-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.eyebrow {
  margin: 0;
  color: var(--red);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}

.charts h2 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 900;
  text-transform: uppercase;
}

.charts-note {
  margin: 0.75rem 0 1.25rem;
  color: var(--muted);
  font-size: 1rem;
}

.btn-outline {
  border: 2px solid var(--red);
  background: var(--white);
  color: var(--red);
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.6rem 1.1rem;
  cursor: pointer;
}

.btn-outline:hover {
  background: #fff4f5;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.track-card {
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem;
  box-shadow: 0 4px 14px rgba(26, 22, 51, 0.06);
}

.rank {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-weight: 800;
  font-size: 1rem;
  display: grid;
  place-items: center;
  z-index: 1;
}

.cover {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  background: var(--surface);
}

.track-title {
  margin: 0.75rem 0 0.2rem;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
}

.track-artist {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 500;
}

.chart-empty {
  grid-column: 1 / -1;
  color: var(--muted);
  font-weight: 600;
}

/* Carosello notizie */
.carousel-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.carousel-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--navy);
  background: var(--white);
  color: var(--navy);
  font-size: 1.6rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
}

.carousel-btn:hover {
  background: var(--surface);
}

.carousel-viewport {
  overflow: hidden;
  margin-top: 0.25rem;
}

.carousel-track {
  display: flex;
  gap: 1rem;
  transition: transform 0.35s ease;
  will-change: transform;
}

.news-card {
  flex: 0 0 calc(25% - 0.75rem);
  min-width: 240px;
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem;
  box-shadow: 0 4px 14px rgba(26, 22, 51, 0.06);
  text-decoration: none;
  color: inherit;
  display: block;
}

.news-card:hover {
  box-shadow: 0 6px 18px rgba(26, 22, 51, 0.1);
}

.news-badge {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  max-width: calc(100% - 1.4rem);
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  font-weight: 800;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-cover {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  background: var(--surface);
}

.news-title {
  margin: 0.75rem 0 0.2rem;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
}

.news-meta {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 500;
}

.charts-note a {
  color: var(--red);
  font-weight: 700;
  text-decoration: none;
}

.charts-note a:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  background: var(--navy);
  color: #f2f3ff;
  padding: 1.25rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.footer-logo {
  width: 100px;
  background: var(--white);
  border-radius: 8px;
  padding: 0.25rem;
}

.footer-brand p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
}

.footer-contacts p {
  margin: 0.2rem 0;
}

.footer-contacts a {
  color: #f2f3ff;
  text-decoration: none;
}

.footer-contacts a:hover {
  text-decoration: underline;
}

.footer-copy {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

@media (max-width: 720px) {
  .topbar-inner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .nav {
    justify-content: center;
  }

  .btn-pill {
    justify-content: center;
    width: 100%;
  }

  .intro h1 {
    max-width: none;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-brand {
    flex-direction: column;
  }

  .news-card {
    flex: 0 0 85%;
    min-width: 85%;
  }
}
