/* ============================================================
   彩虹体育 · 内容提取器
   设计：深色玻璃拟态 + 细腻过渡
   ============================================================ */

:root {
  --bg: #0a0b0f;
  --bg-soft: #12141c;
  --panel: rgba(22, 24, 34, 0.72);
  --panel-border: rgba(255, 255, 255, 0.07);
  --text: #e8eaf0;
  --text-dim: #8b90a3;
  --text-faint: #5a5f73;
  --accent: #5b8def;
  --accent-2: #7c5cff;
  --accent-3: #38bdf8;
  --green: #34d399;
  --red: #f87171;
  --amber: #fbbf24;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ===== 氛围背景 ===== */
.ambient {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
  pointer-events: none;
}
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: 0.35;
  animation: float 22s var(--ease) infinite;
}
.o1 { width: 560px; height: 560px; background: #3b5bdb; top: -180px; left: -120px; }
.o2 { width: 480px; height: 480px; background: #6d28d9; bottom: -160px; right: -100px; animation-delay: -7s; }
.o3 { width: 400px; height: 400px; background: #0e7490; top: 40%; left: 45%; animation-delay: -14s; opacity: 0.22; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.08); }
  66% { transform: translate(-30px, 25px) scale(0.95); }
}
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== 顶栏 ===== */
.topbar {
  position: relative; z-index: 10;
  height: 64px; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--panel-border);
  background: rgba(10, 11, 15, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 16px rgba(91, 141, 239, 0.35);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.logo:hover { transform: rotate(-8deg) scale(1.05); box-shadow: 0 6px 22px rgba(91, 141, 239, 0.5); }
.logo svg { width: 20px; height: 20px; color: #fff; }
.brand-text h1 { font-size: 16px; font-weight: 650; letter-spacing: -0.3px; line-height: 1.2; }
.brand-text span { font-size: 11px; color: var(--text-faint); letter-spacing: 0.5px; }
.top-actions { display: flex; gap: 10px; align-items: center; }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text); font-size: 13px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: all 0.3s var(--ease);
  position: relative; overflow: hidden;
}
.btn::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent);
  opacity: 0; transition: opacity 0.3s var(--ease);
}
.btn:hover:not(:disabled) { background: rgba(255,255,255,0.08); transform: translateY(-1px); border-color: rgba(255,255,255,0.14); }
.btn:hover:not(:disabled)::before { opacity: 1; }
.btn:active:not(:disabled) { transform: translateY(0) scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; position: relative; z-index: 1; }
.btn span { position: relative; z-index: 1; }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(91, 141, 239, 0.3);
}
.btn.primary:hover:not(:disabled) {
  box-shadow: 0 6px 24px rgba(91, 141, 239, 0.45);
  transform: translateY(-2px);
}
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 12px; font-size: 12px; }
.btn.loading span { opacity: 0; }
.btn.loading::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
  border-radius: 50%; animation: spin 0.7s linear infinite;
  left: 50%; top: 50%; margin: -7px 0 0 -7px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--text-faint);
  transition: background 0.3s, box-shadow 0.3s;
}
.dot.on { background: var(--green); box-shadow: 0 0 8px var(--green); }
.dot.off { background: var(--red); box-shadow: 0 0 8px var(--red); }

/* 限流状态胶囊 */
.rate-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--panel-border);
  font-size: 11.5px; color: var(--text-dim);
  transition: all 0.35s var(--ease);
}
.rate-pill.busy {
  background: rgba(251,191,36,0.12);
  border-color: rgba(251,191,36,0.3);
  color: var(--amber);
}
.rate-pill.cool {
  background: rgba(248,113,113,0.12);
  border-color: rgba(248,113,113,0.3);
  color: var(--red);
}
.rate-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); transition: background 0.3s;
}
.rate-pill.busy .rate-dot { background: var(--amber); animation: blink 1.2s ease-in-out infinite; }
.rate-pill.cool .rate-dot { background: var(--red); animation: blink 0.9s ease-in-out infinite; }

