:root {
  color-scheme: dark;
  --bg: #090f1b;
  --surface: #141e30;
  --surface-light: #1d2a40;
  --text: #f5f7fc;
  --muted: #9caac0;
  --accent: #f2bb67;
  --border: rgba(255,255,255,.09);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 65% 0%, #20324d 0%, transparent 45%),
    var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }

.app {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
}

.header {
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -1.5px;
  text-decoration: none;
  color: var(--text);
}

.logo span { color: var(--accent); }

.on-air {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff5f65;
  box-shadow: 0 0 15px #ff5f65;
  animation: pulse 1.6s infinite;
}

.hero { padding: 65px 0 45px; }

.eyebrow {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
}

.hero h1 {
  margin: 16px 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.08;
  letter-spacing: -2.5px;
}

.description {
  max-width: 540px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 16px;
}

.player-card {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 30px;
  background: linear-gradient(135deg, #1c2a40, #101929);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 25px 70px rgba(0,0,0,.25);
}

.artwork {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background:
    radial-gradient(circle at 30% 30%, #42618b, transparent 55%),
    linear-gradient(145deg, #1b3658, #080d17);
  box-shadow: 0 15px 40px rgba(0,0,0,.3);
}

.artwork-logo {
  font-size: clamp(70px, 12vw, 135px);
  font-weight: 900;
  letter-spacing: -12px;
  color: #fff;
  text-shadow: 0 8px 35px rgba(0,0,0,.3);
}

.artwork-logo span { color: var(--accent); }

.player-content { min-width: 0; }

.player-content h2 {
  margin: 18px 0 8px;
  font-size: clamp(26px, 3.5vw, 38px);
  letter-spacing: -1px;
  overflow-wrap: anywhere;
}

#track-artist {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  overflow-wrap: anywhere;
}

.controls {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 38px 0;
}

.play-button {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #101725;
  font-size: 27px;
  cursor: pointer;
  transition: transform .2s, background .2s;
}

.play-button:hover {
  transform: scale(1.06);
  background: #ffd18c;
}

.play-button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}

.volume {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  color: var(--muted);
}

.volume input {
  width: 100%;
  max-width: 190px;
  accent-color: var(--accent);
  cursor: pointer;
}

.player-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
  color: var(--muted);
  font-size: 12px;
}

.info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 22px;
}

.info > div {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,.035);
}

.info-label {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1px;
}

.info strong {
  font-size: 27px;
  font-weight: 700;
}

