/* ==========================================================================
   Ad Trend Radar — 高级科技化主题
   设计语言参考 tec-do.com：电光蓝→青色渐变、深空底色、玻璃拟态、缓动
   cubic-bezier(.76,0,.24,1)。类名与布局栅格保持原样，仅换视觉与动效。
   ========================================================================== */

:root {
  color-scheme: light;

  /* 底色：近白 + 极淡冷调 */
  --bg-0: #f5f7fc;
  --bg-1: #eaeff8;
  --page: #f5f7fc;

  /* 玻璃面：白色半透明 + 细描边（浅色版的"玻璃"是白玻璃，不是暗玻璃） */
  --surface: rgba(255, 255, 255, 0.72);
  --surface-2: rgba(255, 255, 255, 0.84);
  --surface-3: rgba(255, 255, 255, 0.95);
  --line: rgba(15, 23, 42, 0.09);
  --line-strong: rgba(15, 23, 42, 0.18);

  /* 文字 */
  --ink: #0d1424;
  --muted: #5b6a85;
  --dim: #8a97ad;

  /* 主渐变：tec-do 电光蓝→青，浅底上整体加深一档保证对比度 */
  --grad-main: linear-gradient(115deg, #0a2fd8 0%, #0a72ff 55%, #00c2f0 100%);
  --grad-violet: linear-gradient(115deg, #4b1fd8 0%, #8656ff 55%, #b98cff 100%);
  --grad-text: linear-gradient(100deg, #0a2fd8 0%, #0a72ff 58%, #0090c4 100%);

  --accent: #0a63e0;
  --blue: #2563ff;
  --violet: #6d3cf5;
  --green: #0e9f73;
  --coral: #e0345c;
  --gold: #c97a06;
  --teal: #0090c4;

  --ease: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  --glow: 0 10px 28px rgba(10, 114, 255, 0.26);
  --ring: 0 0 0 1px rgba(10, 114, 255, 0.4), 0 0 0 5px rgba(10, 114, 255, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg-0);
  color: var(--ink);
  font-family: Inter, "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(10, 114, 255, 0.16);
  color: #08182f;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: 999px;
  background-color: rgba(15, 23, 42, 0.18);
}
::-webkit-scrollbar-thumb:hover {
  background-color: rgba(10, 114, 255, 0.4);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   背景：极光光斑 + 网格面纱
   -------------------------------------------------------------------------- */

.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(180deg, #f7f9fd 0%, #eaeff8 45%, #f5f7fc 100%);
}

.aurora .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.85;
  will-change: transform;
}

.blob-a {
  width: 620px;
  height: 620px;
  top: -220px;
  left: -140px;
  background: radial-gradient(circle, rgba(10, 114, 255, 0.22), transparent 68%);
  animation: drift-a 26s var(--ease) infinite;
}

.blob-b {
  width: 540px;
  height: 540px;
  top: -120px;
  right: -120px;
  background: radial-gradient(circle, rgba(0, 194, 240, 0.2), transparent 68%);
  animation: drift-b 32s var(--ease) infinite;
}

.blob-c {
  width: 660px;
  height: 660px;
  bottom: -320px;
  left: 42%;
  background: radial-gradient(circle, rgba(134, 86, 255, 0.18), transparent 68%);
  animation: drift-c 38s var(--ease) infinite;
}

.grid-veil {
  position: absolute;
  inset: -10%;
  background-image: linear-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
  background-size: 58px 58px;
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 25%, #000 20%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 60% at 50% 25%, #000 20%, transparent 78%);
  animation: grid-drift 30s linear infinite;
}

/* 顶部扫描线 */
.scanline {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 100%;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.scanline.is-active {
  opacity: 1;
}

.scanline::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, #0a72ff, #2563ff, transparent);
  transform: translateX(-100%);
}

.scanline.is-active::before {
  animation: scan-sweep 1.15s var(--ease) infinite;
}

/* --------------------------------------------------------------------------
   骨架
   -------------------------------------------------------------------------- */

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(245, 247, 252, 0.9));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--line);
  color: var(--ink);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-lockup strong,
.brand-lockup span {
  display: block;
}

.brand-lockup strong {
  font-size: 15px;
  letter-spacing: 0.2px;
}

.brand-lockup span:last-child {
  color: var(--dim);
  font-size: 12px;
  margin-top: 2px;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--grad-main);
  box-shadow: var(--glow);
  color: #fff;
  overflow: hidden;
}

