/* ===== 短视频去水印 · 复刻版样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --accent: #8b5cf6;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --text-sub: #6b7280;
  --border: #e5e7eb;
  --radius: 14px;
  --shadow: 0 4px 20px rgba(0,0,0,.06);
}
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
.container { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.pc-only { display: inline; }

/* ===== 顶栏 ===== */
.topbar { background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.brand-logo { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.brand-name { font-size: 18px; font-weight: 700; }
.topnav { display: flex; gap: 20px; }
.topnav a { text-decoration: none; color: var(--text-sub); font-size: 14px; }
.topnav a:hover { color: var(--primary); }

/* ===== Hero / 解析区 ===== */
.hero { padding: 48px 0 40px; text-align: center; }
.hero h1 { font-size: 30px; font-weight: 800; margin-bottom: 8px; }
.hero-sub { color: var(--text-sub); font-size: 15px; margin-bottom: 30px; }

.parse-box { max-width: 680px; margin: 0 auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.parse-box-inner { display: flex; gap: 10px; }
.parse-input-wrap { flex: 1; position: relative; }
.parse-input {
  width: 100%; padding: 14px 16px; font-size: 15px; border: 2px solid var(--border);
  border-radius: 10px; outline: none; transition: border-color .2s; background: #fafbfc;
}
.parse-input:focus { border-color: var(--primary); background: #fff; }
textarea.parse-input { min-height: 52px; resize: none; line-height: 1.5; font-family: inherit; }
.platform-tag {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: #eef2ff; color: var(--primary-dark); font-size: 12px; padding: 3px 10px;
  border-radius: 999px; display: none; font-weight: 600;
}
.platform-tag.show { display: inline-block; }
.url-clear {
  position: absolute; top: 8px; right: 10px; width: 24px; height: 24px;
  border: none; background: rgba(0,0,0,.06); color: #666; font-size: 16px; line-height: 1;
  border-radius: 50%; cursor: pointer; z-index: 3; display: none;
}
.url-clear.show { display: inline-block; }
.url-clear:active { background: rgba(0,0,0,.14); }
.btn-parse {
  padding: 14px 26px; font-size: 15px; font-weight: 700; color: #fff; border: none;
  border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--accent));
  cursor: pointer; white-space: nowrap; transition: opacity .2s;
}
.btn-parse:hover { opacity: .9; }
.btn-parse:disabled { opacity: .6; cursor: not-allowed; }
.parse-tips { margin-top: 12px; text-align: center; }
.tip { font-size: 12px; color: var(--text-sub); background: #f3f4f6; padding: 4px 12px; border-radius: 999px; }

/* ===== Loading ===== */
.parse-loading { max-width: 680px; margin: 24px auto 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px 24px; text-align: center; }
.spinner { width: 46px; height: 46px; margin: 0 auto 16px; border: 4px solid #e5e7eb; border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 16px; font-weight: 600; }
.loading-sub { color: var(--text-sub); font-size: 13px; margin-top: 6px; }

/* ===== 结果卡片 ===== */
.result-area { max-width: 680px; margin: 24px auto 0; text-align: left; }
.result-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.rc-cover { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; display: flex; align-items: center; justify-content: center; }
.rc-cover video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.rc-cover img { width: 100%; height: 100%; object-fit: contain; }
.rc-body { padding: 18px 20px; }
.rc-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.rc-desc { font-size: 13px; color: var(--text-sub); margin-bottom: 12px; }
.rc-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--text-sub); margin-bottom: 14px; }
.rc-meta .m { display: flex; align-items: center; gap: 4px; }
.rc-author { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.rc-avatar { width: 36px; height: 36px; border-radius: 50%; background: #e5e7eb; overflow: hidden; }
.rc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rc-author-name { font-size: 14px; font-weight: 600; }
.rc-author-id { font-size: 12px; color: var(--text-sub); }
.rc-quality { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.q-opt {
  padding: 8px 14px; font-size: 13px; border: 2px solid var(--border); border-radius: 8px;
  cursor: pointer; background: #fff; color: var(--text-sub); font-weight: 600; transition: all .15s;
}
.q-opt.active { border-color: var(--primary); color: var(--primary-dark); background: #eef2ff; }
.q-opt:hover { border-color: var(--primary); }
.rc-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-download {
  flex: 1; min-width: 160px; padding: 13px 20px; text-align: center; font-size: 15px; font-weight: 700;
  color: #fff; border: none; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--accent));
  cursor: pointer; text-decoration: none; display: inline-block;
}
.btn-download:hover { opacity: .9; }
.btn-copy {
  padding: 13px 20px; font-size: 15px; font-weight: 600; color: var(--primary-dark); border: 2px solid var(--primary);
  border-radius: 10px; background: #fff; cursor: pointer;
}
.btn-copy:hover { background: #eef2ff; }
.btn-reparse { padding: 13px 20px; font-size: 15px; font-weight: 600; color: var(--text-sub); border: 2px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer; }
.btn-reparse:hover { border-color: var(--text-sub); }

/* ===== 错误提示 ===== */
.error-tip { max-width: 680px; margin: 24px auto 0; background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: var(--radius); padding: 16px 20px; font-size: 14px; text-align: center; }

/* ===== 平台区 ===== */
.platforms { padding: 40px 0; }
.section-title { text-align: center; font-size: 24px; font-weight: 800; margin-bottom: 26px; }
.platform-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 680px; margin: 0 auto; }
.platform-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; text-align: center; }
.p-icon { width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: #fff; font-weight: 800; }
.p-icon.douyin { background: linear-gradient(135deg, #25f4ee, #fe2c55); }
.p-icon.xigua { background: linear-gradient(135deg, #ff5a00, #ff8a00); }
.p-icon.bili { background: linear-gradient(135deg, #fb7299, #00a1d6); }
.p-icon.kuaishou { background: linear-gradient(135deg, #ff4906, #ffe000); color: #333; }
.p-icon.xhs { background: linear-gradient(135deg, #ff2442, #ff4d4d); }
.p-icon.toutiao { background: linear-gradient(135deg, #f04142, #ff6b6b); }
.p-icon.wechat { background: linear-gradient(135deg, #07c160, #52d681); }
.p-icon.weishi { background: linear-gradient(135deg, #fa709a, #fee140); color:#333; }
.p-icon.pipixia { background: linear-gradient(135deg, #ff8a3d, #ffc53d); color:#333; }
.p-icon.huoshan { background: linear-gradient(135deg, #ff5e3a, #ff9a3d); }
.p-name { font-size: 16px; font-weight: 700; }
.p-desc { font-size: 12px; color: var(--text-sub); margin-top: 2px; }
.platform-note { text-align: center; color: var(--text-sub); font-size: 13px; margin-top: 20px; }

/* ===== 使用教程 ===== */
.howto { padding: 40px 0; background: var(--card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.howto-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 680px; margin: 0 auto; }
.step { text-align: center; }
.step-num { width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-size: 18px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.step-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.step-desc { font-size: 13px; color: var(--text-sub); }

/* ===== FAQ ===== */
.faq { padding: 40px 0; }
.faq-list { max-width: 680px; margin: 0 auto; }
.faq-item { background: var(--card); border-radius: 10px; box-shadow: var(--shadow); margin-bottom: 10px; overflow: hidden; }
.faq-q { padding: 14px 18px; font-weight: 600; font-size: 14px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-q::after { content: "+"; color: var(--primary); font-size: 18px; font-weight: 800; transition: transform .2s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { display: none; padding: 0 18px 14px; font-size: 13px; color: var(--text-sub); }
.faq-item.open .faq-a { display: block; }

/* ===== 页脚 ===== */
.footer { padding: 30px 0; text-align: center; color: var(--text-sub); font-size: 13px; }
.footer-note { margin-top: 4px; font-size: 12px; }
.footer-admin { color: var(--text-sub); text-decoration: none; border-bottom: 1px dashed var(--border); }
.footer-admin:hover { color: var(--primary); }
.footer-beian { margin-top: 8px; font-size: 12px; line-height: 1.7; }
.footer-beian a { color: var(--text-sub); text-decoration: none; }
.footer-beian a:hover { color: var(--primary); }
.footer-beian .beian-sep { margin: 0 6px; color: var(--border); }

/* ===== 历史记录 ===== */
.history { max-width: 680px; margin: 30px auto 0; text-align: left; }
.history-title { font-size: 16px; font-weight: 700; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.history-clear { font-size: 12px; color: var(--text-sub); cursor: pointer; background: none; border: none; }
.history-list { display: flex; flex-direction: column; gap: 8px; }
.h-item { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 10px; box-shadow: var(--shadow); padding: 10px 14px; cursor: pointer; }
.h-thumb { width: 60px; height: 40px; border-radius: 6px; background: #e5e7eb; overflow: hidden; flex-shrink: 0; }
.h-thumb img, .h-thumb video { width: 100%; height: 100%; object-fit: cover; }
.h-title { flex: 1; font-size: 13px; color: var(--text); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.h-platform { font-size: 12px; color: var(--primary-dark); background: #eef2ff; padding: 2px 8px; border-radius: 999px; font-weight: 600; }

/* ===== 响应式 ===== */
@media (max-width: 640px) {
  .pc-only { display: none; }
  .topnav { display: none; }
  .hero h1 { font-size: 24px; }
  .parse-box-inner { flex-direction: column; }
  .btn-parse { width: 100%; }
  .platform-grid { grid-template-columns: repeat(2, 1fr); }
  .howto-steps { grid-template-columns: 1fr; }
  .rc-actions { flex-direction: column; }
  .btn-download, .btn-copy, .btn-reparse { width: 100%; }
}

/* ===== 账户区 ===== */
.account { display: flex; align-items: center; gap: 8px; }
.btn-ghost { padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--primary-dark); border: 2px solid var(--primary); border-radius: 8px; background: #fff; cursor: pointer; white-space: nowrap; }
.btn-ghost:hover { background: #eef2ff; }
.ac-user { font-size: 13px; color: var(--text-sub); white-space: nowrap; }
.ac-user em { color: var(--primary-dark); font-style: normal; font-weight: 700; }
.ac-bonus { font-style: normal; color: #f59e0b; font-weight: 700; font-size: 12px; }

/* ===== 弹窗 ===== */
.modal-mask {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.5); z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.modal {
  width: 100%; max-width: 380px; margin: auto;
  max-height: 88vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: #fff; z-index: 2; }
.modal-title { font-size: 17px; font-weight: 700; }
.modal-x { width: 34px; height: 34px; font-size: 26px; color: var(--text-sub); background: none; border: none; cursor: pointer; line-height: 1; border-radius: 8px; }
.modal-x:active { background: #f3f4f6; }
.modal-body { padding: 20px; }
.acc-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.at { flex: 1; padding: 9px; font-size: 14px; font-weight: 600; border: 2px solid var(--border); border-radius: 8px; background: #fff; color: var(--text-sub); cursor: pointer; }
.at.active { border-color: var(--primary); color: var(--primary-dark); background: #eef2ff; }
.fld { margin-bottom: 14px; }
.fld label { display: block; font-size: 13px; color: var(--text-sub); margin-bottom: 5px; }
.fld input { width: 100%; padding: 11px 12px; font-size: 16px; border: 2px solid var(--border); border-radius: 8px; outline: none; }
.fld input:focus { border-color: var(--primary); }
.btn-primary { width: 100%; padding: 12px; font-size: 15px; font-weight: 700; color: #fff; border: none; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--accent)); cursor: pointer; }
.btn-primary:hover { opacity: .9; }
.btn-ghost.wide { width: 100%; padding: 12px; }
.acc-msg { font-size: 13px; color: #b91c1c; margin: 10px 0; min-height: 18px; }
.quota-tip { font-size: 14px; color: var(--text-sub); margin-bottom: 16px; line-height: 1.6; }
.quota-actions { display: flex; flex-direction: column; gap: 10px; }

/* ===== 滚动公告 ===== */
.announce-scroll { display: flex; align-items: center; gap: 8px; overflow: hidden; background: linear-gradient(90deg, #fff7ed, #fffbeb); border-bottom: 1px solid #fde68a; padding: 8px 16px; }
.as-icon { color: #f59e0b; font-size: 14px; flex-shrink: 0; }
.as-track { overflow: hidden; white-space: nowrap; flex: 1; }
.as-text { display: inline-block; color: #92400e; font-size: 14px; padding-left: 100%; animation: marquee 18s linear infinite; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* ===== 弹出公告 ===== */
.announce-popup-mask {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.55); z-index: 300;
  display: none; align-items: center; justify-content: center;
  padding: 16px; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.announce-popup { position: relative; width: 100%; max-width: 420px; margin: auto; max-height: 88vh; overflow-y: auto; -webkit-overflow-scrolling: touch; background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.3); padding: 26px 24px; }
.ap-close { position: sticky; float: right; top: 0; width: 34px; height: 34px; font-size: 26px; color: var(--text-sub); background: none; border: none; cursor: pointer; border-radius: 8px; }
.ap-close:active { background: #f3f4f6; }
.ap-title { font-size: 18px; font-weight: 800; text-align: center; margin-bottom: 14px; }
.ap-content { font-size: 14px; color: var(--text); line-height: 1.7; margin-bottom: 20px; }
.ap-ok { width: 100%; padding: 12px; font-size: 15px; font-weight: 700; color: #fff; border: none; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--accent)); cursor: pointer; }

/* ===== 手机端精调 ===== */
@media (max-width: 640px) {
  .container { padding: 0 12px; }
  .hero { padding: 28px 0 24px; }
  .hero h1 { font-size: 22px; }
  .parse-box { padding: 18px 14px; }
  .btn-ghost { padding: 9px 12px; font-size: 13px; min-height: 40px; }
  .ac-user { font-size: 12px; }
  .section-title { font-size: 20px; }
  .history { padding: 0 12px; }
  .announce-scroll { padding: 7px 10px; }
  .as-text { font-size: 13px; }
  .topbar-inner { height: 56px; }
  .brand-name { font-size: 16px; }
  .topbar .account { margin-left: auto; }
  .fld input { font-size: 16px; }
  .modal-head, .modal-body { padding-left: 16px; padding-right: 16px; }
  .announce-popup { padding: 22px 18px; padding-top: 40px; }
  .ap-close { top: 6px; right: 6px; }
}
