.ytc-wrapper {
  --ytc-bg: #f7f7f8;
  --ytc-surface: #ffffff;
  --ytc-border: #e3e3e6;
  --ytc-text: #1c1c1e;
  --ytc-text-sub: #6b6b70;
  --ytc-accent: #b8973a;
  --ytc-accent-bg: rgba(184, 151, 58, 0.12);
  --ytc-radius: 12px;

  margin: 2em 0;
  max-width: 100%;
}

@media (prefers-color-scheme: dark) {
  .ytc-wrapper {
    --ytc-bg: #1a1a1c;
    --ytc-surface: #232325;
    --ytc-border: #34343a;
    --ytc-text: #f0f0f2;
    --ytc-text-sub: #9a9aa0;
    --ytc-accent: #d4b15c;
    --ytc-accent-bg: rgba(212, 177, 92, 0.16);
  }
}

.ytc-video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: var(--ytc-radius);
  overflow: hidden;
  background: #000;
}

.ytc-video-frame iframe,
.ytc-player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.ytc-toc {
  margin-top: 14px;
  background: var(--ytc-surface);
  border: 1px solid var(--ytc-border);
  border-radius: var(--ytc-radius);
  overflow: hidden;
}

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

.ytc-toc li {
  border-bottom: 1px solid var(--ytc-border);
}

.ytc-toc li:last-child {
  border-bottom: none;
}

.ytc-toc-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.15s ease;
}

.ytc-toc-item:hover {
  background: var(--ytc-accent-bg);
}

.ytc-toc-item.is-active {
  background: var(--ytc-accent-bg);
}

.ytc-toc-item.is-active .ytc-time {
  color: var(--ytc-accent);
}

.ytc-time {
  flex: 0 0 auto;
  min-width: 52px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.85em;
  color: var(--ytc-text-sub);
  letter-spacing: 0.02em;
}

.ytc-title {
  flex: 1 1 auto;
  font-size: 0.92em;
  color: var(--ytc-text);
  line-height: 1.4;
}

@media (max-width: 480px) {
  .ytc-toc-item {
    padding: 10px 12px;
    gap: 10px;
  }
  .ytc-time {
    min-width: 44px;
    font-size: 0.78em;
  }
  .ytc-title {
    font-size: 0.85em;
  }
}