/* 四芒星 logo：主星 + 副星，缓慢呼吸 */
.brand-mark svg {
  position: relative;
  z-index: 1;
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 2px 6px rgba(4, 12, 34, 0.38));
  animation: star-breathe 5.5s var(--ease) infinite;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.55), transparent 70%);
  transform: translateX(-120%);
  animation: mark-sweep 4.5s var(--ease) infinite;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  transition: color 0.25s var(--ease), background 0.25s var(--ease),
    border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.nav-item span:first-child {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--accent);
  transition: transform 0.3s var(--ease);
}

.nav-item:hover {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
  transform: translateX(3px);
}

.nav-item.active {
  border-color: rgba(10, 114, 255, 0.32);
  background: linear-gradient(90deg, rgba(10, 114, 255, 0.14), rgba(10, 114, 255, 0.04));
  color: #0a2f66;
  box-shadow: inset 0 0 22px rgba(10, 114, 255, 0.08);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 50%;
  width: 3px;
  height: 20px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: var(--grad-main);
  box-shadow: 0 0 14px rgba(10, 114, 255, 0.8);
}

.nav-item.active span:first-child {
  transform: scale(1.12);
}

.source-mini {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.source-mini span,
.source-mini strong {
  display: block;
}

.mini-label {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.source-mini strong {
  margin: 6px 0;
  font-size: 14px;
}

#modeHint {
  color: var(--dim);
  font-size: 12px;
  line-height: 1.4;
}

.workspace {
  padding: 28px;
}

/* --------------------------------------------------------------------------
   分页：左侧菜单一项 = 一个功能页，切换显示
   -------------------------------------------------------------------------- */

.page {
  display: none;
}

.page.active {
  display: block;
  animation: page-in 0.45s var(--ease-out) both;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   查询区（首屏）
   -------------------------------------------------------------------------- */

.query-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.66));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  animation: rise-in 0.7s var(--ease-out) both;
}

/* 顶部渐变发丝线 */
.query-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(10, 114, 255, 0.45), rgba(134, 86, 255, 0.32), transparent);
}

.query-panel::after {
  content: "";
  position: absolute;
  top: -60%;
  right: -12%;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 140, 255, 0.22), transparent 68%);
  filter: blur(50px);
  pointer-events: none;
  animation: drift-b 24s var(--ease) infinite;
}

.query-title {
  position: relative;
  z-index: 1;
}

.query-title h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.6px;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.query-title p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.query-form {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 160px 190px 132px;
  gap: 12px;
  align-items: end;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--ink);
  padding: 0 12px;
  outline: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s var(--ease);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--dim);
}

.field input,
.field select {
  min-height: 44px;
}

.field textarea {
  min-height: 118px;
  padding: 11px 12px;
  resize: vertical;
  line-height: 1.5;
  font-family: inherit;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--line-strong);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(10, 114, 255, 0.65);
  background: rgba(0, 140, 255, 0.07);
  box-shadow: var(--ring);
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.field select option {
  background: #ffffff;
  color: var(--ink);
}

/* 按钮 */
.run-button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--grad-main);
  background-size: 180% 100%;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.2px;
  box-shadow: 0 8px 26px rgba(0, 110, 255, 0.34);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background-position 0.6s var(--ease);
}

.run-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.5), transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
}

.run-button:hover {
  transform: translateY(-2px);
  background-position: 100% 0;
  box-shadow: 0 14px 38px rgba(0, 160, 255, 0.5);
}

.run-button:hover::after {
  transform: translateX(120%);
}

.run-button:active {
  transform: translateY(0) scale(0.985);
}

.run-button:disabled {
  cursor: progress;
  opacity: 0.75;
  transform: none;
}

.run-button:disabled::after {
  transform: translateX(-120%);
}

