* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --red: #ff0000;
  --black: #000;
  --dark: #242424;
  --paper: #f0f0f0;
  --white: #fff;
  --muted: #666;
  --line: #e5e5e5;
}

html { background: var(--paper); }
body {
  font-family: Arial, sans-serif;
  background-color: var(--paper);
  color: #111;
  min-height: 100vh;
}

a { color: inherit; }

.top-bar {
  background-color: var(--red);
  color: white;
  text-align: center;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: bold;
}

header {
  background-color: #000;
  padding: 20px 0;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  gap: 28px;
}

.logo {
  display: block;
  flex: 0 0 auto;
  line-height: 0;
}

.logo img {
  width: 130px;
  height: auto;
  display: block;
}

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

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  text-transform: uppercase;
  transition: color .3s;
  white-space: nowrap;
}

nav a:hover { color: var(--red); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 0 0 auto;
}

.play-button {
  width: 60px;
  height: 60px;
  background-color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .2s;
}

.play-button:hover { transform: scale(1.1); }
.play-button::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 20px solid #000;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  margin-left: 5px;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.hamburger span { width: 30px; height: 3px; background-color: white; transition: .3s; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

.on-air {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: white;
  padding: 15px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
}

.on-air-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.on-air-label {
  display: inline-flex;
  align-items: center;
  background-color: var(--red);
  padding: 8px 20px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 2px;
  white-space: nowrap;
}

.live-indicator {
  width: 10px;
  height: 10px;
  background-color: #ff7774;
  border-radius: 4px;
  margin-right: 8px;
  animation: pulse 2s infinite;
}

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.on-air-show {
  font-weight: bold;
  font-size: 16px;
  color: #fff;
  white-space: nowrap;
}

.on-air-separator {
  color: var(--red);
  font-weight: bold;
  font-size: 18px;
}

