:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-soft: #f0ecf7;
  --ink: #1f2330;
  --muted: #646b7a;
  --line: #dfe3ec;
  --primary: #7c3aed;
  --primary-dark: #6425d0;
  --primary-soft: #ede9fe;
  --primary-soft-2: #ddd6fe;
  --success: #138a4b;
  --danger: #c2410c;
  --shadow: 0 18px 45px rgba(31, 35, 48, .10);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #efe7ff, transparent 38%), var(--bg);
  color: var(--ink);
  line-height: 1.6;
}
a { color: inherit; }
.container { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(246,247,251,.84); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(223,227,236,.8); }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--primary); color: white; box-shadow: 0 8px 20px rgba(124,58,237,.25); }
.nav-links { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: .95rem; }
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--primary); }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 28px; align-items: center; padding: 70px 0 34px; }
.eyebrow { color: var(--primary); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 8px; }
h1, h2, h3 { line-height: 1.15; margin-top: 0; }
h1 { font-size: clamp(2rem, 4.6vw, 3.6rem); letter-spacing: -.05em; margin-bottom: 18px; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -.03em; }
.hero-title span { color: var(--primary); }
.hero-subtitle { font-size: 1.08rem; color: var(--muted); max-width: 780px; }
.hero-actions, .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.button { border: 0; border-radius: 999px; padding: 12px 18px; font-weight: 800; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: .2s transform, .2s box-shadow, .2s background; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--primary); color: white; box-shadow: 0 12px 24px rgba(124,58,237,.28); }
.button.primary:hover { background: var(--primary-dark); }
.button.secondary { background: #111827; color: white; }
.button.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.button.small { padding: 8px 12px; font-size: .9rem; }
.button:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.trust-row span, .stats span { padding: 7px 10px; border-radius: 999px; background: var(--primary-soft); color: #4c1d95; font-weight: 800; font-size: .84rem; }
.hero-card, .converter-panel, .mini-card, .preview-section, .content-section, .faq { background: rgba(255,255,255,.9); border: 1px solid rgba(223,227,236,.9); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.hero-card { padding: 18px; }
.hero-video-card { padding: 16px; }
.youtube-card { position: relative; border-radius: 18px; overflow: hidden; background: #111827; aspect-ratio: 16 / 9; display: grid; place-items: center; }
.youtube-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .86; }
.youtube-card iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.youtube-play { position: relative; z-index: 2; width: 72px; height: 72px; border-radius: 999px; border: 0; background: rgba(124,58,237,.96); color: #fff; font-size: 2rem; cursor: pointer; box-shadow: 0 16px 40px rgba(0,0,0,.35); padding-left: 5px; }
.youtube-play:hover { background: var(--primary-dark); }
.youtube-link { position: absolute; right: 14px; bottom: 12px; z-index: 2; color: #fff; background: rgba(17,24,39,.72); border: 1px solid rgba(255,255,255,.3); padding: 6px 10px; border-radius: 999px; text-decoration: none; font-size: .82rem; font-weight: 800; }
.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; padding: 28px 0; }
.converter-panel { padding: 24px; border: 4px solid var(--primary); }
.panel-heading, .preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.stats { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.privacy-note { padding: 13px 14px; border-radius: var(--radius-md); background: #ecfdf5; color: #065f46; border: 1px solid #bbf7d0; margin-bottom: 18px; }
.drop-zone { border: 2px dashed #b9c0cf; border-radius: var(--radius-lg); background: linear-gradient(180deg, #fff, #faf9ff); padding: 44px 22px; text-align: center; cursor: pointer; transition: .2s border-color, .2s background, .2s transform; }
.drop-zone:hover, .drop-zone.dragover, .drop-zone:focus-visible { border-color: var(--primary); background: var(--primary-soft); outline: none; transform: translateY(-1px); }
.drop-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 18px; background: var(--primary); color: white; font-size: 1.5rem; }
.drop-zone p { margin: 4px 0; }
.drop-zone small { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.status-message { min-height: 30px; margin: 14px 0; color: var(--muted); font-weight: 700; }
.status-message.success { color: var(--success); }
.status-message.error { color: var(--danger); }
.options-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 14px;
  margin-top: 16px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: transparent;
}
fieldset { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px; margin: 0; background: #fbfcff; min-width: 0; }
legend { font-weight: 900; padding: 0 6px; }
label { display: block; margin: 8px 0; color: var(--muted); cursor: pointer; }
input[type="checkbox"], input[type="radio"] { margin-right: 8px; accent-color: var(--primary); }
.file-list-wrap { margin-top: 18px; }
.file-list { display: grid; gap: 10px; max-height: 320px; overflow-y: auto; background: transparent; }
.file-item { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 16px; border: 0; border-radius: 14px; background: var(--primary-soft); cursor: pointer; text-align: left; }
.file-item:hover { background: #e7e1ff; }
.file-item.active { background: var(--primary-soft-2); color: #4c1d95; }
.file-left { min-width: 0; }
.file-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; text-align: left; }
.file-meta { display: block; font-size: .82rem; color: var(--muted); text-align: left; }
.file-status { font-weight: 900; text-align: right; white-space: nowrap; }
.file-error { color: var(--danger); font-weight: 900; }
.side-column { display: grid; gap: 18px; }
.mini-card { padding: 20px; }
.mini-card ul { padding-left: 18px; color: var(--muted); }
.ad-slot { min-height: 92px; border: 1px dashed #c6cad6; border-radius: var(--radius-md); display: grid; place-items: center; color: #8a90a0; background: rgba(255,255,255,.62); margin-top: 12px; margin-bottom: 12px; text-align: center; font-size: .82rem; }
.side-ad { min-height: 280px; margin: 0; }
.bottom-ad { margin-top: 34px; }
.preview-section, .content-section, .faq { padding: 24px; margin-top: 24px; margin-bottom: 24px; }
.preview-frame { width: 100%; min-height: 560px; background: white; border: 1px solid var(--line); border-radius: var(--radius-md); }
.raw-output { width: 100%; min-height: 420px; margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px; font-family: "SFMono-Regular", Consolas, monospace; font-size: .85rem; resize: vertical; }
.content-section ol { color: var(--muted); }
.faq details { background: #fbfcff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px 16px; margin: 12px 0; }
.faq summary { font-weight: 900; cursor: pointer; }
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); }
.footer-grid { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-grid a { margin-left: 16px; }
.legal-page { padding: 48px 0; }
.legal-card { background: white; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 28px; max-width: 900px; }
@media (max-width: 920px) {
  .hero, .tool-layout { grid-template-columns: 1fr; }
  .options-grid { grid-template-columns: 1fr; }
  .side-ad { min-height: 120px; }
}
@media (max-width: 620px) {
  .container { width: min(100% - 24px, 1180px); }
  .nav { align-items: flex-start; }
  .nav-links { justify-content: flex-end; }
  .panel-heading, .preview-toolbar { align-items: flex-start; flex-direction: column; }
  h1 { font-size: 2.15rem; }
  .converter-panel, .preview-section, .content-section, .faq { padding: 18px; border-radius: 18px; }
  .file-item { grid-template-columns: 1fr; }
  .file-status { text-align: left; }
}
@media print {
  .site-header,
  .hero,
  .ad-slot,
  .actions,
  .preview-toolbar,
  .content-section,
  .faq,
  .site-footer,
  .side-column,
  .options-grid,
  .drop-zone,
  .file-list-wrap,
  .status-message,
  .privacy-note,
  .panel-heading {
    display: none !important;
  }
  body { background: white; }
  .preview-section,
  .converter-panel,
  .tool-layout {
    box-shadow: none;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
  }
  .preview-frame { border: 0; min-height: 95vh; }
}