.ghost-button {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--accent);
  padding: 0 14px;
  font-size: 12px;
  font-weight: 800;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.ghost-button:hover {
  background: rgba(10, 114, 255, 0.1);
  border-color: rgba(10, 114, 255, 0.5);
  color: var(--accent);
  transform: translateY(-1px);
}

.platform-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.platform-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease),
    background 0.25s var(--ease);
}

.platform-row label:hover {
  border-color: rgba(10, 114, 255, 0.45);
  color: var(--ink);
}

.platform-row label:has(input:checked) {
  border-color: rgba(10, 114, 255, 0.55);
  background: rgba(10, 114, 255, 0.13);
  color: #0a2f66;
  box-shadow: inset 0 0 18px rgba(10, 114, 255, 0.08);
}

.platform-row input[type="checkbox"] {
  accent-color: var(--accent);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   状态条
   -------------------------------------------------------------------------- */

.status-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 18px 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: rise-in 0.6s var(--ease-out) 0.08s both;
}

.status-banner strong {
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.3px;
}

.status-banner span {
  color: var(--muted);
  font-size: 13px;
}

/* --------------------------------------------------------------------------
   指标卡
   -------------------------------------------------------------------------- */

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.62));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
  animation: rise-in 0.6s var(--ease-out) both;
}

.metric:nth-child(1) { animation-delay: 0.10s; }
.metric:nth-child(2) { animation-delay: 0.16s; }
.metric:nth-child(3) { animation-delay: 0.22s; }
.metric:nth-child(4) { animation-delay: 0.28s; }
.metric:nth-child(5) { animation-delay: 0.34s; }

.metric::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(10, 114, 255, 0.55), transparent);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

.metric:hover {
  transform: translateY(-4px);
  border-color: rgba(10, 114, 255, 0.32);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.1), 0 0 30px rgba(10, 114, 255, 0.14);
}

.metric:hover::before {
  opacity: 1;
}

.metric span,
.metric small {
  display: block;
  color: var(--dim);
}

.metric span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin: 8px 0;
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.metric small {
  font-size: 11.5px;
}

/* --------------------------------------------------------------------------
   内容面板
   -------------------------------------------------------------------------- */

.content-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.panel {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.6));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(10, 114, 255, 0.4), transparent);
  opacity: 0.5;
}

.panel:hover {
  border-color: rgba(10, 114, 255, 0.22);
}

/* 滚动进场 */
.reveal {
  opacity: 0;
  transform: translateY(22px);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }
.span-6 { grid-column: span 6; }
.span-4 { grid-column: span 4; }

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.panel-header h2,
.panel-header p {
  margin: 0;
}

.panel-header h2 {
  font-size: 18px;
  letter-spacing: -0.2px;
}

.panel-header p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

/* 分段控件 */
.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
}

.segment {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 14px;
  font-size: 12px;
  font-weight: 800;
  transition: color 0.25s var(--ease), background 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.segment:hover {
  color: var(--ink);
}

.segment.active {
  background: var(--grad-main);
  background-size: 160% 100%;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 130, 255, 0.42);
  animation: seg-pop 0.35s var(--ease-out);
}

/* --------------------------------------------------------------------------
   广告卡
   -------------------------------------------------------------------------- */

.ads-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ad-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
  animation: card-in 0.55s var(--ease-out) both;
}

.ads-grid .ad-card:nth-child(1) { animation-delay: 0.02s; }
.ads-grid .ad-card:nth-child(2) { animation-delay: 0.06s; }
.ads-grid .ad-card:nth-child(3) { animation-delay: 0.10s; }
.ads-grid .ad-card:nth-child(4) { animation-delay: 0.14s; }
.ads-grid .ad-card:nth-child(5) { animation-delay: 0.18s; }
.ads-grid .ad-card:nth-child(6) { animation-delay: 0.22s; }
.ads-grid .ad-card:nth-child(n + 7) { animation-delay: 0.26s; }

.ad-card:hover {
  transform: translateY(-6px);
  border-color: rgba(10, 114, 255, 0.34);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.12), 0 0 30px rgba(10, 114, 255, 0.12);
}

.ad-creative {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #eef2f9, #e1e9f5);
}

.ad-creative img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out), filter 0.4s var(--ease);
}

