:root {
  --bg: #0b1120;
  --surface: #111827;
  --surface-2: #1e293b;
  --border: #273549;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #10b981;
  --accent-hover: #059669;
  --radius: 14px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.container {
  width: min(1080px, 92%);
  margin-inline: auto;
}

.is-hidden {
  display: none !important;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(11, 17, 32, 0.9);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: #042f2e;
  font-weight: 800;
}

.brand-text small {
  color: var(--accent);
  font-weight: 600;
}

.header-nav {
  display: flex;
  gap: 1.25rem;
}

.header-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.header-nav a:hover {
  color: var(--text);
}

.hero {
  text-align: center;
  padding: 2.8rem 0 1.6rem;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.pill {
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  line-height: 1.15;
  margin: 0 auto 0.85rem;
  max-width: 780px;
}

.hero-sub {
  color: var(--muted);
  max-width: 650px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 3rem 1.25rem;
  text-align: center;
  cursor: pointer;
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  transition: border-color 0.2s, background 0.2s;
}

.dropzone:hover, .dropzone.is-dragover {
  border-color: var(--accent);
  background: rgba(16, 185, 129, 0.06);
}

.dropzone-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  color: var(--accent);
}

.dropzone span {
  color: var(--muted);
  font-size: 0.9rem;
}

.editor-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 820px) {
  .editor-grid {
    grid-template-columns: 1fr;
  }
}

.preview-pane video,
.output-wrap video {
  width: 100%;
  max-height: 420px;
  border-radius: 10px;
  background: #000;
}

.video-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.45rem;
}

.controls-pane {
  display: grid;
  gap: 1.1rem;
}

.control-group {
  display: grid;
  gap: 0.5rem;
}

.control-group label {
  font-weight: 600;
  font-size: 0.92rem;
}

.time-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.time-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  display: grid;
  gap: 0.35rem;
}

.time-box span {
  font-size: 0.78rem;
  color: var(--muted);
}

.time-box input {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  font-size: 0.95rem;
}

.mini-btn {
  background: transparent;
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 6px;
  padding: 0.25rem 0.45rem;
  font-size: 0.78rem;
  cursor: pointer;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 0.95rem;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn-primary, .btn-download {
  background: var(--accent);
  color: #042f2e;
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1.15rem;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary:hover, .btn-download:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-weight: 600;
  cursor: pointer;
}

.progress-wrap {
  display: grid;
  gap: 0.4rem;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
}

progress {
  width: 100%;
  height: 10px;
  appearance: none;
  border: 0 solid;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: clip;
  container-type: inline-size;
  --progress-bar-indeterminate-size: 30%;
  --progress-bar-indeterminate-animation-duration: 1.5s;
}

@media (prefers-reduced-motion: reduce) {
  progress {
    --progress-bar-indeterminate-animation-duration: 10s;
  }
}

progress::-webkit-progress-bar {
  background: transparent;
}

progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 999px;
  transition: inline-size 0.25s;
}

progress::-moz-progress-bar {
  background: var(--accent);
  border-radius: 999px;
  transition: inline-size 0.25s;
}

.output-wrap {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  display: grid;
  gap: 0.75rem;
}

.output-wrap h3 {
  margin: 0;
  font-size: 1rem;
  color: #6ee7b7;
}

.info-section, .faq-section {
  padding: 2.5rem 0 0;
}

.info-section h2, .faq-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
}

.feature-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.65rem;
}

summary {
  font-weight: 600;
  cursor: pointer;
}

details p {
  color: var(--muted);
  margin: 0.6rem 0 0;
  font-size: 0.92rem;
}

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}
