/* Video Compressor — animated modern UI. Pure CSS, no external assets. */
:root {
  --bg: #0b0f1a;
  --surface: #121829;
  --surface-2: #1a2238;
  --ink: #eef2ff;
  --muted: #9aa7c7;
  --line: #26304d;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --good: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(124, 92, 255, .28), transparent 60%),
    radial-gradient(700px 420px at -10% 20%, rgba(34, 211, 238, .16), transparent 60%),
    var(--bg);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.site-header { padding: 56px 0 28px; text-align: center; animation: fade-up .6s ease both; }
.eyebrow { color: var(--accent-2); text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; margin: 0 0 10px; font-weight: 700; }
h1 { font-size: clamp(2rem, 5.4vw, 3.1rem); line-height: 1.08; margin: 0 0 14px; letter-spacing: -.02em; }
.grad { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { color: var(--muted); font-size: 1.08rem; max-width: 620px; margin: 0 auto; }
.lede strong { color: var(--ink); }

.tool-card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  animation: fade-up .6s .08s ease both;
}

.drop-zone {
  border: 2px dashed var(--line);
  border-radius: 12px;
  padding: 34px 20px 28px;
  text-align: center;
  cursor: pointer;
  transition: border-color .25s, background .25s, transform .25s;
  outline: none;
}
.drop-zone:hover, .drop-zone:focus-visible { border-color: var(--accent); background: rgba(124, 92, 255, .07); }
.drop-zone.drag-over {
  border-color: var(--accent-2);
  background: rgba(34, 211, 238, .09);
  transform: scale(1.015);
  animation: glow 1.2s ease-in-out infinite alternate;
}
@keyframes glow { from { box-shadow: 0 0 0 0 rgba(34, 211, 238, .0); } to { box-shadow: 0 0 32px 2px rgba(34, 211, 238, .28); } }
.drop-icon { width: 48px; height: 48px; color: var(--accent-2); animation: float 3s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.drop-title { font-size: 1.25rem; font-weight: 700; margin: 10px 0 4px; }
.drop-sub { color: var(--muted); margin: 0 0 18px; font-size: .95rem; }

.btn {
  font: inherit; font-weight: 700; border: 0; border-radius: 10px;
  padding: 11px 20px; cursor: pointer; transition: transform .15s, filter .15s, background .15s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.1); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(90deg, var(--accent), #5b8cff); color: #fff; box-shadow: 0 8px 24px rgba(124, 92, 255, .4); }
.btn-secondary { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }

.presets { border: 0; margin: 22px 0 0; padding: 0; }
.presets legend { font-weight: 700; margin-bottom: 10px; padding: 0; }
.preset-row { display: flex; flex-wrap: wrap; gap: 10px; }
.preset {
  font: inherit; font-weight: 600; padding: 10px 16px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--line);
  cursor: pointer; transition: all .2s;
}
.preset:hover { border-color: var(--accent); }
.preset.active {
  background: linear-gradient(90deg, var(--accent), #5b8cff);
  border-color: transparent; color: #fff;
  box-shadow: 0 6px 18px rgba(124, 92, 255, .35);
}
.custom-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.custom-row input[type="range"] { flex: 1; min-width: 180px; accent-color: var(--accent); }
.custom-row output { font-weight: 700; min-width: 64px; text-align: right; }
.target-summary { color: var(--muted); margin: 12px 0 0; font-size: .95rem; }

.core-status {
  margin: 18px 0 0; padding: 10px 14px; border-radius: 10px; font-size: .92rem;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
}
.core-status[data-state="loading"] { color: var(--warn); border-color: rgba(251, 191, 36, .4); }
.core-status[data-state="ready"] { color: var(--good); border-color: rgba(52, 211, 153, .4); }
.core-status[data-state="error"] { color: var(--bad); border-color: rgba(248, 113, 113, .4); }

.batch-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 18px; padding: 12px 4px 0; border-top: 1px solid var(--line);
}
.batch-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.file-list { display: grid; gap: 14px; margin-top: 18px; }
.file-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  animation: card-in .35s ease both;
}
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.file-card[data-status="done"] { border-color: rgba(52, 211, 153, .5); }
.file-card[data-status="error"] { border-color: rgba(248, 113, 113, .5); }
.fc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.fc-name { font-weight: 700; word-break: break-all; }
.fc-remove {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: 8px; width: 30px; height: 30px; font-size: 1.1rem; line-height: 1;
  cursor: pointer; flex-shrink: 0;
}
.fc-remove:hover { color: var(--bad); border-color: var(--bad); }
.fc-meta { color: var(--muted); font-size: .92rem; margin-top: 4px; }
.fc-stage { font-size: .92rem; margin-top: 10px; min-height: 1.4em; }
.fc-stage[data-stage="done"] { color: var(--good); font-weight: 600; }
.fc-stage[data-stage="error"] { color: var(--bad); font-weight: 600; }
.progress-track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 8px; }
.progress-fill {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .3s ease;
}
.file-card[data-status="done"] .progress-fill { background: var(--good); }
.fc-result { margin-top: 10px; font-weight: 600; }
.fc-warn { margin-top: 6px; color: var(--warn); font-size: .92rem; }
.file-card[data-status="error"] .fc-warn { color: var(--bad); }
.fc-actions { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.fc-actions a { text-decoration: none; display: inline-block; }

.privacy-panel, .limits, .guide, .faq {
  margin-top: 28px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px;
  animation: fade-up .6s .15s ease both;
}
.privacy-panel h2, .limits h2, .guide h2, .faq h2 { margin: 0 0 10px; font-size: 1.25rem; }
.privacy-panel p, .limits li, .guide p, .faq p { color: var(--muted); }
.privacy-panel strong, .limits strong { color: var(--ink); }
.privacy-panel details { margin-top: 12px; }
.privacy-panel summary, .faq summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.privacy-panel ol { color: var(--muted); }
.privacy-panel kbd { background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: .85em; }
.privacy-ok { color: var(--good); font-weight: 700; }
.fineprint { font-size: .9rem; }
.limits ul { margin: 0; padding-left: 20px; }
.limits li { margin-bottom: 8px; }
.guide-toggle {
  font: inherit; font-weight: 700; font-size: 1.15rem; text-align: left;
  background: none; border: 0; color: var(--ink); cursor: pointer; padding: 0; width: 100%;
}
.guide-toggle::after { content: " \25be"; color: var(--accent-2); }
.guide h3 { margin: 18px 0 6px; }
.guide ul { color: var(--muted); }
.faq details { border-top: 1px solid var(--line); padding: 12px 0; }
.faq details:first-of-type { border-top: 0; }
.faq summary { list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: " +"; color: var(--accent-2); }
.faq details[open ] summary::after { content: " \2212"; }

.site-footer { padding: 28px 0 40px; color: var(--muted); font-size: .9rem; text-align: center; }
.site-footer a { color: var(--accent-2); }

@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 600px) {
  .tool-card, .privacy-panel, .limits, .guide, .faq { padding: 18px 16px; }
  .site-header { padding: 36px 0 22px; }
  .batch-bar { flex-direction: column; align-items: stretch; }
  .batch-actions { justify-content: stretch; }
  .batch-actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