.ad-card:hover .ad-creative img {
  transform: scale(1.06);
  filter: saturate(1.12) brightness(1.05);
}

/* 图片加载前的骨架微光 */
.ad-creative:not(.no-image)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.62), transparent 70%);
  transform: translateX(-100%);
  animation: shimmer 2.6s var(--ease) infinite;
  pointer-events: none;
}

/* 没有图片素材的广告：用文字占位替代示例图，避免多张卡片重复显示同一张图 */
.ad-creative.no-image {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(10, 114, 255, 0.09) 0%, rgba(134, 86, 255, 0.07) 100%);
}

.ad-creative.no-image::before {
  content: "无图片素材";
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: rgba(91, 106, 133, 0.9);
  text-transform: uppercase;
}

.ad-creative.no-image::after {
  content: attr(data-placeholder);
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #33415c;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  word-break: break-word;
}

.platform-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(6, 10, 18, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.ad-body {
  padding: 14px;
}

.ad-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--dim);
  font-size: 12px;
}

.ad-meta strong {
  color: var(--coral);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.ad-body h3 {
  margin: 8px 0 6px;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -0.2px;
}

.ad-body p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag {
  padding: 5px 8px;
  border: 1px solid rgba(10, 114, 255, 0.22);
  border-radius: 6px;
  background: rgba(0, 160, 255, 0.1);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.tag:hover {
  background: rgba(0, 200, 255, 0.2);
  border-color: rgba(10, 114, 255, 0.45);
}

.ad-actions {
  display: flex;
  gap: 8px;
  margin-top: 13px;
}

.ad-actions a {
  flex: 1;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease),
    background 0.25s var(--ease), transform 0.25s var(--ease);
}

.ad-actions a:hover {
  transform: translateY(-1px);
  color: var(--accent);
  border-color: rgba(10, 114, 255, 0.45);
  background: rgba(10, 114, 255, 0.1);
}

/* --------------------------------------------------------------------------
   列表类（竞品 / 趋势 / 数据源）
   -------------------------------------------------------------------------- */

.competitor-list,
.trend-list,
.source-list {
  display: grid;
  gap: 10px;
}

.competitor-item,
.trend-item,
.source-item {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
    background 0.3s var(--ease);
  animation: card-in 0.5s var(--ease-out) both;
}

.competitor-item:nth-child(1), .trend-item:nth-child(1), .source-item:nth-child(1) { animation-delay: 0.03s; }
.competitor-item:nth-child(2), .trend-item:nth-child(2), .source-item:nth-child(2) { animation-delay: 0.07s; }
.competitor-item:nth-child(3), .trend-item:nth-child(3), .source-item:nth-child(3) { animation-delay: 0.11s; }
.competitor-item:nth-child(4), .trend-item:nth-child(4), .source-item:nth-child(4) { animation-delay: 0.15s; }
.competitor-item:nth-child(5), .trend-item:nth-child(5), .source-item:nth-child(5) { animation-delay: 0.19s; }
.competitor-item:nth-child(n + 6), .trend-item:nth-child(n + 6), .source-item:nth-child(n + 6) { animation-delay: 0.23s; }

.competitor-item:hover,
.trend-item:hover,
.source-item:hover {
  transform: translateX(4px);
  border-color: rgba(10, 114, 255, 0.32);
  background: rgba(0, 140, 255, 0.08);
}

.item-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.item-top strong {
  font-size: 14px;
  letter-spacing: -0.1px;
}

.score {
  color: var(--accent);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.item-copy {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.07);
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--grad-main);
  background-size: 200% 100%;
  box-shadow: 0 0 14px rgba(10, 114, 255, 0.45);
  transition: width 0.9s var(--ease-out);
  animation: bar-flow 3s linear infinite;
}

