:root {
  --video-surface: #ffffff;
  --video-border: #e3e8ee;
  --video-border-strong: #c9d1dc;
  --video-shadow: 0 18px 45px rgba(31, 41, 55, 0.12);
  --video-primary: #2563eb;
  --video-primary-soft: rgba(37, 99, 235, 0.1);
  --video-accent: #f97316;
  --video-danger: #ef4444;
  --video-radius: 18px;
  --video-radius-small: 12px;
  --video-text: #0f172a;
  --video-muted: #64748b;
  --video-bg: #f5f7fb;
}

.video-tool {
  background: var(--video-surface);
  border-radius: var(--video-radius);
  padding: 32px;
  margin-bottom: 48px;
  box-shadow: var(--video-shadow);
  border: 1px solid rgba(15, 23, 42, 0.04);
}

.video-tool + .video-tool {
  margin-top: 32px;
}

.video-tool__intro {
  display: grid;
  gap: 8px;
  margin-bottom: 28px;
}

.video-tool__title {
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--video-text);
  margin: 0;
}

.video-tool__subtitle {
  margin: 0;
  color: var(--video-muted);
  font-size: 1rem;
}

.video-tool__body {
  display: grid;
  gap: 32px;
}

@media (min-width: 992px) {
  .video-tool__body {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
  }
}

.video-tool__form {
  display: grid;
  gap: 28px;
}

.video-dropzone {
  position: relative;
  border: 2px dashed var(--video-border);
  border-radius: var(--video-radius);
  padding: 40px 28px;
  text-align: center;
  background: var(--video-bg);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.video-dropzone[data-video-dragover] {
  border-color: var(--video-primary);
  background: rgba(37, 99, 235, 0.08);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.video-dropzone__icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--video-primary);
  font-size: 28px;
  margin-bottom: 16px;
}

.video-dropzone__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.video-dropzone__hint {
  color: var(--video-muted);
  margin-bottom: 4px;
}

.video-dropzone__support {
  font-size: 0.9rem;
  color: var(--video-muted);
}

.video-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.video-preview {
  background: rgba(15, 23, 42, 0.02);
  border-radius: var(--video-radius);
  padding: 20px;
  display: grid;
  gap: 16px;
}

.video-preview[hidden] {
  display: none !important;
}

.video-preview__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--video-muted);
  font-size: 0.95rem;
}

.video-preview__meta strong {
  color: var(--video-text);
}

.video-preview__player {
  display: grid;
  gap: 12px;
}

.video-preview video {
  width: 100%;
  border-radius: var(--video-radius-small);
  background: #000;
}

.video-preview__timeline {
  position: relative;
}

.video-preview__range {
  width: 100%;
}

.video-timeline {
  display: grid;
  gap: 16px;
}

.video-timeline__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  color: var(--video-muted);
}

.video-timeline__strip {
  position: relative;
  height: 96px;
  border-radius: var(--video-radius-small);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.15));
}

.video-timeline__thumbs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  height: 100%;
}

.video-timeline__thumbs canvas,
.video-timeline__thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-timeline__handles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.video-timeline__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 16px;
  transform: translateX(-50%);
  pointer-events: auto;
  cursor: ew-resize;
  display: grid;
  place-items: center;
}

