*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body.page--dark {
  background: #000;
  color: #f5f5f5;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Helvetica Neue", Arial, sans-serif;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 16px 48px;
}

.header {
  margin-bottom: 24px;
}

.title {
  font-size: 28px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.subtitle {
  margin: 0;
  color: #b3b3b3;
  font-size: 14px;
}

.card {
  border: 1px solid #333;
  border-radius: 8px;
  padding: 20px 18px;
  margin-bottom: 20px;
  background: #050505;
}

.section-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 500;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form__label {
  font-size: 14px;
}

.form__file {
  display: block;
  margin-top: 8px;
  font-size: 14px;
}

.form__hint {
  margin: 0;
  font-size: 12px;
  color: #8c8c8c;
  line-height: 1.5;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  color: inherit;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.button-icon {
  display: inline-block;
  margin-right: 6px;
  font-size: 12px;
}

.button--primary {
  background: #f5f5f5;
  color: #000;
  border-color: #f5f5f5;
}

.button--primary:hover {
  background: #fff;
  border-color: #fff;
}

.button--ghost {
  border-color: #666;
}

.button--ghost:hover {
  background: #111;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list__item {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid #1a1a1a;
}

.list__item:last-child {
  border-bottom: none;
}

.list__item > .player {
  flex: 1 1 auto;
}

.list__label {
  text-transform: capitalize;
}

.list__status {
  font-size: 12px;
}

.list__status--missing {
  color: #888;
}

.flash-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.flash-item {
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #261313;
  border: 1px solid #663333;
}

.footer {
  margin-top: 24px;
  font-size: 11px;
  color: #666;
}

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

.wave {
  width: 100%;
  height: 64px;
  background: #f5f5f5;
}

.player__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.player__time {
  font-size: 11px;
  color: #888;
}

.player--loading .wave {
  background-image: repeating-linear-gradient(
    -45deg,
    #1a1a1a,
    #1a1a1a 10px,
    #050505 10px,
    #050505 20px
  );
  animation: wave-loading 1s linear infinite;
}

.player--loading .player__time {
  color: #aaa;
}

.player--error .wave {
  background: #261313;
}

.player--error .player__time {
  color: #ff6b6b;
}

@keyframes wave-loading {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 40px 0;
  }
}

@media (prefers-color-scheme: light) {
  body.page--dark {
    background: #fff;
    color: #111;
  }

  .card {
    background: #fafafa;
    border-color: #ddd;
  }

  .button--ghost:hover {
    background: #f0f0f0;
  }
}