/* ===== 主布局 ===== */
.layout {
  position: relative; z-index: 5;
  display: grid; grid-template-columns: 340px 1fr;
  gap: 16px; padding: 16px; height: calc(100vh - 64px);
}
.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: panelIn 0.6s var(--ease-out) backwards;
}
.authors-panel { animation-delay: 0.05s; }
.content-panel { animation-delay: 0.12s; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(16px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

/* ===== 作者面板 ===== */
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 12px;
}
.panel-head h2 { font-size: 14px; font-weight: 600; letter-spacing: 0.2px; }
.badge {
  font-size: 11px; padding: 2px 8px; border-radius: 20px;
  background: rgba(91,141,239,0.16); color: var(--accent-3);
  font-weight: 600; font-variant-numeric: tabular-nums;
  transition: all 0.3s var(--ease);
}
.search-wrap {
  position: relative; margin: 0 18px 12px;
}
.search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--text-faint);
  pointer-events: none; transition: color 0.3s;
}
.search-wrap input {
  width: 100%; padding: 9px 34px 9px 34px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 13px; outline: none;
  transition: all 0.3s var(--ease);
}
.search-wrap input:focus {
  background: rgba(255,255,255,0.07);
  border-color: rgba(91,141,239,0.5);
  box-shadow: 0 0 0 3px rgba(91,141,239,0.12);
}
.search-wrap input:focus + .search-icon,
.search-wrap:focus-within .search-icon { color: var(--accent); }
.clear-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.1); color: var(--text-dim);
  cursor: pointer; display: grid; place-items: center;
  transition: all 0.25s var(--ease);
}
.clear-btn:hover { background: rgba(255,255,255,0.18); color: var(--text); }
.clear-btn svg { width: 11px; height: 11px; }

.sort-tabs {
  display: flex; gap: 6px; padding: 0 18px 12px;
}
.sort-tab {
  padding: 5px 12px; border-radius: 7px; border: 1px solid transparent;
  background: transparent; color: var(--text-faint);
  font-size: 12px; cursor: pointer;
  transition: all 0.3s var(--ease);
}
.sort-tab:hover { color: var(--text-dim); background: rgba(255,255,255,0.04); }
.sort-tab.active {
  background: rgba(91,141,239,0.16); color: var(--accent-3);
  border-color: rgba(91,141,239,0.25);
}

.author-list {
  flex: 1; overflow-y: auto; padding: 0 10px 16px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.author-list::-webkit-scrollbar { width: 6px; }
.author-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
.author-list::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

.author-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  cursor: pointer; position: relative;
  transition: all 0.3s var(--ease);
  animation: itemIn 0.45s var(--ease-out) backwards;
}
@keyframes itemIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: none; }
}
.author-item:hover { background: rgba(255,255,255,0.05); }
.author-item.active {
  background: rgba(91,141,239,0.14);
  box-shadow: inset 3px 0 0 var(--accent);
}
.author-item img {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover; background: var(--bg-soft);
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 0.4s var(--ease), border-color 0.3s;
}
.author-item:hover img { transform: scale(1.06); border-color: rgba(91,141,239,0.4); }
.author-item .ai-main { flex: 1; min-width: 0; }
.author-item .ai-name {
  font-size: 13px; font-weight: 550;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.author-item .ai-sub {
  font-size: 11px; color: var(--text-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 1px;
}
.author-item .ai-badge {
  font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
  padding: 2px 7px; border-radius: 6px;
  background: rgba(52,211,153,0.14); color: var(--green);
  transition: transform 0.3s var(--ease);
}
.author-item:hover .ai-badge { transform: scale(1.08); }
.author-item .ai-badge.zero { background: rgba(255,255,255,0.05); color: var(--text-faint); }

/* 骨架屏 */
.skeleton-list { padding: 0 8px; }
.sk-item {
  height: 58px; margin-bottom: 6px; border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.07) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== 空状态 ===== */
.empty-state {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px; text-align: center;
  animation: fadeUp 0.7s var(--ease-out) backwards;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}
.empty-icon {
  width: 84px; height: 84px; margin-bottom: 24px;
  border-radius: 24px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(91,141,239,0.12), rgba(124,92,255,0.08));
  border: 1px solid rgba(91,141,239,0.18);
  color: var(--accent);
  animation: pulseIcon 3.5s ease-in-out infinite;
}
@keyframes pulseIcon {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.03); }
}
.empty-icon svg { width: 44px; height: 44px; }
.empty-state h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.empty-state p { font-size: 13px; color: var(--text-dim); margin-bottom: 28px; max-width: 320px; }
.quick-search { display: flex; gap: 8px; width: 100%; max-width: 420px; }
.quick-search input {
  flex: 1; padding: 10px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 13px; outline: none;
  transition: all 0.3s var(--ease);
}
.quick-search input:focus {
  border-color: rgba(91,141,239,0.5);
  box-shadow: 0 0 0 3px rgba(91,141,239,0.12);
}