.video-timeline__handle::before {
  content: '';
  width: 4px;
  height: 60%;
  border-radius: 6px;
  background: var(--video-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.video-timeline__range {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(37, 99, 235, 0.28);
  border: 1px solid rgba(37, 99, 235, 0.45);
  border-radius: var(--video-radius-small);
  pointer-events: none;
}

.video-timeline__fields {
  display: grid;
  gap: 12px;
}

@media (min-width: 576px) {
  .video-timeline__fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.video-field {
  display: grid;
  gap: 6px;
}

.video-field label {
  font-weight: 600;
  color: var(--video-text);
}

.video-field input,
.video-field select,
.video-field textarea {
  border-radius: 12px;
  border: 1px solid var(--video-border);
  padding: 12px 16px;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.video-field input:focus,
.video-field select:focus,
.video-field textarea:focus {
  border-color: var(--video-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  outline: none;
}

.video-tool__options {
  display: grid;
  gap: 24px;
}

.video-options-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 576px) {
  .video-options-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.video-advanced {
  border-radius: var(--video-radius-small);
  border: 1px solid rgba(100, 116, 139, 0.2);
  padding: 0 18px 18px;
  background: rgba(15, 23, 42, 0.01);
}

.video-advanced summary {
  font-weight: 600;
  padding: 14px 0;
  cursor: pointer;
  color: var(--video-text);
  position: relative;
  list-style: none;
}

.video-advanced summary::marker,
.video-advanced summary::-webkit-details-marker {
  display: none;
}

.video-advanced summary::after {
  content: '\25be';
  position: absolute;
  right: 0;
  top: 14px;
  font-size: 0.9rem;
  color: var(--video-muted);
  transition: transform 0.2s ease;
}

.video-advanced[open] summary::after {
  transform: rotate(180deg);
}

.video-advanced__content {
  padding-top: 8px;
  display: grid;
  gap: 16px;
}

.video-tool__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.video-tool__submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--video-primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.video-tool__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

.video-tool__submit i {
  font-size: 1.1rem;
}

.video-tool__note {
  font-size: 0.9rem;
  color: var(--video-muted);
}

.video-tool__aside {
  background: var(--video-bg);
  border-radius: var(--video-radius);
  padding: 24px;
  display: grid;
  gap: 12px;
  color: var(--video-text);
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.video-tool__aside h2 {
  margin: 0;
  font-size: 1.25rem;
}

.video-tool__aside ul {
  margin: 0;
  padding-left: 20px;
  color: var(--video-muted);
  display: grid;
  gap: 6px;
}

.video-error {
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--video-danger);
  background: rgba(239, 68, 68, 0.08);
}

.video-progress {
  width: 100%;
  display: grid;
  gap: 10px;
  background: rgba(37, 99, 235, 0.08);
  border-radius: var(--video-radius-small);
  padding: 16px;
}

.video-progress[hidden] {
  display: none !important;
}

.video-progress__bar {
  position: relative;
  height: 8px;
  background: rgba(37, 99, 235, 0.2);
  border-radius: 999px;
  overflow: hidden;
}

.video-progress__bar span {
  position: absolute;
  inset: 0;
  background: var(--video-primary);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.video-queue {
  display: grid;
  gap: 16px;
}

.video-queue[hidden] {
  display: none !important;
}

.video-queue__list {
  display: grid;
  gap: 14px;
}

.video-clip {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  background: rgba(15, 23, 42, 0.02);
  border-radius: var(--video-radius-small);
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.video-clip video {
  width: 96px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  background: #000;
}

.video-clip__meta {
  display: grid;
  gap: 6px;
}

.video-clip__actions {
  display: flex;
  gap: 8px;
}

.video-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--video-primary);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.video-estimate {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.95rem;
  color: var(--video-muted);
}

.video-estimate strong {
  color: var(--video-text);
}

.video-radio-grid {
  display: grid;
  gap: 12px;
}

@media (min-width: 576px) {
  .video-radio-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

.video-radio {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: var(--video-radius-small);
  padding: 14px;
  display: grid;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.video-radio input {
  position: absolute;
  opacity: 0;
}

.video-radio[data-selected] {
  border-color: var(--video-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.video-radio__icon {
  font-size: 1.4rem;
  color: var(--video-primary);
}

.video-radio__title {
  font-weight: 600;
  color: var(--video-text);
}

.video-radio__hint {
  font-size: 0.9rem;
  color: var(--video-muted);
}

.video-tool__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.video-field textarea {
  min-height: 120px;
  resize: vertical;
}

.video-meta-grid {
  display: grid;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--video-muted);
}

.video-meta-grid strong {
  color: var(--video-text);
}

.video-empty {
  padding: 32px;
  text-align: center;
  color: var(--video-muted);
  border: 1px dashed var(--video-border);
  border-radius: var(--video-radius);
}

.video-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--video-muted);
}

.video-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.video-legend span::before {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: currentColor;
  opacity: 0.35;
}

.video-legend span[data-legend="start"]::before {
  background: var(--video-primary);
  opacity: 0.65;
}

.video-legend span[data-legend="trim"]::before {
  background: var(--video-accent);
  opacity: 0.55;
}

.video-legend span[data-legend="end"]::before {
  background: var(--video-muted);
  opacity: 0.45;
}

.video-shortcuts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.video-shortcuts button {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: transparent;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  color: var(--video-muted);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.video-shortcuts button:hover {
  border-color: var(--video-primary);
  color: var(--video-primary);
}

.video-tool__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--video-primary);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
}

.video-tagline {
  font-size: 0.95rem;
  color: var(--video-muted);
}
