:root {
  --bg: #0f1320;
  --panel: #171c2e;
  --panel-2: #1f2640;
  --accent: #5b8cff;
  --accent-2: #7c4dff;
  --text: #e8ecf5;
  --muted: #9aa3b8;
  --border: #2a3252;
  --ok: #34d399;
  --err: #f87171;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #1b2240 0%, transparent 60%), var(--bg);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(15, 19, 32, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10;
}
.brand { font-weight: 800; font-size: 1.25rem; color: var(--text); }
.brand span { color: var(--accent); }
.site-header nav a { margin-left: 22px; color: var(--muted); font-size: .95rem; }

main { max-width: 920px; margin: 0 auto; padding: 0 20px; }

.hero { text-align: center; padding: 56px 0 28px; }
.hero h1 {
  font-size: 2.6rem;
  margin: 0 0 14px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lede { color: var(--muted); max-width: 680px; margin: 0 auto; font-size: 1.05rem; }

.converter {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: 14px;
  background: var(--panel-2);
  padding: 42px 20px;
  text-align: center;
  transition: border-color .2s, background .2s;
  cursor: pointer;
}
.dropzone.dragover { border-color: var(--accent); background: #232b49; }
.dz-icon { width: 46px; height: 46px; color: var(--accent); }
.dz-title { font-size: 1.1rem; margin: 12px 0 16px; }
.dz-formats { color: var(--muted); font-size: .85rem; margin-top: 14px; }

.btn {
  border: none;
  border-radius: 10px;
  padding: 11px 22px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .05s, opacity .2s, background .2s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }

.file-list { list-style: none; padding: 0; margin: 18px 0 0; }
.file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: .9rem;
}
.file-list .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list .status { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.file-list .status.ok { color: var(--ok); }
.file-list .status.err { color: var(--err); }
.file-list .remove { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.1rem; }

.actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 18px; }
.privacy { color: var(--muted); font-size: .82rem; text-align: center; margin: 16px 0 0; }

.result-block { margin-top: 26px; }
.result-head { display: flex; align-items: center; justify-content: space-between; }
.result-head h2 { margin: 0; font-size: 1.2rem; }
.result {
  width: 100%;
  min-height: 220px;
  margin-top: 12px;
  resize: vertical;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9rem;
  line-height: 1.5;
}

.content { padding: 40px 0; border-top: 1px solid var(--border); margin-top: 40px; }
.content:first-of-type { border-top: none; }
.content h1 { font-size: 2rem; }
.content h2 { font-size: 1.5rem; }
.page-head { padding-top: 56px; }
.page-head h1 {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.content ol { padding-left: 20px; }
.content p { color: #c6cde0; }

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.guide-card {
  display: block;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  color: var(--text);
  transition: border-color .2s, transform .05s;
}
.guide-card:hover { border-color: var(--accent); text-decoration: none; }
.guide-card:active { transform: translateY(1px); }
.guide-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.guide-card p { color: var(--muted); font-size: .9rem; margin: 0 0 12px; }
.guide-card .guide-link { color: var(--accent); font-size: .85rem; font-weight: 600; }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  max-width: 920px;
  margin: 40px auto 0;
  padding: 30px 20px 50px;
  border-top: 1px solid var(--border);
}
.foot-col h3 { margin: 0 0 8px; color: var(--accent); }
.foot-col h4 { margin: 0 0 10px; color: var(--text); }
.foot-col a { display: block; color: var(--muted); margin-bottom: 6px; font-size: .9rem; }
.foot-col p { color: var(--muted); font-size: .85rem; max-width: 240px; }

@media (max-width: 640px) {
  .site-header nav { display: none; }
  .hero h1 { font-size: 2rem; }
}
