body {
  font-family: system-ui, sans-serif;
  background: black;
  color: white;
  margin: 0;
  padding: 0;
}

header, main, footer {
  padding: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

h1 {
  font-size: 2rem;
  margin: 0.5rem 0;
}

section {
  margin: 2.5rem 0 1.5rem 0;
  background: none; 
  border-radius: 14px;
  box-shadow: none;
  padding: 1.2rem 1rem;
  border: 1px solid #333;
}

a {
    color: #88aaff;
}

a:hover {
    color: #cceeaa;
}

.download-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background: #333;
  color: white;
  border-radius: 0.5em;
  padding: 0.7em 1.3em;
  font-size: 1rem;
  border: 1px solid #555;
}
.download-btn:hover,
.download-btn:focus {
  background: #444;
  outline: 2px solid white;
  outline-offset: 1px;
  color: white;
}

pre {
  background: #222;
  color: #eee;
  padding: 0.5em 0.75em;
  border-radius: 0.4em;
  font-size: 0.95em;
  overflow-x: auto;
  margin-top: 0.5em;
  margin-bottom: 1em;
}

pre code {
    color: inherit;
}

section p + pre {
    margin-top: 0.5em;
}
pre + p {
    margin-top: 1em;
}

@media (max-width: 600px) {
  body, header, main, footer {
    padding: 0.5em;
    max-width: 100vw;
  }
  section {
    padding: 1em 0.5em;
  }
  pre {
    padding: 0.5em;
  }
}

/* Player styles - Updated for black background */
.accessible-audio-player {
  --player-primary: #88aaff; 
  --player-accent: #cceeaa; 
  --player-fg: white; 
  background: none; 
  border-radius: 14px;
  box-shadow: none; 
  padding: 1em 0.6em 0.6em 0.6em; 
  width: 100%;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  gap: 0.75em;
  border: none; 
}

.aap-controls {
  display: flex;
  align-items: center;
  gap: 0.8em;
  margin: 0.5em 0;
  flex-wrap: nowrap;
}

.aap-btn {
  background: transparent;
  border: none;
  color: var(--player-primary);
  font-size: 1em;
  font-weight: bold;
  padding: 0.4em 0.6em;
  border-radius: 0.5em;
  cursor: pointer;
  transition: background 0.14s;
  flex-shrink: 0;
  line-height: 1.2;
  text-align: center;
  min-width: 50px;
  text-shadow: none;
  text-transform: uppercase;
}

.aap-btn:focus, .aap-btn:focus-visible {
  outline: 2px solid var(--player-accent); 
  outline-offset: 1px;
  background: none; 
}

.aap-btn[aria-pressed="true"] {
  background: transparent; 
  color: var(--player-accent); 
  text-shadow: none;
}

.aap-title-artist {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1em;
  overflow: hidden;
}

.aap-title {
  font-weight: bold;
  color: var(--player-fg); 
  font-size: 1.05em;
  line-height: 1.14;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aap-artist {
  color: #ccc; 
  font-size: 0.95em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aap-progress {
  display: flex;
  align-items: center;
  height: 26px;
  gap: 0.5em;
}
.aap-progress-bar {
  width: 100%;
  background: #333; 
  border-radius: 2em;
  height: 7px;
  position: relative;
  flex: 1;
  margin: 0 0.5em;
  cursor: pointer;
  min-width: 60px;
}

.aap-progress-bar:focus, .aap-progress-bar:focus-visible {
  outline: 2px solid var(--player-accent); 
  outline-offset: 1px;
}

.aap-bar-inner {
  display: block;
  background: var(--player-primary); 
  height: 100%;
  border-radius: inherit;
  width: 0;
  transition: width 0.13s linear;
}
.aap-bar-buffered {
  background: #555; 
  position: absolute;
  height: 100%;
  border-radius: inherit;
  left:0;top:0;
  z-index: 0;
}

.aap-time {
  width: 56px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: #aaa; 
  font-size: 0.9em;
  flex-shrink: 0;
}

.aap-volume-wrap {
  display: flex;
  align-items: center;
  gap: 0.35em;
  margin-left: 0.3em;
  flex-shrink: 0;
}

.aap-volume-slider {
  width: 78px;
  accent-color: var(--player-primary);
}

.aap-playlist {
  margin-top: 0.4em;
  list-style: none;
  padding: 0;
  max-height: 180px;
  overflow-y: auto;
  font-size: 0.98em;
  border-top: 1px solid #333; 
  padding-top: 0.5em;
}

.aap-track {
  display: flex;
  align-items: center;
  gap: 0.7em;
  border-radius: 6px;
  padding: 0.4em 0.2em 0.4em 0.7em;
  transition: background 0.11s;
  background: transparent; 
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: white; 
}
.aap-track[aria-current="true"] {
  background: none; 
  color: #fff; 
  border-left: 3px solid var(--player-primary); 
  padding-left: calc(0.7em - 3px); 
}
.aap-track:focus-visible {
  outline: 2px solid var(--player-accent); 
  outline-offset: 1px;
}

.aap-track-title, .aap-track-artist {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aap-track-title {
  flex: 1;
}
.aap-track-artist {
  font-size: 0.9em;
  color: inherit; 
  opacity: 0.8;
  flex-shrink: 0;
  margin-left: auto;
}

.aap-track:not([aria-current="true"]) .aap-track-artist {
  color: #ccc; 
}

@media (max-width:550px) {
  .accessible-audio-player {
    padding: 0.8em 0.2em 0.4em 0.2em;
  }
  .aap-controls {
    gap: 0.4em;
  }
  .aap-btn {
    font-size: 0.9em;
    padding: 0.4em;
    min-width: 40px;
  }
  .aap-volume-slider {
    width: 48px;
  }
  .aap-time {
    width: 48px;
    font-size: 0.85em;
  }
  .aap-progress-bar {
    margin: 0 4px;
  }
  .aap-playlist {
    font-size: 0.9em;
  }
  .aap-track {
    padding: 0.3em 0.2em 0.3em 0.5em;
    gap: 0.4em;
  }
  .aap-track[aria-current="true"] {
      padding-left: calc(0.5em - 3px); 
  }
}