/* ---------- base ---------- */
:root {
  --bg: #0d0f14;
  --bg-soft: #141821;
  --card: #171b25;
  --card-2: #1d2230;
  --line: #262c3a;
  --text: #e8ecf3;
  --muted: #98a1b3;
  --accent: #5b8cff;
  --accent-2: #7c5cff;
  --ok: #3ddc97;
  --ng: #ff6b6b;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP",
               "Yu Gothic UI", Meiryo, sans-serif;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(60rem 40rem at 15% -10%, rgba(91,140,255,.16), transparent 60%),
    radial-gradient(50rem 35rem at 90% 0%, rgba(124,92,255,.13), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

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

.wrap {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

/* ---------- header / footer ---------- */
.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 20px;
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  position: relative; flex: none;
}
.logo-mark::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 0; height: 0; transform: translate(-50%, -60%);
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 8px solid #fff;
}
.logo-text { font-size: 16px; letter-spacing: .02em; }
.site-nav { display: flex; gap: 18px; font-size: 14px; }
.site-nav a { color: var(--muted); }

.site-footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--line);
  margin-top: 40px; padding: 24px 20px 48px;
  text-align: center; font-size: 13px; color: var(--muted);
}
.site-footer p { margin: 4px 0; }
.site-footer .muted { font-size: 12px; opacity: .75; }

/* ---------- hero / form ---------- */
.hero { text-align: center; padding: 28px 0 8px; }
.hero h1 {
  font-size: clamp(28px, 6vw, 44px);
  line-height: 1.25; margin: 0 0 12px; letter-spacing: -.01em;
}
.lead { color: var(--muted); margin: 0 0 28px; font-size: 15px; }

.url-form { display: grid; gap: 12px; max-width: 620px; margin: 0 auto; }
.url-field { position: relative; display: flex; }
.url-field input {
  flex: 1; width: 100%;
  padding: 16px 92px 16px 18px;
  font-size: 16px;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.url-field input::placeholder { color: #6d7689; }
.url-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91,140,255,.18);
}
.paste-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  padding: 8px 12px; font-size: 13px;
  color: var(--muted); background: var(--card-2);
  border: 1px solid var(--line); border-radius: 9px; cursor: pointer;
}
.paste-btn:hover { color: var(--text); border-color: #39415a; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; font-size: 15px; font-weight: 600;
  border: 1px solid transparent; border-radius: var(--radius);
  cursor: pointer; text-decoration: none;
  transition: transform .12s, filter .15s, background .15s;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 16px 24px; font-size: 16px; width: 100%; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--muted);
  border-color: var(--line); margin-top: 12px;
}
.btn[disabled] { opacity: .6; cursor: progress; }

.hint { color: var(--muted); font-size: 13px; margin-top: 16px; }

.alert {
  max-width: 620px; margin: 0 auto 20px;
  padding: 12px 16px; font-size: 14px; text-align: left;
  color: #ffd9d9; background: rgba(255,107,107,.11);
  border: 1px solid rgba(255,107,107,.35); border-radius: 12px;
}