.source-item a {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.source-item a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   迭代中枢
   -------------------------------------------------------------------------- */

.iteration-form {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.iteration-form .field { grid-column: span 3; }
.iteration-form .wide-field { grid-column: span 4; }
.iteration-form .run-button { grid-column: span 1; }

.file-field {
  display: grid;
  grid-column: span 1;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.file-field input {
  width: 100%;
  font-size: 11px;
  color: var(--muted);
}

.file-field input::file-selector-button {
  margin-right: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.25s var(--ease);
}

.file-field input::file-selector-button:hover {
  background: rgba(0, 160, 255, 0.2);
}

.requirement-list,
.signal-list,
.summary-list,
.backlog-list {
  display: grid;
  gap: 10px;
}

.requirement-group,
.signal-item,
.brief-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease),
    background 0.3s var(--ease);
  animation: card-in 0.5s var(--ease-out) both;
}

.requirement-group {
  display: grid;
  gap: 10px;
  padding: 13px;
}

.requirement-group:hover,
.signal-item:hover {
  border-color: rgba(10, 114, 255, 0.28);
  background: rgba(0, 140, 255, 0.06);
}

.requirement-group strong {
  font-size: 13px;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 5px 8px;
  border: 1px solid rgba(134, 86, 255, 0.3);
  border-radius: 6px;
  background: rgba(134, 86, 255, 0.12);
  color: var(--violet);
  font-size: 11px;
  font-weight: 700;
}

.signal-item {
  display: grid;
  gap: 8px;
  padding: 13px;
}

.signal-item.winner {
  border-left: 3px solid var(--green);
  box-shadow: inset 0 0 24px rgba(46, 230, 168, 0.07);
}

.signal-item.hook_gap,
.signal-item.risk {
  border-left: 3px solid var(--coral);
  box-shadow: inset 0 0 24px rgba(255, 92, 122, 0.07);
}

.signal-item.landing_gap {
  border-left: 3px solid var(--gold);
  box-shadow: inset 0 0 24px rgba(255, 179, 71, 0.07);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.summary-row:last-child {
  border-bottom: 0;
}

.summary-row strong {
  color: var(--ink);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.brief-card {
  display: grid;
  gap: 13px;
  padding: 15px;
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease),
    transform 0.35s var(--ease);
}

.brief-card:hover {
  transform: translateY(-3px);
  border-color: rgba(10, 114, 255, 0.26);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.1);
}

.brief-head,
.brief-foot {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brief-head {
  justify-content: space-between;
}

.brief-head > div {
  flex: 1;
  min-width: 0;
}

.brief-head strong {
  display: block;
  font-size: 15px;
  letter-spacing: -0.2px;
}

.brief-head p,
.brief-hypothesis {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.priority,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.priority {
  background: rgba(255, 92, 122, 0.14);
  border: 1px solid rgba(255, 92, 122, 0.3);
  color: #c81f45;
}

.status-pill {
  background: rgba(46, 230, 168, 0.13);
  border: 1px solid rgba(46, 230, 168, 0.3);
  color: #08795a;
}

.brief-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.brief-columns > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.025);
}

.column-label {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.brief-columns ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.brief-card details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.025);
  padding: 10px 12px;
}

.brief-card summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.brief-card pre {
  overflow-x: auto;
  white-space: pre-wrap;
  margin: 10px 0 0;
  color: var(--muted);
  font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.brief-foot {
  justify-content: space-between;
  color: var(--dim);
  font-size: 12px;
}

.brief-foot strong {
  color: var(--accent);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.02);
  color: var(--dim);
  font-size: 13px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   素材生成
   -------------------------------------------------------------------------- */

.gen-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.gen-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
  animation: card-in 0.6s var(--ease-out) both;
}

.gen-card:hover {
  transform: translateY(-5px);
  border-color: rgba(10, 114, 255, 0.32);
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.12);
}

.gen-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}

.gen-card:hover img {
  transform: scale(1.05);
}

.gen-card figcaption {
  display: flex;
  justify-content: flex-end;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.gen-card figcaption a {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.gen-card figcaption a:hover {
  text-decoration: underline;
}

.gen-helper {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(10, 114, 255, 0.24);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(10, 114, 255, 0.07), rgba(134, 86, 255, 0.05));
}

.gen-helper::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -5%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 200, 255, 0.16), transparent 68%);
  filter: blur(40px);
  pointer-events: none;
}

.gen-helper-head {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}

.gen-helper-head h3 {
  margin: 0;
  font-size: 16px;
}

