/* Kostenlose Video-Tools (/tools) – baut auf /css/style.css auf (Farben, Buttons, FAQ, Fusszeile). */

.tools-page [hidden] { display: none !important; }
.tools-page .nav-links a.on { color: var(--ink); }

/* ---------- Kopf ---------- */
.tool-hero { padding: 54px 20px 26px; }
.tool-hero h1 { font-size: clamp(30px, 4.6vw, 52px); }
.tools-page h1, .tools-page h2, .tools-page h3 { overflow-wrap: break-word; hyphens: auto; }
.tool-hero .sub { margin: 20px auto 24px; }
.tool-hero .eyebrow { margin-bottom: 14px; }
.crumbs {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--ink-faint); margin-bottom: 22px;
}
.crumbs a { color: var(--ink-soft); }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { opacity: 0.5; }
.chips { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chips li {
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
  padding: 6px 14px; border-radius: 999px;
}
.chips li::before { content: '✓'; color: var(--green); font-weight: 800; margin-right: 7px; }

/* ---------- Tool-Fläche ---------- */
.tool-wrap { padding-top: 10px; padding-bottom: 20px; }
.tool-app {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: 26px; padding: 14px; box-shadow: var(--shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.tool-app.drag { border-color: var(--pink); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }
.ta-drop {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 54px 22px; border: 2px dashed rgba(255, 255, 255, 0.16); border-radius: 18px;
  background: radial-gradient(420px 200px at 50% 0%, rgba(255, 45, 120, 0.1), transparent 70%), var(--bg-soft);
  cursor: pointer; transition: border-color 0.2s ease, background-color 0.2s ease;
}
.ta-drop:hover, .tool-app.drag .ta-drop { border-color: rgba(255, 45, 120, 0.6); }
.ta-drop-icon {
  width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center;
  background: var(--grad-btn); color: #fff; box-shadow: 0 10px 30px rgba(255, 45, 120, 0.4); margin-bottom: 8px;
}
.ta-drop-icon svg { width: 30px; height: 30px; }
.ta-drop-title { font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.ta-drop-or { color: var(--ink-faint); font-size: 14px; }
.ta-choose { cursor: pointer; }
.ta-drop-hint { color: var(--ink-soft); font-size: 14px; margin-top: 4px; }
.ta-drop-privacy { color: var(--ink-faint); font-size: 13px; }
.ta-drop-err, .ta-err {
  color: var(--red); font-weight: 600; font-size: 14px;
  background: rgba(255, 92, 122, 0.1); border: 1px solid rgba(255, 92, 122, 0.3);
  border-radius: var(--radius-sm); padding: 10px 14px; margin-top: 6px;
}
.ta-noscript { color: var(--gold); text-align: center; padding: 12px; }

.ta-work { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 18px; }
.ta-stage, .ta-side { min-width: 0; }
.ta-side { display: flex; flex-direction: column; gap: 16px; padding: 8px 8px 8px 4px; }

/* Vorschau */
.ta-preview {
  position: relative; background: #05030a; border-radius: 16px; overflow: hidden;
  display: grid; place-items: center; min-height: 220px;
}
.ta-preview video { width: 100%; max-height: min(62vh, 520px); background: #000; display: block; }
.ta-preview.no-preview video { display: none; }
.ta-nopv { color: var(--ink-soft); font-size: 14px; text-align: center; padding: 30px 20px; }
.ta-preview.is-audio { padding: 36px 20px; gap: 18px; }
.ta-audio-ico {
  width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad-btn); color: #fff; font-size: 34px; box-shadow: var(--glow);
}
.ta-preview audio, .ta-audio-res audio { width: min(100%, 420px); }

/* Seitenverhältnis-Vorschau */
.ta-preview.is-aspect { padding: 16px; background: repeating-conic-gradient(#0b0814 0 25%, #100c1c 0 50%) 0 0 / 22px 22px; }
.ar-frame {
  position: relative; overflow: hidden; background: #000; border-radius: 10px;
  aspect-ratio: var(--ar, 9 / 16); width: min(100%, calc(min(56vh, 460px) * var(--arn, 0.5625)));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 12px 40px rgba(0, 0, 0, 0.5);
}
.ar-frame video { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; background: transparent; }
.ar-frame .ar-bg { object-fit: cover; filter: blur(18px) brightness(0.85); transform: scale(1.15); }
.ar-frame .ar-fg { object-fit: contain; }
.ar-frame[data-mode='bars'] .ar-bg { display: none; }
.ar-frame[data-mode='fill'] .ar-bg { display: none; }
.ar-frame[data-mode='fill'] .ar-fg { object-fit: cover; }

/* Zuschnitt-Rahmen */
.ta-preview.is-crop { display: block; }
.ta-preview.is-crop video { margin: 0 auto; }
.crop-layer { position: absolute; overflow: hidden; pointer-events: none; }
.crop-box {
  position: absolute; pointer-events: auto; cursor: move; touch-action: none;
  border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(5, 3, 10, 0.62);
  outline: none;
}
.crop-box:focus-visible { border-color: var(--gold); }
.crop-box::before, .crop-box::after { content: ''; position: absolute; inset: 0; pointer-events: none; }
.crop-box::before { background: linear-gradient(to right, transparent calc(33.33% - 0.5px), rgba(255, 255, 255, 0.35) 0 calc(33.33% + 0.5px), transparent 0 calc(66.66% - 0.5px), rgba(255, 255, 255, 0.35) 0 calc(66.66% + 0.5px), transparent 0); }
.crop-box::after { background: linear-gradient(to bottom, transparent calc(33.33% - 0.5px), rgba(255, 255, 255, 0.35) 0 calc(33.33% + 0.5px), transparent 0 calc(66.66% - 0.5px), rgba(255, 255, 255, 0.35) 0 calc(66.66% + 0.5px), transparent 0); }
.crop-h {
  position: absolute; width: 18px; height: 18px; background: #fff; border-radius: 50%;
  box-shadow: 0 0 0 3px var(--pink); touch-action: none;
}
.crop-h.nw { left: -10px; top: -10px; cursor: nwse-resize; }
.crop-h.ne { right: -10px; top: -10px; cursor: nesw-resize; }
.crop-h.sw { left: -10px; bottom: -10px; cursor: nesw-resize; }
.crop-h.se { right: -10px; bottom: -10px; cursor: nwse-resize; }
.ta-crop-play { position: absolute; left: 10px; bottom: 10px; }
.ta-crop-play .btn { background: rgba(13, 9, 24, 0.75); color: #fff; backdrop-filter: blur(6px); }

/* Zeitbereich */
.tr { margin-top: 16px; padding: 4px 6px 6px; }
.tr .ta-label { margin-bottom: 12px; }
.tr-track {
  position: relative; height: 46px; border-radius: 12px; cursor: pointer; touch-action: none;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 2px, transparent 2px 10px), var(--bg-soft);
  border: 1px solid var(--line);
}
.tr-sel {
  position: absolute; top: 0; bottom: 0; border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 45, 120, 0.42), rgba(255, 123, 61, 0.42));
  border: 2px solid var(--pink);
}
.tr-track.rm .tr-sel {
  background: repeating-linear-gradient(135deg, rgba(255, 92, 122, 0.45) 0 8px, rgba(255, 92, 122, 0.18) 8px 16px);
  border-color: var(--red);
}
.tr-head { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--gold); border-radius: 2px; pointer-events: none; left: 0; }
.tr-h {
  position: absolute; top: 50%; width: 22px; height: 54px; margin-left: -11px; transform: translateY(-50%);
  border: none; border-radius: 8px; background: #fff; cursor: ew-resize; touch-action: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}
.tr-h::after { content: ''; position: absolute; left: 50%; top: 50%; width: 2px; height: 18px; margin: -9px 0 0 -1px; background: var(--pink); border-radius: 2px; }
.tr-h:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.tr-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 16px; }
.tr-f { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.tr-in {
  width: 92px; font: inherit; font-size: 14px; font-weight: 700; color: var(--ink);
  font-variant-numeric: tabular-nums; text-align: center;
  background: var(--bg-soft); border: 1.5px solid var(--line); border-radius: 10px; padding: 7px 8px;
}
.tr-in:focus { outline: none; border-color: var(--pink); }
.tr-len { font-size: 13px; font-weight: 700; color: var(--gold); margin-left: auto; font-variant-numeric: tabular-nums; }

/* Seitenleiste */
.ta-file { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.ta-file-txt { min-width: 0; }
.ta-fname { font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.ta-fmeta { color: var(--ink-faint); font-size: 13px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.ta-link {
  background: none; border: none; padding: 0; font: inherit; font-size: 13px; font-weight: 700;
  color: var(--pink); cursor: pointer; white-space: nowrap;
}
.ta-link:hover { color: var(--gold); }
.ta-settings { display: flex; flex-direction: column; gap: 16px; }
.ta-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1.8px; font-weight: 800;
  color: var(--ink-faint); margin-bottom: 8px;
}
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-b {
  flex: 1 1 auto; min-width: 64px; display: flex; flex-direction: column; align-items: center; gap: 1px;
  font: inherit; font-size: 14px; font-weight: 700; color: var(--ink-soft);
  background: var(--bg-soft); border: 1.5px solid var(--line); border-radius: 12px;
  padding: 9px 10px; cursor: pointer; transition: all 0.15s ease;
}
.seg-b:hover { border-color: rgba(255, 255, 255, 0.28); color: var(--ink); }
.seg-b.on { color: var(--ink); border-color: var(--pink); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--pink); }
.seg-h { font-size: 11.5px; font-weight: 600; color: var(--ink-faint); }
.seg-b.on .seg-h { color: var(--ink-soft); }
.ta-slider { display: flex; align-items: center; gap: 14px; }
.ta-slider input { flex: 1; accent-color: var(--pink); height: 28px; }
.ta-out { min-width: 64px; text-align: right; font-family: var(--font-display); font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.ta-check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink-soft); cursor: pointer; line-height: 1.45; }
.ta-check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--pink); flex: none; }
.ta-note { color: var(--ink-faint); font-size: 13px; line-height: 1.5; }

.ta-mlist { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; counter-reset: clip; }
.ml-i {
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; counter-increment: clip;
  background: var(--bg-soft); border: 1.5px solid var(--line); border-radius: 12px;
}
.ml-i::before { content: counter(clip); font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--pink); width: 16px; }
.ml-i.on { border-color: rgba(255, 45, 120, 0.55); }
.ml-name { flex: 1; min-width: 0; text-align: left; background: none; border: none; color: inherit; font: inherit; cursor: pointer; padding: 2px 0; }
.ml-name b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml-name span { font-size: 12px; color: var(--ink-faint); }
.ml-btns { display: flex; gap: 4px; flex: none; }
.ml-b {
  width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink-soft); font-size: 14px; font-weight: 800; cursor: pointer;
}
.ml-b:hover:not(:disabled) { color: var(--ink); border-color: rgba(255, 255, 255, 0.3); }
.ml-b:disabled { opacity: 0.3; cursor: default; }
.ta-add { align-self: flex-start; }