/* ===== 作者详情 ===== */
.author-detail { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.author-hero {
  display: flex; align-items: center; gap: 18px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--panel-border);
  animation: heroIn 0.6s var(--ease-out) backwards;
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}
.author-avatar-wrap { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.author-avatar {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
  background: var(--bg-soft); position: relative; z-index: 1;
  border: 1px solid rgba(255,255,255,0.1);
}
.avatar-ring {
  position: absolute; inset: -4px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent));
  opacity: 0.6; filter: blur(6px);
  animation: rotateRing 8s linear infinite;
}
@keyframes rotateRing { to { transform: rotate(360deg); } }
.author-meta { flex: 1; min-width: 0; }
.author-name-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.author-name-row h2 { font-size: 19px; font-weight: 650; letter-spacing: -0.3px; }
.tag-pill {
  font-size: 11px; padding: 2px 9px; border-radius: 20px;
  background: linear-gradient(135deg, rgba(91,141,239,0.2), rgba(124,92,255,0.16));
  color: var(--accent-3); border: 1px solid rgba(91,141,239,0.25);
  white-space: nowrap;
}
.author-stats { display: flex; gap: 22px; margin: 8px 0; }
.stat { display: flex; flex-direction: column; }
.stat b {
  font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums;
  transition: color 0.3s;
}
.stat.accent b { color: var(--green); }
.stat span { font-size: 11px; color: var(--text-faint); }
.author-sub { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.author-actions { display: flex; flex-direction: column; gap: 8px; }

/* 过滤条 */
.filter-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px; border-bottom: 1px solid var(--panel-border);
  gap: 12px; flex-wrap: wrap;
}
.status-tabs { display: flex; gap: 4px; background: rgba(0,0,0,0.25); padding: 3px; border-radius: 9px; }
.status-tab {
  padding: 5px 14px; border-radius: 7px; border: none;
  background: transparent; color: var(--text-faint);
  font-size: 12px; cursor: pointer;
  transition: all 0.3s var(--ease);
}
.status-tab:hover { color: var(--text-dim); }
.status-tab.active {
  background: rgba(91,141,239,0.2); color: var(--accent-3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.filter-right { display: flex; gap: 8px; align-items: center; }
.inline-search {
  padding: 6px 12px; width: 180px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--panel-border);
  border-radius: 8px; color: var(--text); font-size: 12px; outline: none;
  transition: all 0.3s var(--ease);
}
.inline-search:focus {
  border-color: rgba(91,141,239,0.5);
  box-shadow: 0 0 0 3px rgba(91,141,239,0.1);
}

/* ===== 文章列表 ===== */
.article-list {
  flex: 1; overflow-y: auto; padding: 14px 20px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.article-list::-webkit-scrollbar { width: 6px; }
.article-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }

.article-card {
  padding: 14px 16px; margin-bottom: 10px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--panel-border);
  cursor: pointer; position: relative; overflow: hidden;
  transition: all 0.35s var(--ease);
  animation: cardIn 0.5s var(--ease-out) backwards;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.article-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--accent);
  transform: scaleY(0); transform-origin: top;
  transition: transform 0.4s var(--ease);
}
.article-card:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(91,141,239,0.3);
  transform: translateX(3px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}
.article-card:hover::before { transform: scaleY(1); }
.ac-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.ac-title {
  flex: 1; font-size: 13.5px; font-weight: 550; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.ac-price {
  font-size: 11px; font-weight: 650; padding: 2px 8px; border-radius: 6px;
  background: rgba(251,191,36,0.14); color: var(--amber);
  white-space: nowrap; flex-shrink: 0;
}
.ac-meta { display: flex; gap: 14px; font-size: 11px; color: var(--text-faint); flex-wrap: wrap; }
.ac-status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 1px 7px; border-radius: 5px; font-size: 10.5px; font-weight: 550;
}
.ac-status.on { background: rgba(52,211,153,0.13); color: var(--green); }
.ac-status.off { background: rgba(255,255,255,0.05); color: var(--text-faint); }
.ac-status i {
  width: 5px; height: 5px; border-radius: 50%; background: currentColor;
}
.ac-status.on i { animation: blink 2s ease-in-out infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.ac-hint {
  margin-top: 8px; font-size: 11px; color: var(--text-faint);
  opacity: 0; transform: translateY(-3px);
  transition: all 0.35s var(--ease);
}
.article-card:hover .ac-hint { opacity: 1; transform: none; }
.article-card.loading-card {
  pointer-events: none; opacity: 0.65;
  border-color: rgba(91,141,239,0.4);
}

/* 阅读器加载态 */
.reader-loading {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-dim); font-size: 13px; padding: 8px 0;
}
.spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(91,141,239,0.25);
  border-top-color: var(--accent);
  animation: spin 0.75s linear infinite;
  display: inline-block;
}

/* 分页 */
.pager {
  display: flex; justify-content: center; gap: 8px;
  padding: 14px; border-top: 1px solid var(--panel-border);
}
.pager:empty { display: none; }
.pager button {
  padding: 6px 13px; border-radius: 7px;
  border: 1px solid var(--panel-border);
  background: rgba(255,255,255,0.04); color: var(--text-dim);
  font-size: 12px; cursor: pointer;
  transition: all 0.3s var(--ease);
}
.pager button:hover:not(:disabled) {
  background: rgba(91,141,239,0.16); color: var(--accent-3);
  border-color: rgba(91,141,239,0.3);
}
.pager button:disabled { opacity: 0.35; cursor: not-allowed; }
.pager .page-info { padding: 6px 12px; font-size: 12px; color: var(--text-faint); }

