:root {
  color-scheme: light dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: #f3f5f2;
  color: #161d1b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f3f5f2;
  color: #161d1b;
}

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

input {
  accent-color: #12685f;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  padding: 0 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  color: #ffffff;
  background: #12685f;
}

button.secondary {
  color: #18231f;
  background: #dce7e2;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.shell {
  width: min(900px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  align-content: start;
  gap: 16px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.45rem, 5vw, 2.1rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.topbar p {
  margin: 8px 0 0;
  color: #60706b;
  font-size: 0.95rem;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: #e3eae7;
  color: #485a54;
  font-size: 0.9rem;
  font-weight: 700;
}

.status.online {
  background: #dff4e9;
  color: #17633b;
}

.player-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d9e2dd;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgb(25 42 35 / 7%);
}

.track {
  display: grid;
  gap: 4px;
}

.track strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 1rem;
}

.track span {
  color: #60706b;
  font-size: 0.9rem;
  font-weight: 700;
}

#seekSlider,
#volumeSlider {
  width: 100%;
}

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

.transport button {
  min-width: 0;
  padding: 0 10px;
  font-size: 0.92rem;
}

.volume-control {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: #60706b;
  font-size: 0.9rem;
  font-weight: 700;
}

.volume-control strong {
  min-width: 42px;
  color: #17211f;
  text-align: right;
}

.video-list {
  display: grid;
  gap: 10px;
}

.video-button {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: #16211d;
  background: #ffffff;
  border: 1px solid #d9e2dd;
  box-shadow: 0 10px 30px rgb(25 42 35 / 7%);
}

.video-button strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 1rem;
}

.video-button span {
  color: #60706b;
  font-size: 0.84rem;
  font-weight: 650;
}

.empty {
  min-height: 140px;
  display: grid;
  place-items: center;
  padding: 20px;
  border: 1px dashed #bdcac4;
  border-radius: 8px;
  color: #60706b;
  text-align: center;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.route-card {
  min-height: 140px;
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 18px;
  border: 1px solid #d9e2dd;
  border-radius: 8px;
  color: inherit;
  background: #ffffff;
  text-decoration: none;
  box-shadow: 0 10px 30px rgb(25 42 35 / 7%);
}

.route-card span {
  color: #60706b;
  font-weight: 700;
}

.route-card strong {
  font-size: 1.35rem;
}

.display-body {
  overflow: hidden;
  background: #000000;
}

.display-stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #000000;
}

#player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.idle {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  color: #ffffff;
  background: radial-gradient(circle at center, #1c2724 0%, #000000 70%);
}

.idle.hidden {
  display: none;
}

.idle h1 {
  margin: 0;
  font-size: clamp(2rem, 9vw, 6rem);
  letter-spacing: 0;
}

.idle p {
  margin: 0;
  color: #c7d2cf;
}

.now-playing {
  position: absolute;
  left: 16px;
  bottom: 16px;
  max-width: min(620px, calc(100vw - 32px));
  padding: 8px 10px;
  border-radius: 7px;
  color: #eff7f4;
  background: rgb(0 0 0 / 55%);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
  opacity: 0;
  transition: opacity 180ms ease;
}

.now-playing.visible {
  opacity: 1;
}

@media (max-width: 620px) {
  .shell {
    padding: 14px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column-reverse;
  }

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

  .transport {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .volume-control {
    grid-template-columns: 1fr auto;
  }

  .volume-control input {
    grid-column: 1 / -1;
  }

}

@media (prefers-color-scheme: dark) {
  :root,
  body {
    background: #101614;
    color: #eaf1ee;
  }

  .topbar p,
  .track span,
  .volume-control,
  .video-button span {
    color: #a9bbb4;
  }

  .status {
    background: #24302c;
    color: #c7d8d2;
  }

  button.secondary {
    color: #eaf1ee;
    background: #2a3934;
  }

  .player-panel,
  .video-button,
  .route-card {
    color: #eaf1ee;
    background: #17211e;
    border-color: #2b3c36;
    box-shadow: none;
  }

  .empty {
    border-color: #354941;
    color: #a9bbb4;
  }

  .volume-control strong {
    color: #eaf1ee;
  }

}