footer {
  padding: 55px 0 35px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

@keyframes pulse {
  50% { opacity: .35; }
}

@media (max-width: 720px) {
  .app { width: min(100% - 28px, 500px); }
  .header { height: 75px; }
  .logo { font-size: 23px; }
  .hero { padding: 42px 0 30px; }
  .hero h1 { letter-spacing: -1.5px; }

  .player-card {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 18px;
  }

  .artwork { max-width: 460px; }
  .controls { margin: 28px 0; }

  .info { gap: 9px; }
  .info > div { padding: 15px 10px; }
  .info-label { font-size: 9px; }
  .info strong { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* MRADIO 2.1 — заголовок и плеер рядом */

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 35px;
  align-items: center;
  padding-top: 48px;
}

.hero-layout .hero {
  padding: 0;
}

.hero-layout .hero h1 {
  font-size: clamp(36px, 4vw, 55px);
}

.hero-layout .player-card {
  grid-template-columns: 1fr;
  gap: 22px;
  padding: 22px;
}

.hero-layout .artwork {
  max-width: 100%;
  aspect-ratio: 2 / 1;
}

.hero-layout .artwork-logo {
  font-size: 90px;
}

.hero-layout .controls {
  margin: 24px 0;
}

.hero-layout .play-button {
  width: 64px;
  height: 64px;
  flex-basis: 64px;
}

@media (max-width: 850px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 25px;
    padding-top: 25px;
  }

  .hero-layout .player-card {
    order: -1;
  }

  .hero-layout .hero {
    padding: 0;
  }
}

/* MRADIO 2.2 — музыкальные направления */

.genres {
  margin: 65px 0 55px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.8px;
}

.section-heading > span {
  color: #f2bb67;
  font-size: 13px;
  white-space: nowrap;
}

.genres-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.genre-card {
  min-height: 140px;
  padding: 22px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 16px;
  background: linear-gradient(135deg, #25334c, #111b2c);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  transition: transform .2s ease, border-color .2s ease;
}

.genre-card:nth-child(4n+2) {
  background: linear-gradient(135deg, #45314b, #171827);
}

.genre-card:nth-child(4n+3) {
  background: linear-gradient(135deg, #244b50, #111c29);
}

.genre-card:nth-child(4n+4) {
  background: linear-gradient(135deg, #574331, #211a23);
}

.genre-card:hover {
  transform: translateY(-3px);
  border-color: rgba(242,187,103,0.4);
}

.genre-card strong {
  color: #f7f5f1;
  font-size: 17px;
}

.genre-card span {
  color: #c5c7cf;
  font-size: 12px;
}

@media (max-width: 900px) {
  .genres-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .genres {
    margin-top: 40px;
  }

  .genres-grid {
    gap: 10px;
  }

  .genre-card {
    min-height: 115px;
    padding: 14px;
  }

  .genre-card strong {
    font-size: 15px;
  }

  .section-heading h2 {
    font-size: 23px;
  }
}

/* MRADIO 2.3 — история эфира под плеером */

@media (min-width: 851px) {
  .hero-layout {
    align-items: start;
  }

  .hero-layout .hero {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .hero-layout .player-card {
    grid-column: 2;
    grid-row: 1;
  }

  .hero-layout .recent-tracks {
    grid-column: 2;
    grid-row: 2;
  }
}

.recent-tracks {
  padding: 20px 24px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  background: rgba(255,255,255,0.025);
}

.recent-heading h3 {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 600;
  color: #f7f5f1;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-empty {
  margin: 0;
  color: #9aa9bd;
  font-size: 13px;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.history-item + .history-item {
  border-top: 1px solid rgba(255,255,255,0.06);
}

.history-icon {
  color: #f2bb67;
  font-size: 20px;
}

.history-track {
  flex: 1;
  min-width: 0;
}

.history-title {
  color: #f7f5f1;
  font-size: 14px;
  font-weight: 600;
}

.history-artist {
  color: #9aa9bd;
  font-size: 12px;
  margin-top: 3px;
}

.history-time {
  color: #9aa9bd;
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 850px) {
  .hero-layout .recent-tracks {
    order: 0;
  }
}

/* MRADIO 2.3 — история эфира под плеером */

@media (min-width: 851px) {
  .hero-layout {
    align-items: start;
  }

  .hero-layout .hero {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .hero-layout .player-card {
    grid-column: 2;
    grid-row: 1;
  }

  .hero-layout .recent-tracks {
    grid-column: 2;
    grid-row: 2;
  }
}

.recent-tracks {
  padding: 20px 24px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  background: rgba(255,255,255,0.025);
}

.recent-heading h3 {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 600;
  color: #f7f5f1;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-empty {
  margin: 0;
  color: #9aa9bd;
  font-size: 13px;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.history-item + .history-item {
  border-top: 1px solid rgba(255,255,255,0.06);
}

.history-icon {
  color: #f2bb67;
  font-size: 20px;
}

.history-track {
  flex: 1;
  min-width: 0;
}

.history-title {
  color: #f7f5f1;
  font-size: 14px;
  font-weight: 600;
}

.history-artist {
  color: #9aa9bd;
  font-size: 12px;
  margin-top: 3px;
}

.history-time {
  color: #9aa9bd;
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 850px) {
  .hero-layout .recent-tracks {
    order: 0;
  }
}
