* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #0f1115;
  color: #f5f7fb;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px;
}

h1 {
  margin: 8px 0 16px;
  font-size: 1.5rem;
}

.player-card,
.danmaku-card {
  background: #171a21;
  border: 1px solid #2a2f3a;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
}

.video-wrap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
}

.video-wrap video {
  width: 100%;
  background: #000;
}

.danmaku-layer {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.danmaku-item {
  position: absolute;
  left: 100%;
  white-space: nowrap;
  font-size: 18px;
  text-shadow: 1px 1px 2px #000;
  animation: danmaku-move linear forwards;
}

@keyframes danmaku-move {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-180vw);
  }
}

.inputs {
  display: grid;
  grid-template-columns: 140px 1fr 120px;
  gap: 8px;
}

input,
button {
  border: 1px solid #2b3140;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
}

input {
  background: #12151c;
  color: #f2f4f9;
}

button {
  background: #2563eb;
  color: #fff;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  background: #3f4a63;
}

.muted {
  margin: 8px 0 0;
  color: #adb5c6;
  font-size: 13px;
}

.tip {
  margin-bottom: 8px;
  padding: 10px;
  border-radius: 8px;
  background: #463b0c;
  color: #ffe390;
  font-size: 14px;
}

.hidden {
  display: none;
}

@media (max-width: 720px) {
  .inputs {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 12px;
  }
}