.gen-helper-head p {
  margin: 4px 0 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.gen-helper-body {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.gen-helper-body .field { grid-column: span 3; }
.gen-helper-body .wide-field { grid-column: span 12; }
.gen-helper-body .run-button { grid-column: span 3; }

.ds-output {
  position: relative;
  margin-top: 14px;
  animation: rise-in 0.5s var(--ease-out) both;
}

.ds-result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.ds-result-head strong {
  font-size: 14px;
}

.ds-markdown {
  overflow-x: auto;
  white-space: pre-wrap;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.035);
  color: #42506b;
  font: 13px/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* --------------------------------------------------------------------------
   动效关键帧
   -------------------------------------------------------------------------- */

@keyframes drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(70px, 50px, 0) scale(1.1); }
  66% { transform: translate3d(-40px, 90px, 0) scale(0.95); }
}

@keyframes drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  40% { transform: translate3d(-80px, 60px, 0) scale(1.12); }
  75% { transform: translate3d(50px, -40px, 0) scale(0.92); }
}

@keyframes drift-c {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-90px, -60px, 0) scale(1.08); }
}

@keyframes grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 58px, 58px 0; }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@keyframes seg-pop {
  0% { transform: scale(0.9); }
  55% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}

@keyframes bar-flow {
  from { background-position: 0% 0; }
  to { background-position: 200% 0; }
}

@keyframes mark-sweep {
  0% { transform: translateX(-120%); }
  55%, 100% { transform: translateX(120%); }
}

@keyframes scan-sweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes star-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* 数字滚动 */
@keyframes count-pop {
  0% { transform: translateY(6px); opacity: 0.4; }
  100% { transform: none; opacity: 1; }
}

.metric strong.is-counting {
  animation: count-pop 0.4s var(--ease-out);
}

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .gen-helper-body .field,
  .gen-helper-body .wide-field,
  .gen-helper-body .run-button {
    grid-column: span 6;
  }
}

@media (max-width: 700px) {
  .gen-helper-body .field,
  .gen-helper-body .wide-field,
  .gen-helper-body .run-button {
    grid-column: auto;
  }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 14px;
    gap: 18px;
  }

  .nav-list {
    display: flex;
    overflow-x: auto;
    gap: 6px;
  }

  .nav-item:hover {
    transform: none;
  }

  .nav-item.active::before {
    left: 50%;
    top: auto;
    bottom: -1px;
    width: 20px;
    height: 3px;
    transform: translateX(-50%);
  }

  .source-mini {
    margin-left: auto;
    margin-top: 0;
    padding-top: 0;
    padding-left: 16px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .query-form,
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .query-title h1 {
    font-size: 26px;
  }

  .run-button {
    grid-column: span 2;
  }

  .span-8,
  .span-12,
  .span-6,
  .span-4 {
    grid-column: span 12;
  }

  .iteration-form .field,
  .iteration-form .wide-field,
  .file-field,
  .iteration-form .run-button {
    grid-column: span 6;
  }
}

@media (max-width: 700px) {
  .workspace {
    padding: 14px;
  }

  .sidebar {
    display: grid;
  }

  .source-mini {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }

  .query-form,
  .metric-grid,
  .ads-grid,
  .brief-columns {
    grid-template-columns: 1fr;
  }

  .run-button,
  .iteration-form .field,
  .iteration-form .wide-field,
  .file-field,
  .iteration-form .run-button {
    grid-column: auto;
  }

  .panel-header {
    display: grid;
  }
}

/* --------------------------------------------------------------------------
   无障碍：尊重系统「减少动态效果」
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* YouTube Brief 输出区 */
.brief-output {
  white-space: pre-wrap;
  background: #f6f5fd;
  border: 1px solid rgba(112, 87, 255, 0.25);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.65;
  font-family: inherit;
  color: inherit;
}

.brief-button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}

/* ===== 账号入口 / 登录弹窗 ===== */
.auth-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: -4px;
  min-height: 42px;
}

.auth-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(112, 87, 255, 0.22);
  box-shadow: 0 6px 18px rgba(11, 12, 59, 0.06);
}