/* ===== 阅读器 ===== */
.article-reader {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
  animation: slideIn 0.45s var(--ease-out);
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: none; }
}
.back-btn {
  align-self: flex-start; margin: 16px 24px 0;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 13px; border-radius: 8px;
  border: 1px solid var(--panel-border);
  background: transparent; color: var(--text-dim);
  font-size: 12.5px; cursor: pointer;
  transition: all 0.3s var(--ease);
}
.back-btn:hover {
  background: rgba(255,255,255,0.06); color: var(--text);
  transform: translateX(-3px);
}
.back-btn svg { width: 15px; height: 15px; }
.reader-head { padding: 16px 28px 14px; border-bottom: 1px solid var(--panel-border); }
.reader-head h2 { font-size: 18px; font-weight: 650; line-height: 1.5; margin-bottom: 8px; }
.reader-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-faint); flex-wrap: wrap; }
.reader-body {
  flex: 1; overflow-y: auto; padding: 22px 28px;
  font-size: 14.5px; line-height: 1.85; color: #d5d8e3;
  white-space: pre-wrap; word-break: break-word;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.reader-body::-webkit-scrollbar { width: 6px; }
.reader-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
.reader-actions {
  display: flex; gap: 10px; padding: 14px 28px;
  border-top: 1px solid var(--panel-border);
}

/* ===== 弹窗 ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 20px;
  animation: fadeIn 0.3s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 520px;
  background: #161824; border: 1px solid var(--panel-border);
  border-radius: var(--radius); box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  animation: modalIn 0.4s var(--ease-out);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: none; }
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--panel-border);
}
.modal-head h3 { font-size: 15px; font-weight: 600; }
.icon-btn {
  width: 28px; height: 28px; border-radius: 7px; border: none;
  background: transparent; color: var(--text-faint); cursor: pointer;
  display: grid; place-items: center;
  transition: all 0.25s var(--ease);
}
.icon-btn:hover { background: rgba(255,255,255,0.08); color: var(--text); }
.icon-btn svg { width: 15px; height: 15px; }
.modal-body { padding: 20px 22px; }
.modal-body .hint { font-size: 12.5px; color: var(--text-dim); margin-bottom: 12px; }
.modal-body code {
  padding: 1px 6px; border-radius: 4px;
  background: rgba(91,141,239,0.14); color: var(--accent-3);
  font-size: 11.5px; font-family: ui-monospace, monospace;
}
.modal-body textarea {
  width: 100%; padding: 12px 14px; resize: vertical;
  background: rgba(0,0,0,0.3); border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: ui-monospace, monospace; font-size: 12px;
  line-height: 1.6; outline: none;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.modal-body textarea:focus {
  border-color: rgba(91,141,239,0.5);
  box-shadow: 0 0 0 3px rgba(91,141,239,0.1);
}
.token-status {
  margin-top: 12px; font-size: 12px; min-height: 18px;
  display: flex; align-items: center; gap: 6px;
}
.token-status.ok { color: var(--green); }
.token-status.err { color: var(--red); }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 22px; border-top: 1px solid var(--panel-border);
}

/* ===== Toast ===== */
.toast-wrap {
  position: fixed; bottom: 24px; right: 24px; z-index: 200;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  padding: 12px 18px; border-radius: var(--radius-sm);
  background: rgba(22,24,36,0.95); border: 1px solid var(--panel-border);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  font-size: 13px; min-width: 200px; max-width: 380px;
  display: flex; align-items: center; gap: 9px;
  animation: toastIn 0.45s var(--ease-out);
  border-left: 3px solid var(--accent);
}
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.warn { border-left-color: var(--amber); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px) scale(0.92); }
  to { opacity: 1; transform: none; }
}
.toast.out { animation: toastOut 0.35s var(--ease) forwards; }
@keyframes toastOut {
  to { opacity: 0; transform: translateX(40px) scale(0.92); }
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .layout { grid-template-columns: 280px 1fr; }
  .author-stats { gap: 16px; }
}
@media (max-width: 768px) {
  body { overflow: auto; }
  .layout {
    grid-template-columns: 1fr;
    height: auto; min-height: calc(100vh - 64px);
  }
  .authors-panel { max-height: 45vh; }
  .content-panel { min-height: 55vh; }
  .author-hero { flex-wrap: wrap; }
  .author-actions { flex-direction: row; width: 100%; }
  .author-actions .btn { flex: 1; justify-content: center; }
  .topbar { padding: 0 14px; }
  .brand-text span { display: none; }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
