* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0c0c14; --bg2: #11111c; --card: #1a1a28; --accent: #fe2c55;
  --accent2: #25f4ee; --purple: #8b5cf6; --text: #f1f1f6; --muted: #9a9ab0;
  --border: #2a2a3c; --radius: 16px;
}
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
.grad { background: linear-gradient(90deg, var(--accent2), var(--purple), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center;
  justify-content: space-between; padding: 14px 28px; backdrop-filter: blur(14px);
  background: rgba(12,12,20,.78); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 9px; font-size: 1.15rem; font-weight: 800; }
.logo { font-size: 1.3rem; color: var(--accent2); display: inline-flex; }
.brand-name b { color: var(--accent2); font-weight: 800; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: .92rem; }
.nav-links a { color: var(--muted); transition: .15s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { background: linear-gradient(90deg, var(--accent), var(--purple));
  color: #fff !important; padding: 8px 16px; border-radius: 20px; font-weight: 600; }
.nav-cta:hover { filter: brightness(1.12); }

/* ===== Hero ===== */
.hero { position: relative; padding: 56px 20px 40px;
  background: radial-gradient(900px 460px at 50% -8%, #2a1240 0%, transparent 60%); }
.hero-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.badges { display: flex; gap: 8px; justify-content: center; margin-bottom: 18px; flex-wrap: wrap; }
.badge { font-size: .76rem; font-weight: 700; padding: 5px 12px; border-radius: 20px; border: 1px solid var(--border); }
.badge.tiktok { background: #161616; color: #fff; border-color: #333; }
.badge.douyin { background: #1a0b14; color: #ff6b8a; border-color: #4a1f2e; }
.badge.nowm { background: #06231f; color: var(--accent2); border-color: #0c4a42; }
.badge.big { font-size: 1rem; padding: 8px 18px; }
.hero h1 { font-size: 2.5rem; line-height: 1.18; margin-bottom: 14px; letter-spacing: -.5px; }
.lead { color: var(--muted); font-size: 1.06rem; max-width: 560px; margin: 0 auto 28px; }

/* ===== Tool box ===== */
.box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: 0 18px 50px rgba(0,0,0,.45); text-align: left; }
textarea { width: 100%; min-height: 88px; resize: vertical; background: #0e0e18;
  border: 1px solid var(--border); border-radius: 11px; color: var(--text);
  padding: 13px 15px; font-size: .96rem; outline: none; font-family: inherit; }
textarea:focus { border-color: var(--accent); }
.row { display: flex; gap: 10px; margin-top: 12px; }
button { border: none; border-radius: 11px; cursor: pointer; font-size: 1rem;
  font-weight: 700; transition: .15s; color: #fff; }
.go { flex: 1; padding: 14px; background: linear-gradient(90deg, var(--accent), #ff5e7e); }
.go:hover { filter: brightness(1.1); } .go:disabled { opacity: .5; cursor: default; }
.clear { flex: 0 0 84px; background: #2a2a3c; }
.hint { color: var(--muted); font-size: .8rem; margin-top: 11px; }
kbd { background: #2a2a3c; border-radius: 5px; padding: 1px 6px; font-size: .75rem; border: 1px solid var(--border); }
.trust { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap;
  margin-top: 24px; color: var(--muted); font-size: .85rem; }

/* ===== Result ===== */
.result { margin-top: 22px; display: none; text-align: left; }
.card2 { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.media { width: 100%; background: #000; display: block; max-height: 480px; object-fit: contain; }
.meta { padding: 16px; }
.pbadge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 10px;
  border-radius: 14px; margin-bottom: 10px; }
.author { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.author img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.author b { font-size: .96rem; }
.desc { color: var(--muted); font-size: .9rem; margin-bottom: 14px; white-space: pre-wrap; }
.quality { margin-bottom: 12px; }
.qlabel { font-size: .8rem; color: var(--muted); margin-bottom: 8px; }
.qopts { display: flex; flex-wrap: wrap; gap: 8px; }
.qopt { flex: 1 1 auto; min-width: 110px; padding: 10px 12px; border-radius: 9px; cursor: pointer;
  background: #0e0e18; border: 1px solid var(--border); color: var(--text); font-weight: 600;
  font-size: .85rem; display: flex; flex-direction: column; gap: 2px; align-items: center; transition: .15s; }
.qopt small { color: var(--muted); font-weight: 400; font-size: .72rem; }
.qopt:hover { border-color: var(--accent2); }
.qopt.active { border-color: var(--accent); background: #2a1320; }
.qopt.active small { color: #ffb3c1; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dl { flex: 1; min-width: 200px; text-align: center; padding: 13px; border-radius: 11px;
  background: linear-gradient(90deg, var(--accent2), #4f8bff); color: #04222b; font-weight: 800; }
.dl.music { background: linear-gradient(90deg, #b18cff, #8b5cf6); color: #fff; flex: 0 1 auto; min-width: 160px; }
.dl:hover { filter: brightness(1.07); }
.imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 10px; padding: 16px; }
.imgs a { position: relative; border-radius: 10px; overflow: hidden; }
.imgs img { width: 100%; display: block; }
.imgs a span { position: absolute; bottom: 6px; right: 6px; background: rgba(0,0,0,.72);
  padding: 3px 9px; border-radius: 6px; font-size: .75rem; }
.err { display: none; margin-top: 18px; padding: 14px; border-radius: 11px; text-align: left;
  background: #3a1620; border: 1px solid #5a2030; color: #ff9eb0; font-size: .9rem; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid #fff;
  border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -3px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Promo ===== */
.promo { padding: 28px 20px; background: linear-gradient(90deg, #1c0f2e, #2a0f24); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.promo-inner { max-width: 900px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.promo h3 { font-size: 1.3rem; margin-bottom: 4px; }
.promo p { color: var(--muted); font-size: .92rem; }
.promo-btn { background: #fff; color: #1c0f2e; padding: 13px 24px; border-radius: 24px; font-weight: 800; white-space: nowrap; transition: .15s; }
.promo-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255,255,255,.15); }

/* ===== Sections ===== */
.section { padding: 60px 20px; max-width: 1040px; margin: 0 auto; }
.section.dark { max-width: none; background: var(--bg2); }
.section.dark > * { max-width: 1040px; margin-left: auto; margin-right: auto; }
.section h2 { text-align: center; font-size: 1.9rem; margin-bottom: 36px; letter-spacing: -.4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 16px; }
.feat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; transition: .18s; }
.feat:hover { transform: translateY(-4px); border-color: var(--purple); }
.feat .ic { font-size: 1.7rem; margin-bottom: 12px; width: 52px; height: 52px; display: grid; place-items: center;
  border-radius: 13px; background: linear-gradient(135deg, rgba(37,244,238,.16), rgba(139,92,246,.16));
  color: var(--accent2); border: 1px solid var(--border); }
.feat h4 { font-size: 1.06rem; margin-bottom: 6px; }
.feat p { color: var(--muted); font-size: .9rem; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 18px; }
.step { text-align: center; padding: 22px; }
.step .num { width: 48px; height: 48px; margin: 0 auto 14px; display: grid; place-items: center;
  border-radius: 50%; font-size: 1.3rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--purple)); }
.step h4 { margin-bottom: 6px; } .step p { color: var(--muted); font-size: .92rem; }
.plats { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.plat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 34px; text-align: center; }
.plat p { color: var(--muted); font-size: .85rem; margin-top: 12px; }
.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 4px 18px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; color: var(--accent2); font-size: 1.3rem; }
.faq details[open] summary::after { content: "−"; }
.faq p { color: var(--muted); font-size: .92rem; padding: 0 0 16px; }
.faq a { color: var(--accent2); }

/* ===== Footer ===== */
.footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 44px 20px 24px; }
.footer-inner { max-width: 1040px; margin: 0 auto; display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.ftext { color: var(--muted); font-size: .88rem; max-width: 360px; margin-top: 12px; }
.ftext a, .copy a { color: var(--accent2); }
.fcol { display: flex; flex-direction: column; gap: 8px; }
.fcol h5 { margin-bottom: 4px; font-size: .95rem; }
.fcol a { color: var(--muted); font-size: .9rem; transition: .15s; }
.fcol a:hover { color: var(--text); }
.copy { text-align: center; color: var(--muted); font-size: .82rem; margin-top: 30px;
  padding-top: 20px; border-top: 1px solid var(--border); }

/* ===== Nav active ===== */
.nav-links a.active { color: var(--accent2); }

/* ===== Eraser ===== */
.hero-inner.wide { max-width: 860px; }
.drop { border: 2px dashed var(--border); border-radius: var(--radius); background: var(--card);
  padding: 48px 20px; cursor: pointer; transition: .18s; }
.drop:hover, .drop.over { border-color: var(--accent2); background: #141426; }
.drop-ic { font-size: 2.6rem; color: var(--accent2); }
.drop-inner p { margin: 12px 0 4px; font-size: 1.05rem; }
.drop-sub { color: var(--muted); font-size: .85rem; }

.editor { text-align: left; }
.canvas-wrap { position: relative; display: inline-block; max-width: 100%; line-height: 0;
  border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.canvas-wrap canvas { max-width: 100%; height: auto; display: block; touch-action: none; }
.sel { position: absolute; border: 2px solid var(--accent); background: rgba(254,44,85,.14);
  box-shadow: 0 0 0 9999px rgba(0,0,0,.28); cursor: move; touch-action: none; }
.handle { position: absolute; width: 16px; height: 16px; background: #fff; border: 2px solid var(--accent);
  border-radius: 50%; }
.handle.tl { left: -9px; top: -9px; cursor: nwse-resize; }
.handle.tr { right: -9px; top: -9px; cursor: nesw-resize; }
.handle.bl { left: -9px; bottom: -9px; cursor: nesw-resize; }
.handle.br { right: -9px; bottom: -9px; cursor: nwse-resize; }

.tools { margin-top: 18px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; }
.tool-row { margin-bottom: 16px; }
.tool-row > label { display: block; font-size: .88rem; color: var(--muted); margin-bottom: 8px; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg-btn { flex: 1 1 auto; min-width: 160px; padding: 11px; border-radius: 10px; background: #0e0e18;
  border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: .88rem; cursor: pointer; transition: .15s; }
.seg-btn:hover { border-color: var(--accent2); }
.seg-btn.active { border-color: var(--accent); background: #2a1320; color: #fff; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.note { font-size: .82rem; color: var(--muted); background: #0e0e18; border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 16px; }
.note i { color: var(--accent2); }
.tool-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.tool-actions .go { flex: 1 1 auto; }
.tool-actions .clear { flex: 0 0 auto; padding: 14px 16px; }
.editor .dl { display: block; }

@media (max-width: 640px) {
  .hero h1 { font-size: 1.85rem; }
  .nav-links a:not(.nav-cta) { display: none; }
  .promo-inner { flex-direction: column; text-align: center; }
  .section { padding: 44px 18px; }
}