.auth-avatar {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7057ff, #a78bfa);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.auth-email {
  font-size: 12.5px;
  color: rgba(11, 12, 59, 0.72);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-quota {
  font-size: 12px;
  font-weight: 700;
  color: #7057ff;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(112, 87, 255, 0.1);
}

.auth-quota.is-empty {
  color: #b42318;
  background: rgba(180, 35, 24, 0.1);
}

.auth-link {
  border: none;
  background: none;
  font: inherit;
  font-size: 12.5px;
  color: rgba(11, 12, 59, 0.5);
  cursor: pointer;
  padding: 0;
}

.auth-link:hover {
  color: #7057ff;
}

.auth-login-btn {
  border: 1px solid rgba(112, 87, 255, 0.35);
  background: linear-gradient(135deg, #7057ff, #8b6dff);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(112, 87, 255, 0.28);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.auth-login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(112, 87, 255, 0.34);
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(11, 12, 59, 0.42);
  backdrop-filter: blur(4px);
}

.auth-modal {
  position: relative;
  width: min(400px, 100%);
  background: #ffffff;
  border-radius: 18px;
  padding: 28px 26px 26px;
  box-shadow: 0 24px 60px rgba(11, 12, 59, 0.28);
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(11, 12, 59, 0.06);
  color: rgba(11, 12, 59, 0.6);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}

.auth-close:hover {
  background: rgba(11, 12, 59, 0.12);
}

.auth-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(112, 87, 255, 0.1);
  margin-bottom: 16px;
}

.auth-tab {
  border: none;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: rgba(11, 12, 59, 0.55);
  padding: 7px 18px;
  border-radius: 999px;
  cursor: pointer;
}

.auth-tab.active {
  background: #ffffff;
  color: #7057ff;
  box-shadow: 0 2px 8px rgba(11, 12, 59, 0.1);
}

.auth-modal h2 {
  margin: 0 0 6px;
  font-size: 20px;
  color: #0b0c3b;
}

.auth-sub {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(11, 12, 59, 0.6);
}

.auth-modal form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-modal .field input {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid rgba(11, 12, 59, 0.14);
  font: inherit;
  font-size: 14px;
  color: #0b0c3b;
  background: #f9fafb;
}

.auth-modal .field input:focus {
  outline: none;
  border-color: #7057ff;
  box-shadow: 0 0 0 3px rgba(112, 87, 255, 0.14);
  background: #ffffff;
}

.auth-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(180, 35, 24, 0.08);
  border: 1px solid rgba(180, 35, 24, 0.2);
  color: #b42318;
  font-size: 12.5px;
  line-height: 1.5;
}

.auth-submit {
  justify-content: center;
  width: 100%;
  margin-top: 2px;
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: progress;
}

@media (max-width: 720px) {
  .auth-email {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   站点数据（GSC + GA4）
   -------------------------------------------------------------------------- */
.site-list,
.insight-list {
  display: grid;
  gap: 10px;
}

.site-subtitle {
  margin: 14px 0 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.site-item {
  display: grid;
  gap: 8px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
  animation: card-in 0.5s var(--ease-out) both;
}

.site-item:hover {
  border-color: rgba(10, 114, 255, 0.28);
  background: rgba(0, 140, 255, 0.06);
}

.site-item.weak {
  border-left: 3px solid var(--coral);
}

.site-item .item-top strong {
  font-size: 13px;
}

.insight-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.78);
  animation: card-in 0.5s var(--ease-out) both;
}

.insight-card.p0 {
  border-left-color: var(--coral);
}

.insight-card.p1 {
  border-left-color: var(--gold);
}

.insight-card.p2 {
  border-left-color: var(--teal);
}

.insight-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.insight-head strong {
  font-size: 14px;
}

.priority-pill {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--grad-main);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.insight-evidence,
.insight-action {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.insight-action {
  color: var(--ink);
  font-weight: 600;
}

.site-warnings {
  display: grid;
  gap: 6px;
  margin-top: 4px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(201, 122, 6, 0.06);
}

.site-warnings p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

/* ==========================================================================
   语言切换（EN / 中文）
   ========================================================================== */
.lang-switch {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.lang-btn {
  flex: 1;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.lang-btn:hover {
  color: var(--ink);
}

.lang-btn.active {
  background: var(--grad-main);
  color: #fff;
  box-shadow: var(--glow);
}