.on-air-song {
  font-size: 14px;
  color: #ccc;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-archive {
  background-color: #000;
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: all .3s;
  min-width: 110px;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
}
.btn-archive:hover { background-color: #333; }
.btn-archive.active-page { background-color: #0a0a0a; }

.content-section {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.section-title {
  background-color: var(--red);
  color: white;
  padding: 15px 30px;
  font-size: 24px;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.playlist-intro {
  color: #555;
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 26px;
}

.day-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  justify-content: center;
  flex-wrap: wrap;
}

.day-btn {
  background-color: #000;
  color: white;
  border: none;
  padding: 11px 18px 10px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: all .3s;
  min-width: 105px;
  font-family: inherit;
}
.day-btn:hover { background-color: #333; }
.day-btn.active { background-color: var(--red); }
.day-btn .dow { display: block; }
.day-btn .date { display: block; font-size: 12px; font-weight: normal; margin-top: 4px; color: #bbb; }
.day-btn.active .date { color: #fff; }

.playlist { display: grid; gap: 28px; }

.hour-group { background: transparent; }
.hour-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: bold;
}
.hour-heading span {
  background: #000;
  color: #fff;
  padding: 10px 18px;
  min-width: 130px;
  text-align: center;
}
.hour-heading::after {
  content: '';
  height: 2px;
  background: #000;
  flex: 1;
}

.song-list {
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,.10);
}

.song-row {
  display: grid;
  grid-template-columns: 105px 64px minmax(0, 1fr);
  gap: 18px;
  min-height: 84px;
  align-items: center;
  padding: 10px 20px 10px 0;
  border-bottom: 1px solid var(--line);
}
.song-row:last-child { border-bottom: 0; }

.song-time {
  color: var(--red);
  font-size: 18px;
  font-weight: bold;
  text-align: center;
}

.cover {
  width: 64px;
  height: 64px;
  background: #111;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-fallback {
  width: 100%; height: 100%; display: grid; place-items: center;
  padding: 5px; color: white; font-size: 9px; line-height: 1.05;
  font-weight: bold; text-align: center;
}
.cover-fallback img { width: 88%; height: auto; object-fit: contain; }

.song-meta { min-width: 0; }
.song-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.song-artist {
  color: #666;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.state-card {
  background: white;
  padding: 30px;
  box-shadow: 0 2px 4px rgba(0,0,0,.10);
  color: #666;
  text-align: center;
  font-weight: bold;
}
.state-card.error { color: var(--red); }

footer {
  background-color: #000;
  color: white;
  padding: 40px 0 20px;
  margin-top: 60px;
}
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 40px;
}
.footer-section h3 { color: var(--red); margin-bottom: 15px; }
.footer-section p { line-height: 1.8; color: #ccc; }
.footer-section a { color: var(--red); }
.footer-bottom {
  max-width: 1200px;
  margin: 20px auto 0;
  padding: 20px 20px 0;
  border-top: 1px solid #333;
  color: #666;
  text-align: center;
}

@media (max-width: 1020px) {
  nav { gap: 18px; }
  nav a { font-size: 12px; }
  .on-air-content { gap: 12px; }
  .btn-archive { padding: 12px 14px; min-width: auto; }
}

@media (max-width: 768px) {
  .top-bar { font-size: 10px; padding: 5px; }
  header { padding: 10px 0; }
  .header-content { padding: 0 15px; }
  .logo img { width: 110px; }
  .play-button { width: 50px; height: 50px; }
  .play-button::before { border-left-width: 15px; border-top-width: 9px; border-bottom-width: 9px; }
  .hamburger { display: flex; z-index: 1002; }

  nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 340px;
    height: 100vh;
    background-color: #000;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 8px;
    transition: left .3s;
    z-index: 1001;
    padding: 30px;
    box-shadow: 8px 0 30px rgba(0,0,0,.35);
  }
  nav.active { left: 0; }
  nav a { font-size: 17px; padding: 11px 5px; }

  .on-air { padding: 10px 0; }
  .on-air-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 7px 10px;
    padding: 5px 15px;
  }
  .on-air-label { padding: 7px 10px; font-size: 10px; justify-self: start; }
  .on-air-show { font-size: 13px; white-space: normal; }
  .on-air-separator { display: none; }
  .on-air-song {
    grid-column: 1 / -1;
    white-space: normal;
    font-size: 13px;
    line-height: 1.35;
    color: #ddd;
  }
  .btn-archive { display: none; }

  .content-section { padding: 0 15px; margin: 24px auto; }
  .section-title { padding: 12px 20px; font-size: 20px; margin-bottom: 16px; }
  .playlist-intro { font-size: 13px; margin-bottom: 18px; }

  .day-selector {
    display: grid;
    grid-template-columns: repeat(7, minmax(62px, 1fr));
    justify-content: start;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 5px;
    margin-bottom: 24px;
  }
  .day-btn { min-width: 62px; padding: 9px 6px 8px; font-size: 13px; }
  .day-btn .date { font-size: 11px; }

  .playlist { gap: 22px; }
  .hour-heading { font-size: 15px; gap: 10px; }
  .hour-heading span { min-width: 112px; padding: 8px 10px; }
  .song-row { grid-template-columns: 58px 52px minmax(0,1fr); gap: 10px; min-height: 70px; padding-right: 10px; }
  .song-time { font-size: 15px; }
  .cover { width: 52px; height: 52px; }
  .song-title { font-size: 16px; margin-bottom: 3px; }
  .song-artist { font-size: 13px; }

  .footer-content { grid-template-columns: 1fr; gap: 25px; }
}

@media (max-width: 430px) {
  .header-content { gap: 10px; }
  .logo img { width: 96px; }
  .header-actions { gap: 12px; }
  .play-button { width: 46px; height: 46px; }
  .day-selector { grid-template-columns: repeat(7, 58px); }
  .song-row { grid-template-columns: 52px 46px minmax(0,1fr); gap: 8px; }
  .cover { width: 46px; height: 46px; }
  .song-title { font-size: 15px; }
}
