* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #0f1426;
  --panel: #1a2135;
  --panel-strong: #232b44;
  --muted: #9aa4b2;
  --text: #e5e7eb;
  --accent: #3f7cff;
  --accent-soft: rgba(63, 124, 255, 0.2);
  --border: rgba(148, 163, 184, 0.2);
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  background: #0d1222;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.logo {
  font-weight: 600;
  font-size: 18px;
}

.topbar-tip {
  font-size: 12px;
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 12px;
}

.nav-link {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
}

.nav-link.active {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent-soft);
}

.workbench {
  padding: 24px 32px 40px;
}

.work-section {
  display: none;
}

.work-section.active {
  display: block;
}

.work-grid {
  display: grid;
  grid-template-columns: minmax(320px, 460px) minmax(0, 1fr);
  gap: 24px;
}

.panel {
  background: var(--panel);
  border-radius: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(4, 9, 20, 0.5);
}

.upload-zone {
  border: 1px dashed rgba(63, 124, 255, 0.5);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(63, 124, 255, 0.06);
}

.upload-zone.dragging {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(63, 124, 255, 0.25);
}

.upload-zone input[type="file"] {
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

.upload-text span {
  font-size: 14px;
}

.upload-text small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

.upload-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.upload-result {
  font-size: 12px;
  color: var(--muted);
}

.preview {
  margin-top: 16px;
  background: var(--panel-strong);
  border-radius: 12px;
  padding: 12px;
}

.preview video {
  width: 100%;
  max-height: 420px;
  background: #000;
  border-radius: 10px;
}

.preview img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 10px;
  background: #000;
}

.trim {
  margin-top: 16px;
  background: var(--panel-strong);
  border-radius: 12px;
  padding: 12px;
}

.trim-info {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.trim-info em {
  color: #fff;
  font-style: normal;
}

.range-stack {
  position: relative;
  margin-top: 12px;
}

.range-stack input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  height: 6px;
  background: rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  outline: none;
  margin: 6px 0;
}

.range-stack input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(63, 124, 255, 0.2);
}

.hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

.tab-header {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  padding-bottom: 6px;
  border-bottom: 2px solid transparent;
}

.tab-btn.active {
  color: #fff;
  border-bottom-color: var(--accent);
}

.tab-panel {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.tab-panel.active {
  display: flex;
}

label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
  display: block;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #131a2c;
  color: #fff;
  font-size: 14px;
}

textarea {
  resize: vertical;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14px;
  background: var(--panel-strong);
  color: #fff;
  cursor: pointer;
}

.btn.primary {
  background: var(--accent);
}

.btn.large {
  padding: 12px 26px;
  font-size: 15px;
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.btn.outline {
  background: transparent;
  border: 1px solid rgba(63, 124, 255, 0.4);
  color: var(--accent);
}

.image-list {
  margin-top: 16px;
}

.action-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
}

.result {
  flex: 1;
  background: var(--panel);
  border-radius: 12px;
  padding: 12px;
  min-height: 48px;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}

.result img {
  display: block;
  max-width: 240px;
  margin-top: 8px;
  border-radius: 8px;
}

@media (max-width: 1024px) {
  .work-grid {
    grid-template-columns: 1fr;
  }

  .action-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

