.uriaiyu-stage-v1 {
  --stage-ease: cubic-bezier(0.23, 1, 0.32, 1);
  --stage-radius: 12px;
  --stage-accent: #8b5cf6;
  --stage-accent-glow: rgba(139, 92, 246, 0.25);
  --stage-bg: #ffffff;
  --stage-border: rgba(0, 0, 0, 0.09);
  --stage-text-primary: #1e1b4b;
  --stage-text-muted: #64748b;
  --us-pill-bg: #f1f5f9;
  --us-pill-text: #334155;
  --stage-caption-bg: #f8fafc;
}

[data-theme="dark"] .uriaiyu-stage-v1,
.dark-theme .uriaiyu-stage-v1,
html.dark .uriaiyu-stage-v1,
html[data-uriaiyu-theme="dark"] .uriaiyu-stage-v1 {
  --stage-bg: #09090b;
  --stage-border: rgba(255, 255, 255, 0.12);
  --stage-text-primary: #f8fafc;
  --stage-text-muted: #94a3b8;
  --us-pill-bg: rgba(255, 255, 255, 0.08);
  --us-pill-text: #e2e8f0;
  --stage-caption-bg: rgba(255, 255, 255, 0.04);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-uriaiyu-theme="light"]) .uriaiyu-stage-v1,
  html:not([data-uriaiyu-theme="light"]) .uriaiyu-stage-v1 {
    --stage-bg: #09090b;
    --stage-border: rgba(255, 255, 255, 0.12);
    --stage-text-primary: #f8fafc;
    --stage-text-muted: #94a3b8;
    --us-pill-bg: rgba(255, 255, 255, 0.08);
    --us-pill-text: #e2e8f0;
    --stage-caption-bg: rgba(255, 255, 255, 0.04);
  }
  html:not([data-uriaiyu-theme="light"]) .uriaiyu-stage-v1 .us-badge {
    background: rgba(255, 255, 255, 0.12);
  }
}

.uriaiyu-stage-v1 {
  margin: 28px 0;
  background: var(--stage-bg);
  border: 1px solid var(--stage-border);
  border-radius: var(--stage-radius);
  overflow: hidden;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.04);
}

.uriaiyu-stage-v1 .us-player {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  background: #09090b;
  overflow: hidden;
}

.uriaiyu-stage-v1 .us-player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.uriaiyu-stage-v1 .us-controls {
  padding: 14px 16px 16px;
}

.uriaiyu-stage-v1 .us-pills-wrap {
  position: relative;
  width: 100%;
}

.uriaiyu-stage-v1 .us-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 8px 2px;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.uriaiyu-stage-v1 .us-pills::-webkit-scrollbar {
  display: none;
}

.uriaiyu-stage-v1 .us-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 16px;
  border-radius: 9999px;
  background: var(--us-pill-bg);
  color: var(--us-pill-text);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  scroll-snap-align: start;
  transition: 
    transform 160ms var(--stage-ease),
    background 160ms var(--stage-ease),
    color 160ms var(--stage-ease),
    border-color 160ms var(--stage-ease),
    box-shadow 160ms var(--stage-ease);
}

.uriaiyu-stage-v1 .us-pill:active {
  transform: scale(0.97);
}

.uriaiyu-stage-v1 .us-pill:focus-visible {
  outline: 2px solid var(--stage-accent);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .uriaiyu-stage-v1 .us-pill:hover:not(.is-active) {
    background: rgba(139, 92, 246, 0.12);
    color: var(--stage-text-primary);
  }
}

.uriaiyu-stage-v1 .us-pill.is-active {
  background: var(--stage-accent);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 10px var(--stage-accent-glow);
}

.uriaiyu-stage-v1 .us-pill.is-active .us-badge {
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

.uriaiyu-stage-v1 .us-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
  letter-spacing: 0.02em;
}

[data-theme="dark"] .uriaiyu-stage-v1 .us-badge,
.dark-theme .uriaiyu-stage-v1 .us-badge,
html[data-uriaiyu-theme="dark"] .uriaiyu-stage-v1 .us-badge {
  background: rgba(255, 255, 255, 0.12);
}

.uriaiyu-stage-v1 .us-caption {
  margin-top: 6px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--stage-caption-bg);
  border: 1px solid var(--stage-border);
  color: var(--stage-text-muted);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
  .uriaiyu-stage-v1 .us-pill,
  .uriaiyu-stage-v1 .us-pill:active {
    transition: none !important;
    transform: none !important;
  }
  .uriaiyu-stage-v1 .us-pills {
    scroll-behavior: auto !important;
  }
}