/* Status und Aktionen */
.ta-status:empty { display: none; }
.ta-status { display: flex; flex-direction: column; gap: 8px; }
.ta-msg { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.ta-sub { color: var(--ink-faint); font-size: 12.5px; }
.ta-bar { height: 8px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; }
.ta-bar i { display: block; height: 100%; background: var(--grad-btn); border-radius: 99px; transition: width 0.25s ease; }
.ta-status.err .btn { align-self: flex-start; }
.ta-details summary { cursor: pointer; font-size: 12.5px; color: var(--ink-faint); }
.ta-details pre {
  margin-top: 8px; max-height: 180px; overflow: auto; font-size: 11px; line-height: 1.45; white-space: pre-wrap;
  background: var(--bg-soft); border-radius: 10px; padding: 10px; color: var(--ink-soft);
}
.ta-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: auto; }
.ta-start { flex: 1; }
.ta-privacy { color: var(--ink-faint); font-size: 12.5px; text-align: center; }
.tool-app.busy .ta-settings, .tool-app.busy .tr, .tool-app.busy .ta-mlist, .tool-app.busy .ta-add { opacity: 0.55; pointer-events: none; }

/* Ergebnis */
.ta-result { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 18px; }
.ta-res-media {
  background: repeating-conic-gradient(#0b0814 0 25%, #100c1c 0 50%) 0 0 / 22px 22px;
  border-radius: 16px; overflow: hidden; display: grid; place-items: center; min-height: 220px;
}
.ta-res-media video, .ta-res-media img { width: 100%; max-height: min(62vh, 520px); object-fit: contain; display: block; }
.ta-res-media img { width: auto; max-width: 100%; }
.ta-res-media.is-audio { background: var(--bg-soft); }
.ta-audio-res { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 30px 18px; width: 100%; }
.ta-res-side { display: flex; flex-direction: column; gap: 12px; padding: 8px 8px 8px 4px; }
.ta-done { display: flex; align-items: center; gap: 12px; }
.ta-done .ok {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: rgba(46, 232, 138, 0.15); color: var(--green); font-weight: 900; font-size: 18px;
}
.ta-done h2 { font-family: var(--font-display); font-size: 24px; letter-spacing: -0.3px; }
.ta-size { font-size: 15px; color: var(--ink-soft); font-variant-numeric: tabular-nums; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.ta-size b { color: var(--ink); font-size: 17px; }
.ta-gain { background: rgba(46, 232, 138, 0.14); color: var(--green); font-weight: 800; font-size: 12.5px; padding: 3px 10px; border-radius: 99px; }
.ta-took { color: var(--ink-faint); font-size: 13px; }
.ta-dl { margin-top: 4px; }
.ta-res-more { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ta-promo {
  margin-top: 8px; padding: 14px 16px; border-radius: var(--radius-sm); font-size: 14px; color: var(--ink-soft);
  border: 1px solid transparent;
  background: linear-gradient(var(--card-2), var(--card-2)) padding-box, var(--grad) border-box;
}
.ta-promo a, .tool-promo a { color: var(--pink); font-weight: 800; }
.ta-promo a:hover, .tool-promo a:hover { color: var(--gold); }
.tool-promo { text-align: center; color: var(--ink-soft); font-size: 15px; margin-top: 18px; }

/* ---------- Abschnitte ---------- */
.tools-page .tool-sec { padding: 64px 20px; }
.tools-page .tool-sec .section-head { margin-bottom: 36px; }
.tools-page .step-card { padding: 22px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.tool-about .prose { max-width: 760px; margin: 0 auto; }
.tool-about .prose p { color: var(--ink-soft); font-size: 16.5px; line-height: 1.75; }
.tool-about .prose p + p { margin-top: 14px; }

.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tool-card {
  display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 18px;
  background: var(--card); border: 1px solid var(--line);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.tool-card:hover { transform: translateY(-3px); border-color: rgba(255, 45, 120, 0.45); box-shadow: 0 16px 40px rgba(255, 45, 120, 0.12); }
.tc-ico {
  width: 44px; height: 44px; border-radius: 13px; flex: none; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--pink);
}
.tool-card:hover .tc-ico { background: var(--grad-btn); color: #fff; }
.tc-ico svg { width: 22px; height: 22px; }
.tc-txt { min-width: 0; }
.tc-name { font-family: var(--font-display); font-size: 15.5px; font-weight: 700; letter-spacing: -0.2px; line-height: 1.3; }
.tc-desc { display: block; color: var(--ink-soft); font-size: 14px; margin-top: 4px; line-height: 1.45; }
.tool-grid.compact { grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tool-grid.compact .tool-card { padding: 14px; gap: 12px; }
.tool-grid.compact .tc-ico { width: 38px; height: 38px; border-radius: 11px; }
.tool-grid.compact .tc-ico svg { width: 19px; height: 19px; }
.tool-grid.compact .tc-name { font-size: 14px; }
.tool-grid.compact .tc-desc { font-size: 13px; }
.tool-all { text-align: center; margin-top: 26px; }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.why-card { padding: 28px 26px; }

.tools-page .cta-band { margin-top: 30px; }

/* ---------- Schmale Bildschirme ---------- */
@media (max-width: 1000px) {
  .tool-grid.compact { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .ta-work, .ta-result { grid-template-columns: 1fr; }
  .ta-side, .ta-res-side { padding: 4px; }
  .tool-grid, .tool-grid.compact { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .tool-hero { padding: 34px 16px 18px; }
  .tool-app { padding: 10px; border-radius: 20px; }
  .ta-drop { padding: 38px 16px; }
  .tool-grid, .tool-grid.compact { grid-template-columns: 1fr; }
  .tools-page .tool-sec { padding: 44px 16px; }
  .tools-page .container { padding-left: 16px; padding-right: 16px; }
  .tr-len { margin-left: 0; width: 100%; }
  .tr-row .btn-sm { padding: 7px 12px; }
  .tools-page .nav-login { display: none; }
  .chips li { font-size: 12px; padding: 5px 11px; }
}
@media (max-width: 400px) {
  .tools-page .nav-actions .btn-primary { padding: 7px 12px; font-size: 12.5px; }
  .tools-page .btn-lg { white-space: normal; max-width: 100%; padding-left: 22px; padding-right: 22px; text-align: center; }
}
