:root {
  --bg: #0f1117;
  --panel: #181b24;
  --panel-2: #20242f;
  --text: #e7e9ee;
  --muted: #9aa1ad;
  --accent: #6c8cff;
  --accent-2: #56e0c0;
  --error: #ff6b6b;
  --radius: 14px;
  --maxw: 760px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: var(--accent); }

.site-header {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; padding: 1rem 1.25rem; max-width: var(--maxw); margin: 0 auto;
}
.brand { font-weight: 700; font-size: 1.2rem; text-decoration: none; color: var(--text); }
nav a { margin-left: 1rem; text-decoration: none; color: var(--muted); }
nav a:hover { color: var(--text); }

main { max-width: var(--maxw); margin: 0 auto; padding: 1rem 1.25rem 4rem; }
.hero { text-align: center; padding: 1.5rem 0; }
h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin: .2rem 0; }
.lead { color: var(--muted); max-width: 38ch; margin: 0 auto; }

.converter { margin-top: 1.5rem; }
.tabs { display: flex; gap: .5rem; margin-bottom: 1rem; }
.tab {
  flex: 1; padding: .7rem; border: 1px solid var(--panel-2); background: var(--panel);
  color: var(--muted); border-radius: var(--radius); cursor: pointer; font-size: 1rem;
}
.tab.is-active { color: var(--text); border-color: var(--accent); background: var(--panel-2); }

.dropzone {
  border: 2px dashed var(--panel-2); border-radius: var(--radius);
  background: var(--panel); padding: 2.5rem 1rem; text-align: center;
  transition: border-color .15s, background .15s; cursor: pointer; outline: none;
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.drag {
  border-color: var(--accent); background: var(--panel-2);
}
.dz-icon { font-size: 2rem; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.link { background: none; border: none; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }

.bar { height: 10px; background: var(--panel-2); border-radius: 999px; overflow: hidden; margin: .75rem auto; max-width: 320px; }
.bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .3s; }

.error { color: var(--error); text-align: center; margin-top: 1rem; }

.result { margin-top: 1.5rem; text-align: center; }
.result #preview img, .result #preview video { max-width: 100%; border-radius: var(--radius); }
.actions { display: flex; gap: .75rem; justify-content: center; margin-top: 1rem; flex-wrap: wrap; }
.btn {
  padding: .7rem 1.2rem; border-radius: var(--radius); border: 1px solid var(--panel-2);
  background: var(--panel); color: var(--text); cursor: pointer; text-decoration: none; font-size: 1rem;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:hover { filter: brightness(1.1); }

section h2 { margin-top: 2.5rem; }
ol, article p { color: var(--muted); }
article h3 { margin-bottom: .25rem; color: var(--text); }

.site-footer { text-align: center; color: var(--muted); padding: 2rem 1rem; font-size: .9rem; }

@media (max-width: 520px) {
  .tabs { flex-direction: column; }
}