/* ---------- steps / features ---------- */
.steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; margin-top: 56px;
}
.step {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}
.step-no {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  margin-bottom: 10px;
}
.step h3 { margin: 0 0 6px; font-size: 15px; }
.step p { margin: 0; font-size: 13px; color: var(--muted); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.feature { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.feature h4 { margin: 0 0 4px; font-size: 14px; }
.feature p { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 20px; margin-bottom: 24px;
}
.back-link { display: inline-block; margin-bottom: 16px; color: var(--muted); font-size: 14px; }

.video-card { display: flex; gap: 18px; align-items: flex-start; }
.thumb { position: relative; flex: none; width: 240px; border-radius: 12px; overflow: hidden; background: #000; }
.thumb img { display: block; width: 100%; height: auto; }
.thumb .dur {
  position: absolute; right: 8px; bottom: 8px;
  padding: 2px 7px; font-size: 12px; border-radius: 6px;
  background: rgba(0,0,0,.75); color: #fff;
}
.thumb-sm { width: 200px; margin: 0 auto 18px; }

.video-title { font-size: 19px; margin: 0 0 8px; line-height: 1.45; word-break: break-word; }
.video-sub { margin: 0; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  padding: 2px 9px; font-size: 12px; border-radius: 999px;
  background: var(--card-2); border: 1px solid var(--line); color: var(--muted);
}

.section-title { font-size: 15px; color: var(--muted); margin: 0 0 12px; font-weight: 600; }

/* ---------- presets ---------- */
.preset-grid { display: grid; gap: 10px; }
.preset {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 16px 18px; text-align: left;
  background: var(--card); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; transition: border-color .15s, background .15s, transform .12s;
  font-family: inherit;
}
.preset:hover { border-color: var(--accent); background: var(--card-2); }
.preset:active { transform: translateY(1px); }
.preset-best { border-color: rgba(91,140,255,.5); background: linear-gradient(180deg, rgba(91,140,255,.09), transparent); }
.preset-direct { border-style: dashed; }
.preset-direct:hover { border-color: var(--ok); border-style: solid; }
.preset-direct .preset-icon { color: var(--ok); font-size: 13px; }
.preset-split .preset-icon { color: var(--muted); }
.preset-audio .preset-icon { font-size: 17px; }

.sub-title { font-size: 13px; color: var(--muted); font-weight: 600; margin: 22px 0 10px; }

.badge-mute {
  display: inline-block; margin-left: 8px; padding: 1px 7px;
  font-size: 11px; font-weight: 500; border-radius: 999px;
  color: #ffcf8f; background: rgba(255,176,60,.12);
  border: 1px solid rgba(255,176,60,.32); vertical-align: 1px;
}

.callout {
  margin-top: 14px; padding: 14px 16px;
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 10px; background: var(--card-2);
}
.callout strong { font-size: 13.5px; }
.callout p { margin: 6px 0 0; font-size: 13px; color: #c7cedb; }
.callout .muted { color: var(--muted); font-size: 12.5px; }
.preset-icon {
  flex: none; width: 42px; height: 42px; border-radius: 11px;
  display: grid; place-items: center; font-size: 14px; font-weight: 700;
  background: var(--card-2); border: 1px solid var(--line); color: var(--accent);
}
.preset-body { flex: 1; display: grid; }
.preset-label { font-size: 15px; font-weight: 600; }
.preset-desc { font-size: 12.5px; color: var(--muted); }
.preset-go { color: var(--muted); font-size: 18px; }

.note { font-size: 12.5px; color: var(--muted); margin-top: 16px; }

/* ---------- status ---------- */
.status-card { text-align: center; }
.status-title { font-size: 18px; margin: 0 0 8px; word-break: break-word; }
.status-card .video-sub { justify-content: center; margin-bottom: 18px; }
.status-text { font-size: 15px; }
.status-text.ok { color: var(--ok); }
.status-text.ng { color: var(--ng); }

.progress {
  height: 10px; border-radius: 999px; overflow: hidden;
  background: var(--card-2); border: 1px solid var(--line); margin: 6px 0 10px;
}
.progress-bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .4s ease;
}
.progress-bar.indeterminate {
  width: 35% !important;
  animation: slide 1.3s ease-in-out infinite;
}
@keyframes slide {
  0% { margin-left: -35%; }
  100% { margin-left: 100%; }
}
.progress-meta {
  display: flex; justify-content: space-between;
  font-size: 13px; color: var(--muted);
}
.progress-detail { font-size: 12.5px; color: var(--muted); margin-top: 6px; min-height: 1.2em; }
.filemeta { font-size: 13px; color: var(--muted); margin: 10px 0 0; }

/* ---------- terms ---------- */
.prose h1 { font-size: 22px; margin-top: 0; }
.prose h2 { font-size: 16px; margin-top: 28px; }
.prose p, .prose li { font-size: 14px; color: #c7cedb; }
.prose ul { padding-left: 1.2em; }

/* ---------- responsive ---------- */
@media (max-width: 700px) {
  .steps, .features { grid-template-columns: 1fr; }
  .video-card { flex-direction: column; }
  .thumb { width: 100%; }
  .thumb-sm { width: 100%; }
  .wrap { padding: 20px 16px 48px; }
}
