:root {
  --blue-950: #0d2347;
  --blue-900: #173a72;
  --blue-700: #244f8f;
  --yellow: #ffd21a;
  --muted: #64748b;
  --line: rgba(12, 23, 48, 0.12);
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
}

body {
  display: grid;
  place-items: start center;
  color: var(--blue-950);
  background:
    linear-gradient(145deg, rgba(13, 35, 71, 0.98), rgba(36, 79, 143, 0.94)),
    url("../assets/familyradioH.png") center / cover no-repeat;
}

.player-frame {
  width: 100%;
  max-width: 380px;
  min-height: 700px;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 9px;
  padding: 8px;
  overflow-x: hidden;
}

.now-panel,
.control-panel,
.info-grid article,
.history-panel {
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.now-panel {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
}

.brand {
  grid-column: 1 / -1;
  color: #fff;
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 0;
  line-height: 0.8;
  text-transform: uppercase;
}

.brand span {
  display: inline-block;
  margin-right: 8px;
  color: var(--yellow);
  font-size: 1.35rem;
  font-style: italic;
}

.brand span:last-child {
  color: var(--yellow);
}

.cover {
  width: 126px;
  height: 126px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--blue-900);
}

.now-text {
  min-width: 0;
  align-self: center;
}

.label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-radius: 50%;
  background: #94a3b8;
}

.status-dot.is-live {
  background: #16a34a;
  box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.16);
}

.now-text h1 {
  margin: 0;
  color: var(--blue-950);
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: clamp(1.35rem, 7vw, 2.1rem);
  line-height: 1.04;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

.now-text p:last-child {
  display: -webkit-box;
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--blue-900);
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.15;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.progress {
  grid-column: 1 / -1;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(12, 23, 48, 0.12);
}

.progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--yellow);
}

.time {
  grid-column: 1 / -1;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.control-panel {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 9px;
  padding: 8px;
}

.play-button {
  grid-row: 1 / span 2;
  width: 70px;
  min-height: 70px;
  border: 0;
  border-radius: 8px;
  background: var(--yellow);
  cursor: pointer;
}

.play-icon,
.pause-icon {
  display: block;
  margin: 0 auto;
}

.play-icon {
  width: 0;
  height: 0;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 22px solid var(--blue-950);
  transform: translateX(2px);
}

.pause-icon {
  width: 24px;
  height: 30px;
  border-left: 8px solid var(--blue-950);
  border-right: 8px solid var(--blue-950);
}

.volume {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.volume label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.volume input {
  width: 100%;
  accent-color: var(--yellow);
}

.status {
  margin: 0;
  color: var(--blue-900);
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 0.86rem;
  line-height: 1.2;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.info-grid article {
  min-height: 112px;
  padding: 10px;
}

.info-grid strong {
  display: block;
  color: var(--blue-950);
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  line-height: 1.2;
  overflow-wrap: break-word;
}

.info-grid span,
.info-grid p:not(.label) {
  display: block;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.25;
}

.next {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.next img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 7px;
  background: var(--blue-900);
}

.history-panel {
  min-height: 0;
  padding: 9px;
  overflow: hidden;
}

.history {
  display: grid;
  gap: 6px;
  max-height: none;
  overflow: hidden;
}

.history-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 46px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.history-item img {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 6px;
}

.history-item strong,
.history-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-item strong {
  color: var(--blue-950);
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 0.8rem;
}

.history-item span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

@media (max-width: 360px) {
  .player-frame {
    padding: 6px;
  }

  .now-panel {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .cover {
    width: 112px;
    height: 112px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }
}
