/* ============================================================
   星声发布台 · Fan Publish Hub  — 深色玻璃拟态设计系统
   ============================================================ */
:root {
  --bg: #0a0a18;
  --bg-2: #12122a;
  --card: rgba(255, 255, 255, .055);
  --card-hover: rgba(255, 255, 255, .085);
  --card-strong: rgba(255, 255, 255, .09);
  --border: rgba(255, 255, 255, .10);
  --border-strong: rgba(255, 255, 255, .18);
  --text: #f4f4fb;
  --text-2: #b8b8d2;
  --text-3: #8383a6;
  --grad: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  --grad-soft: linear-gradient(135deg, rgba(139, 92, 246, .18), rgba(236, 72, 153, .18));
  --violet: #8b5cf6;
  --pink: #ec4899;
  --cyan: #22d3ee;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --radius: 18px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .65);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }
::selection { background: rgba(236, 72, 153, .35); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .25); }
::-webkit-scrollbar-track { background: transparent; }
[hidden] { display: none !important; }

/* ---------------- 背景特效 ---------------- */
.fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; will-change: transform; }
.b1 { width: 520px; height: 520px; top: -180px; left: -120px; background: radial-gradient(circle, #7c3aed, transparent 70%); animation: drift 22s ease-in-out infinite alternate; }
.b2 { width: 460px; height: 460px; bottom: -160px; right: -120px; background: radial-gradient(circle, #ec4899, transparent 70%); animation: drift 26s ease-in-out infinite alternate-reverse; }
.b3 { width: 380px; height: 380px; top: 40%; left: 55%; background: radial-gradient(circle, #0ea5e9, transparent 70%); opacity: .35; animation: drift 30s ease-in-out infinite alternate; }
.noise { position: absolute; inset: 0; opacity: .035; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(60px, -40px, 0) scale(1.12); } }

/* ---------------- 布局 ---------------- */
.layout { position: relative; z-index: 1; display: grid; grid-template-columns: 264px minmax(0, 1fr); max-width: 1480px; margin: 0 auto; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  padding: 28px 20px 22px; display: flex; flex-direction: column; gap: 26px;
  border-right: 1px solid var(--border);
  background: rgba(10, 10, 24, .5); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  z-index: 10;
}
.main { padding: 34px 38px 80px; min-width: 0; }

/* ---------------- 品牌 ---------------- */
.brand { display: flex; align-items: center; gap: 12px; padding: 0 6px; }
.brand-logo {
  width: 44px; height: 44px; border-radius: 14px; flex: none;
  display: grid; place-items: center;
  font-size: 24px; font-weight: 800; color: #fff;
  background: var(--grad);
  box-shadow: 0 10px 26px -8px rgba(236, 72, 153, .6), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.brand-text { min-width: 0; }
.brand-name { font-size: 17px; font-weight: 800; letter-spacing: .5px; }
.brand-sub { font-size: 9px; letter-spacing: 2.4px; color: var(--text-3); text-transform: uppercase; margin-top: 1px; }

/* ---------------- 导航 ---------------- */
.nav { display: flex; flex-direction: column; gap: 6px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 14px; border-radius: 13px;
  color: var(--text-2); font-size: 14.5px; font-weight: 600;
  transition: all .22s ease; position: relative;
  border: 1px solid transparent;
}
.nav-item svg { flex: none; opacity: .85; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: var(--text); transform: translateX(3px); }
.nav-item.active {
  background: var(--grad-soft); color: #fff;
  border-color: rgba(255, 255, 255, .12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.nav-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px;
  display: grid; place-items: center;
  border-radius: 99px; background: var(--grad); color: #fff;
  font-size: 11px; font-weight: 800;
}

/* ---------------- 侧栏卡片 ---------------- */
.side-card {
  margin-top: auto;
  padding: 16px; border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(139, 92, 246, .18), rgba(236, 72, 153, .12));
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.side-card-title { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.side-stat { display: flex; align-items: baseline; gap: 8px; }
.side-stat b { font-size: 26px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.side-stat span { font-size: 12px; color: var(--text-2); }
.side-mini-row { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12px; color: var(--text-2); }
.side-mini-row b { color: #fff; }
.side-progress { margin-top: 12px; }
.side-progress .bar { height: 6px; }
.side-progress > span { display: block; margin-top: 6px; font-size: 11px; color: var(--text-3); }

.side-user { display: flex; align-items: center; gap: 12px; padding: 12px 6px 0; border-top: 1px solid var(--border); }
.side-user-text { min-width: 0; }
.user-name { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-sub { font-size: 11px; color: var(--text-3); }
.avatar {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  display: grid; place-items: center; font-size: 16px; font-weight: 700; color: #fff;
  background: var(--grad); box-shadow: 0 8px 20px -8px rgba(139, 92, 246, .7);
}
.avatar-lg { width: 42px; height: 42px; font-size: 17px; }

/* ---------------- 页头 ---------------- */
.page-head { margin-bottom: 26px; }
.page-title { font-size: 27px; font-weight: 800; letter-spacing: .5px; }
.page-sub { margin-top: 4px; color: var(--text-2); font-size: 14px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------------- 面板 / 区块 ---------------- */
.panel {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.section { margin-top: 34px; }
.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.section-head h2 { font-size: 17px; font-weight: 800; }
.section-head .muted { font-size: 12.5px; color: var(--text-3); }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.panel-head h3 { font-size: 15px; font-weight: 700; }
.panel-title { font-size: 15px; font-weight: 700; padding: 16px 18px 4px; }
.muted { color: var(--text-3); }
.small { font-size: 12px; }
.hidden { display: none !important; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; border-radius: 12px;
  font-size: 14px; font-weight: 700; letter-spacing: .3px;
  border: 1px solid transparent; white-space: nowrap;
  transition: all .2s ease; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 12px 30px -12px rgba(236, 72, 153, .7); }
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(236, 72, 153, .8); }
.btn-ghost { background: rgba(255, 255, 255, .05); border-color: var(--border); color: var(--text-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); color: var(--text); }
.btn-soft { background: rgba(139, 92, 246, .16); color: #c4b5fd; }
.btn-soft:hover { background: rgba(139, 92, 246, .28); color: #fff; }
.btn-danger-soft { background: rgba(248, 113, 113, .12); color: #fca5a5; }
.btn-danger-soft:hover { background: rgba(248, 113, 113, .24); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 10px; }
.btn-lg { padding: 12px 22px; font-size: 15px; border-radius: 13px; }

/* ---------------- 输入控件 ---------------- */
.input, .textarea, select.input {
  width: 100%; padding: 11px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--border);
  color: var(--text); font-size: 14px; outline: none;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.input:focus, .textarea:focus {
  border-color: rgba(139, 92, 246, .7); background: rgba(255, 255, 255, .08);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .18);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input-lg { font-size: 16px; font-weight: 700; padding: 13px 16px; }
.textarea { resize: vertical; min-height: 140px; line-height: 1.7; }
.textarea.sm { min-height: 84px; }
select.input { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238383a6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.field > span { font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------------- 标签 / 徽章 / 芯片 ---------------- */
.status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 700;
  background: rgba(255, 255, 255, .07); color: var(--text-2);
  border: 1px solid var(--border);
}
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill.ok { background: rgba(52, 211, 153, .12); color: var(--green); border-color: rgba(52, 211, 153, .25); }
.status-pill.warn { background: rgba(251, 191, 36, .12); color: var(--amber); border-color: rgba(251, 191, 36, .25); }
.status-pill.danger { background: rgba(248, 113, 113, .12); color: var(--red); border-color: rgba(248, 113, 113, .25); }
.chip {
  padding: 7px 14px; border-radius: 99px; font-size: 12.5px; font-weight: 600;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--border); color: var(--text-2);
  transition: all .2s ease; white-space: nowrap;
}
.chip:hover { background: var(--grad-soft); color: #fff; border-color: rgba(255, 255, 255, .2); transform: translateY(-2px); }
.chip.on { background: var(--grad); color: #fff; border-color: transparent; }
.mini-tag { display: inline-block; padding: 2px 9px; border-radius: 8px; font-size: 11px; font-weight: 600; background: rgba(139, 92, 246, .16); color: #c4b5fd; }
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 8px; font-size: 12px; font-weight: 600;
  background: rgba(139, 92, 246, .18); color: #d8ccff;
}
.tag b { cursor: pointer; font-size: 13px; opacity: .75; padding: 0 2px; }
.tag b:hover { opacity: 1; color: #fff; }
.hash { color: #7dd3fc; font-weight: 600; margin-right: 6px; }

/* ---------------- 筛选标签 ---------------- */
.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.ftab {
  padding: 8px 16px; border-radius: 99px; font-size: 13px; font-weight: 700;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--border); color: var(--text-2);
  transition: all .2s ease;
}
.ftab:hover { color: var(--text); }
.ftab.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 22px -10px rgba(236, 72, 153, .7); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative; overflow: hidden;
  padding: 34px 34px 30px; border-radius: 24px;
  background: linear-gradient(140deg, rgba(124, 58, 237, .28), rgba(236, 72, 153, .18) 55%, rgba(14, 165, 233, .14));
  border: 1px solid var(--border-strong);
  display: flex; justify-content: space-between; gap: 24px; align-items: center;
  backdrop-filter: blur(16px);
}
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(600px 200px at 80% 0%, rgba(255, 255, 255, .08), transparent 60%); }
.hero-copy { position: relative; z-index: 1; }
.hero-copy h1 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 900; letter-spacing: .5px; }
.hero-copy p { margin-top: 8px; color: var(--text-2); font-size: 14.5px; max-width: 520px; }
.hero-stats { display: flex; gap: 34px; margin-top: 24px; }
.stat-mini b { display: block; font-size: 24px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-mini span { font-size: 12px; color: var(--text-3); }
.hero-art { position: relative; z-index: 1; flex: none; font-size: 88px; line-height: 1; filter: drop-shadow(0 20px 40px rgba(236, 72, 153, .35)); animation: float 5s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-12px) rotate(4deg); } }

/* ---------------- 账号页 ---------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.platform-card { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.platform-card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--card-hover); }
.platform-card.is-bound { border-color: rgba(139, 92, 246, .35); }
.plat-top { display: flex; align-items: center; gap: 12px; }
.plat-badge {
  width: 46px; height: 46px; border-radius: 14px; flex: none;
  display: grid; place-items: center; font-size: 19px; font-weight: 800; color: #fff;
  background: var(--g, var(--grad));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 10px 22px -10px rgba(0, 0, 0, .6);
}
.plat-badge.sm { width: 34px; height: 34px; border-radius: 10px; font-size: 14px; }
.plat-info { min-width: 0; flex: 1; }
.plat-name { font-size: 15px; font-weight: 800; }
.plat-tag { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plat-mid { flex: 1; }
.acc-ident { display: flex; align-items: center; gap: 12px; }
.acc-avatar { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; font-size: 16px; font-weight: 800; color: #fff; background: var(--g, var(--grad)); }
.acc-name { font-size: 13.5px; font-weight: 700; }
.acc-time { font-size: 11.5px; color: var(--text-3); }
.acc-empty { font-size: 12.5px; color: var(--text-3); padding: 14px 0; }
.plat-actions { display: flex; gap: 10px; }
.plat-actions .btn { flex: 1; }
.tips { display: grid; gap: 12px; }
.tip { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.tip .tip-ic { flex: none; }

/* ---------------- 编辑器 ---------------- */
.editor-layout { display: grid; grid-template-columns: 235px minmax(0, 1fr) 318px; gap: 18px; align-items: start; }
.drafts-panel { position: sticky; top: 24px; overflow: hidden; }
.draft-list { max-height: 62vh; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.draft-item { position: relative; padding: 12px 14px; border-radius: 13px; background: rgba(255, 255, 255, .04); border: 1px solid var(--border); cursor: pointer; transition: all .2s ease; }
.draft-item:hover { background: rgba(255, 255, 255, .08); }
.draft-item.active { background: var(--grad-soft); border-color: rgba(139, 92, 246, .5); }
.draft-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.draft-title { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.draft-type { font-size: 10.5px; color: var(--text-3); border: 1px solid var(--border); padding: 1px 7px; border-radius: 99px; flex: none; }
.draft-item-meta { margin-top: 5px; font-size: 11px; color: var(--text-3); display: flex; justify-content: space-between; }
.draft-del { position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 6px; background: rgba(248, 113, 113, .15); color: var(--red); font-size: 13px; line-height: 1; display: none; place-items: center; }
.draft-item:hover .draft-del { display: grid; }
.draft-del:hover { background: rgba(248, 113, 113, .35); color: #fff; }
.empty { padding: 24px 14px; text-align: center; font-size: 12.5px; color: var(--text-3); }
.empty-card { padding: 40px 20px; text-align: center; font-size: 13px; color: var(--text-3); border: 1px dashed var(--border-strong); border-radius: var(--radius); background: rgba(255, 255, 255, .02); }

.editor-panel { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.editor-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid var(--border); align-self: flex-start; }
.ed-tab { padding: 7px 18px; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--text-2); transition: all .2s ease; }
.ed-tab.active { background: var(--grad); color: #fff; box-shadow: 0 6px 16px -8px rgba(236, 72, 153, .7); }
.tpl-label { font-size: 12px; font-weight: 700; color: var(--text-2); margin-bottom: -8px; }
.tpl-row { display: flex; gap: 8px; flex-wrap: wrap; }

.media-zone { }
.media-empty {
  width: 100%; padding: 26px 16px; border-radius: 14px;
  border: 1.5px dashed var(--border-strong);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--text-2); background: rgba(255, 255, 255, .02);
  transition: all .2s ease;
}
.media-empty:hover { border-color: rgba(139, 92, 246, .6); background: rgba(139, 92, 246, .06); }
.media-preview { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.media-preview img { width: 100%; max-height: 260px; object-fit: cover; display: block; }
.media-preview video { width: 100%; max-height: 260px; display: block; }
.media-remove { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 10px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 18px; line-height: 1; display: grid; place-items: center; }
.media-name { padding: 8px 12px; font-size: 12px; color: var(--text-2); background: rgba(0, 0, 0, .35); }

.textarea-wrap { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, .04); }
.textarea-wrap .textarea { border: none; border-radius: 0; background: transparent; box-shadow: none; min-height: 150px; }
.textarea-wrap .textarea:focus { box-shadow: none; }
.char-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--border); }
.tag-line { display: flex; flex-wrap: wrap; gap: 6px; }
.char-count { font-size: 12px; color: var(--text-3); flex: none; font-weight: 600; }
.char-count.over { color: var(--red); }

.tag-input-row { display: flex; gap: 10px; }
.tag-input-row .input { flex: 1; }

.schedule-box { border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 12px; background: rgba(255, 255, 255, .03); }
.schedule-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; font-weight: 700; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: rgba(255, 255, 255, .06); border: 1px solid var(--border); }
.seg-btn { padding: 6px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 700; color: var(--text-2); transition: all .2s ease; }
.seg-btn.active { background: var(--grad); color: #fff; }
.datetime-row { display: grid; grid-template-columns: 1fr; }
.datetime-row input { color-scheme: dark; }

.publish-panel { position: sticky; top: 24px; padding-bottom: 18px; }
.plat-check-list { display: flex; flex-direction: column; gap: 10px; padding: 12px 18px; }
.plat-check {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--border); background: rgba(255, 255, 255, .04);
  transition: all .2s ease; text-align: left;
}
.plat-check:hover { border-color: var(--border-strong); }
.plat-check.on { border-color: rgba(139, 92, 246, .5); background: rgba(139, 92, 246, .10); }
.plat-check-info { flex: 1; min-width: 0; }
.plat-limit { font-size: 11.5px; color: var(--text-3); }
.plat-limit.over { color: var(--red); font-weight: 700; }
.switch { width: 40px; height: 22px; border-radius: 99px; background: rgba(255, 255, 255, .12); position: relative; transition: background .2s ease; flex: none; }
.switch i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .2s ease; }
.switch.on { background: var(--grad); }
.switch.on i { left: 21px; }

.preview-box { margin: 6px 18px 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.preview-head { display: flex; justify-content: space-between; padding: 10px 14px; font-size: 12.5px; font-weight: 700; border-bottom: 1px solid var(--border); }
.preview-card { padding: 14px; background: rgba(255, 255, 255, .03); }
.pv-user { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.pv-name { font-size: 13px; font-weight: 700; }
.pv-time { font-size: 11px; color: var(--text-3); }
.pv-text { font-size: 13.5px; line-height: 1.75; word-break: break-word; }
.pv-media { margin-top: 10px; padding: 10px; border-radius: 10px; background: rgba(255, 255, 255, .05); font-size: 12px; color: var(--text-2); }
.pv-tags { margin-top: 8px; }

.editor-actions { display: flex; gap: 12px; padding: 14px 18px 0; }
.editor-actions .btn { flex: 1; }
.publish-note { padding: 0 18px; font-size: 11.5px; color: var(--text-3); text-align: center; margin-top: 8px; }

/* ---------------- 任务页 ---------------- */
.task-head-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.task-card { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.task-card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--card-hover); }
.task-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.task-title { font-size: 15.5px; font-weight: 800; line-height: 1.4; }
.task-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.task-target { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 8px; background: rgba(34, 211, 238, .14); color: #67e8f9; }
.task-type { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 8px; background: rgba(255, 255, 255, .07); color: var(--text-2); }
.task-bounty { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 8px; background: rgba(251, 191, 36, .14); color: #fcd34d; }
.task-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.task-desc { font-size: 13px; color: var(--text-2); }
.progress-row { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-2); }
.progress-row > span:first-child { flex: none; }
.progress-row > span:last-child { flex: none; font-weight: 700; color: var(--text); }
.bar { flex: 1; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--grad); transition: width .6s cubic-bezier(.22, 1, .36, 1); }
.task-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--border); padding-top: 12px; flex-wrap: wrap; }
.task-nums { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--text-3); }

/* ---------------- 记录页 ---------------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { padding: 18px 20px; display: flex; align-items: center; gap: 14px; }
.stat-card:hover { transform: translateY(-3px); }
.stat-icon { width: 46px; height: 46px; border-radius: 14px; flex: none; display: grid; place-items: center; font-size: 22px; background: var(--g, var(--grad)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.stat-num { font-size: 23px; font-weight: 800; line-height: 1.2; }
.stat-label { font-size: 12px; color: var(--text-3); }

.timeline { position: relative; margin-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.record-card { padding: 18px 20px; }
.record-card:hover { background: var(--card-hover); }
.rec-main { display: flex; gap: 14px; }
.rec-body { flex: 1; min-width: 0; }
.rec-title { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 800; flex-wrap: wrap; }
.rec-content { font-size: 13px; color: var(--text-2); margin-top: 5px; word-break: break-word; }
.rec-meta { display: flex; gap: 8px; font-size: 12px; color: var(--text-3); margin-top: 7px; }
.rec-metrics { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; }
.metric { font-size: 12.5px; color: var(--text-2); }
.metric b { color: var(--text); font-weight: 700; }
.rec-fail-msg { margin-top: 8px; font-size: 12px; color: var(--red); }
.rec-pending { margin-top: 8px; font-size: 12px; color: var(--amber); }
.rec-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; }
.rec-full-content { font-size: 14px; line-height: 1.8; padding: 14px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid var(--border); margin-top: 4px; word-break: break-word; }
.rec-media-name { margin-top: 10px; font-size: 12.5px; color: var(--text-2); }
.rec-tags { margin-top: 8px; }
.detail-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.dmetric { text-align: center; padding: 12px 6px; border-radius: 12px; background: var(--card-strong); border: 1px solid var(--border); }
.dmetric b { display: block; font-size: 18px; font-weight: 800; }
.dmetric span { font-size: 11px; color: var(--text-3); }

.my-progress { margin-top: 6px; }
.my-nums { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12.5px; color: var(--text-2); }

/* ---------------- 模态 ---------------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: rgba(5, 5, 16, .66); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  animation: fadeIn .22s ease; padding: 20px;
}
.modal {
  width: min(520px, 100%); max-height: 88vh; overflow-y: auto;
  background: linear-gradient(165deg, #191936, #12122a);
  border: 1px solid var(--border-strong); border-radius: 22px; padding: 26px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .8);
  animation: pop .28s cubic-bezier(.22, 1.4, .36, 1);
}
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-head { display: flex; gap: 14px; align-items: center; margin-bottom: 6px; }
.modal-title { font-size: 18px; font-weight: 800; }
.modal-sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.modal-tip { margin-top: 14px; font-size: 13px; color: var(--text-2); line-height: 1.75; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.oauth-flow { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.step { font-size: 11.5px; font-weight: 700; padding: 5px 12px; border-radius: 99px; background: rgba(255, 255, 255, .06); color: var(--text-3); }
.step.active { background: var(--grad-soft); color: #c4b5fd; }
.step.current { background: var(--grad); color: #fff; }

/* ---------------- 顶栏 / 底部导航（移动端） ---------------- */
.topbar {
  display: none; position: sticky; top: 0; z-index: 40;
  padding: 12px 16px; align-items: center; justify-content: space-between;
  background: rgba(10, 10, 24, .72); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.brand-mobile { padding: 0; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-size: 20px;
  box-shadow: 0 10px 24px -10px rgba(236, 72, 153, .8);
  transition: transform .2s ease;
}
.icon-btn:active { transform: scale(.92); }
.tabbar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: rgba(12, 12, 30, .86); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
}
.tab-item { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0; font-size: 11px; font-weight: 700; color: var(--text-3); border-radius: 12px; transition: all .2s ease; }
.tab-item.active { color: #fff; background: rgba(255, 255, 255, .06); }
.tab-item.active svg { color: var(--pink); }
.tab-badge { position: absolute; top: 0; right: calc(50% - 24px); min-width: 17px; height: 17px; font-size: 10px; padding: 0 4px; }

/* ---------------- Toast ---------------- */
.toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 14px; font-size: 13.5px; font-weight: 600;
  background: rgba(28, 28, 56, .92); backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong); color: var(--text);
  box-shadow: 0 20px 44px -16px rgba(0, 0, 0, .8);
  opacity: 0; transform: translateY(-16px) scale(.96); transition: all .3s cubic-bezier(.22, 1.2, .36, 1);
}
.toast.show { opacity: 1; transform: translateY(0) scale(1); }
.toast-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); flex: none; }
.toast.warn .toast-dot { background: var(--amber); box-shadow: 0 0 12px var(--amber); }
.toast.err .toast-dot { background: var(--red); box-shadow: 0 0 12px var(--red); }

/* ---------------- 彩带 ---------------- */
.confetti-layer { position: fixed; inset: 0; z-index: 300; pointer-events: none; overflow: hidden; }
.confetti { position: absolute; top: -16px; width: 9px; height: 14px; border-radius: 2px; opacity: .95; animation: confFall linear forwards; }
@keyframes confFall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(108vh) translateX(var(--tx)) rotate(var(--rot)); opacity: .4; }
}

/* ---------------- 动画 ---------------- */
#view { animation: fadeUp .42s cubic-bezier(.22, 1, .36, 1); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1240px) {
  .editor-layout { grid-template-columns: 1fr; }
  .drafts-panel, .publish-panel { position: static; }
  .drafts-panel .draft-list { flex-direction: row; overflow-x: auto; max-height: none; }
  .draft-item { min-width: 200px; }
}
@media (max-width: 940px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { display: flex; }
  .tabbar { display: flex; }
  .main { padding: 22px 16px 110px; }
  .page-title { font-size: 22px; }
  .page-head { margin-bottom: 18px; }
  .hero { flex-direction: column; align-items: flex-start; padding: 26px 22px; }
  .hero-art { display: none; }
  .hero-stats { gap: 24px; }
  .task-head-row { flex-direction: column; align-items: stretch; }
}
@media (max-width: 560px) {
  .stat-row { grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: 1fr; }
  .task-grid { grid-template-columns: 1fr; }
  .two-cols { grid-template-columns: 1fr; }
  .detail-metrics { grid-template-columns: repeat(2, 1fr); }
  .rec-actions { justify-content: flex-start; flex-wrap: wrap; }
  .modal { padding: 20px; }
  .editor-actions { flex-direction: column; }
}
