/* ============================================================
   TT-AI 资讯站 - 全局样式（双主题：深色 / 浅色）
   ============================================================ */
:root {
  --bg: #07090f;
  --bg-soft: #0c1018;
  --card: rgba(255, 255, 255, 0.03);
  --card-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #e8ecf4;
  --text-2: #9aa4b8;
  --text-3: #667085;
  --accent: #6d8dff;
  --accent-2: #9d7bff;
  --accent-3: #4de3c0;
  --grad: linear-gradient(135deg, #6d8dff 0%, #9d7bff 50%, #4de3c0 100%);
  --navbar-bg: rgba(7, 9, 15, 0.72);
  --nav-hover: rgba(255, 255, 255, 0.06);
  --nav-active: rgba(109, 141, 255, 0.14);
  --grid-line: rgba(255, 255, 255, 0.025);
  --glow-1: rgba(109, 141, 255, 0.14);
  --glow-2: rgba(157, 123, 255, 0.12);
  --glow-3: rgba(77, 227, 192, 0.07);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --h3-color: #cdd6e6;
  --tagline-text: #c3cdff;
  --tagline-bg: rgba(109, 141, 255, 0.1);
  --note-bg: rgba(255, 255, 255, 0.04);
  --footer-line: #8892a6;
  --btn-hover: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1120px;
}

/* ============ 浅色主题 ============ */
html[data-theme="light"] {
  --bg: #f6f8fc;
  --bg-soft: #eef1f7;
  --card: rgba(255, 255, 255, 0.7);
  --card-hover: rgba(255, 255, 255, 0.95);
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.16);
  --text: #1c2433;
  --text-2: #455060;
  --text-3: #8a94a8;
  --accent: #4662d9;
  --accent-2: #7a4fe0;
  --accent-3: #0b8a6b;
  --grad: linear-gradient(135deg, #4662d9 0%, #7a4fe0 50%, #0b8a6b 100%);
  --navbar-bg: rgba(246, 248, 252, 0.78);
  --nav-hover: rgba(15, 23, 42, 0.05);
  --nav-active: rgba(70, 98, 217, 0.12);
  --grid-line: rgba(15, 23, 42, 0.04);
  --glow-1: rgba(70, 98, 217, 0.1);
  --glow-2: rgba(122, 79, 224, 0.08);
  --glow-3: rgba(11, 138, 107, 0.06);
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
  --h3-color: #33415c;
  --tagline-text: #3b5bdb;
  --tagline-bg: rgba(70, 98, 217, 0.08);
  --note-bg: rgba(15, 23, 42, 0.03);
  --footer-line: #6b7689;
  --btn-hover: rgba(15, 23, 42, 0.06);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

/* 背景光晕装饰 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(600px 400px at 12% -10%, var(--glow-1), transparent 60%),
    radial-gradient(700px 500px at 88% -5%, var(--glow-2), transparent 60%),
    radial-gradient(900px 600px at 50% 110%, var(--glow-3), transparent 60%);
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 0%, transparent 75%);
  pointer-events: none;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ 顶部导航 ============ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--navbar-bg);
  border-bottom: 1px solid var(--border);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-decoration: none;
  color: var(--text);
}
.brand .logo {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--grad);
  display: grid;
  place-items: center;
  font-size: 14px;
  color: #fff;
  box-shadow: 0 4px 14px rgba(109, 141, 255, 0.4);
}
.brand .grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  padding: 7px 14px;
  border-radius: 8px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--nav-hover); }
.nav-links a.active { color: var(--text); background: var(--nav-active); }

/* 主题切换按钮 */
.theme-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-size: 17px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s;
}
.theme-btn:hover {
  background: var(--btn-hover);
  color: var(--text);
  border-color: var(--border-strong);
}
.theme-btn .icon-sun { display: none; }
html[data-theme="light"] .theme-btn .icon-sun { display: inline; }
html[data-theme="light"] .theme-btn .icon-moon { display: none; }

/* ============ Hero 区 ============ */
.hero {
  position: relative;
  padding: 88px 0 72px;
  text-align: center;
}
.hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12.5px;
  color: var(--text-2);
  background: var(--note-bg);
  border: 1px solid var(--border);
  margin-bottom: 24px;
}
.hero .badge .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 10px var(--accent-3);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.hero h1 {
  font-size: clamp(34px, 5.4vw, 56px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.5px;
}
.hero h1 .grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .sub {
  max-width: 640px;
  margin: 20px auto 0;
  color: var(--text-2);
  font-size: 16.5px;
}
.hero .stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 40px;
}
.hero .stat .num {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
}
.hero .stat .lbl {
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 2px;
}

/* ============ 板块 ============ */
.section { padding: 48px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 26px;
}
.section-head .title-block h2 {
  font-size: 23px;
  font-weight: 700;
}
.section-head .title-block p {
  color: var(--text-3);
  font-size: 13.5px;
  margin-top: 4px;
}
.section-head .title-block h2 .bar {
  display: inline-block;
  width: 4px; height: 20px;
  margin-right: 10px;
  border-radius: 2px;
  background: var(--grad);
  vertical-align: -3px;
}
.more-link {
  font-size: 13.5px;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
}
.more-link:hover { gap: 8px; }

/* ============ 卡片 ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.3s;
}
.card:hover {
  background: var(--card-hover);
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.card:hover::before { opacity: 1; }

.card .card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--text-3);
}
.card .tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.tag-monthly { color: var(--accent); background: var(--tagline-bg); border: 1px solid rgba(109, 141, 255, 0.25); }
.tag-share { color: var(--accent-2); background: rgba(157, 123, 255, 0.12); border: 1px solid rgba(157, 123, 255, 0.25); }
.tag-notes { color: var(--accent-3); background: rgba(77, 227, 192, 0.1); border: 1px solid rgba(77, 227, 192, 0.22); }
.tag-notice { color: #c7842b; background: rgba(255, 178, 89, 0.1); border: 1px solid rgba(255, 178, 89, 0.22); }

.card h3 {
  font-size: 17.5px;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 10px;
}
.card .desc {
  flex: 1;
  color: var(--text-2);
  font-size: 13.8px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-3);
}
.card .card-foot .arrow {
  color: var(--accent);
  font-size: 14px;
  transition: transform 0.2s;
}
.card:hover .card-foot .arrow { transform: translateX(4px); }

/* 特色卡片（周观察首篇，占据更大展示位） */
.card.featured {
  grid-column: span 1;
  background: linear-gradient(150deg, var(--tagline-bg), rgba(157, 123, 255, 0.04) 60%, transparent);
}
.card.featured h3 { font-size: 19px; }

/* ============ 公告横幅 ============ */
.notice-bar {
  margin-top: 20px;
  background: linear-gradient(120deg, rgba(255, 178, 89, 0.08), rgba(255, 178, 89, 0.02));
  border: 1px solid rgba(255, 178, 89, 0.18);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.notice-bar .icon { font-size: 20px; }
.notice-bar .text { flex: 1; font-size: 14px; color: var(--text-2); }
.notice-bar .text strong { color: var(--text); font-weight: 600; }
.notice-bar a { color: var(--accent); text-decoration: none; font-size: 13px; white-space: nowrap; }

/* ============ 页脚 ============ */
.footer {
  margin-top: 40px;
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
}
.footer .f-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}
.footer .f-line {
  color: var(--footer-line);
  font-size: 13px;
  margin-top: 4px;
}
.footer a {
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s;
}
.footer a:hover { color: var(--accent); }
.footer .f-beian {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--footer-line);
}
.footer .公安-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--footer-line);
}
.footer .公安-link img {
  width: 20px;
  height: 22px;
  object-fit: contain;
  opacity: 0.9;
}
.footer .公安-link span,
.footer .f-beian #footerIcp,
.footer .beian-separator {
  font-size: 13px;
}
.footer .beian-separator {
  color: var(--text-3);
}

/* ============================================================
   文章详情页
   ============================================================ */
.article-wrap { padding: 40px 0 80px; }
.article-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 13.5px;
  margin-bottom: 28px;
  transition: color 0.2s;
}
.article-nav:hover { color: var(--accent); }

.article {
  max-width: 760px;
  margin: 0 auto;
}
.article .a-badge { margin-bottom: 18px; }
.article h1 {
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.3px;
  margin-bottom: 18px;
}
.article .a-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
  color: var(--text-3);
  font-size: 13px;
}
.article .a-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }

.article .a-body { padding-top: 28px; }
.a-body h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 34px 0 14px;
  padding-left: 13px;
  border-left: 3px solid transparent;
  border-image: var(--grad) 1;
  line-height: 1.5;
}
.a-body h3 {
  font-size: 16.5px;
  font-weight: 650;
  margin: 26px 0 10px;
  color: var(--h3-color);
}
.a-body p {
  margin: 12px 0;
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.9;
  text-align: justify;
}
.a-body ul {
  margin: 12px 0;
  padding-left: 4px;
  list-style: none;
}
.a-body ul li {
  position: relative;
  padding-left: 22px;
  margin: 10px 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.85;
}
.a-body ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 11px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--grad);
}
.a-body .a-note {
  margin-top: 32px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--note-bg);
  border: 1px dashed var(--border-strong);
  color: var(--text-3);
  font-size: 13px;
}
.a-body .a-tagline {
  margin: 14px 0;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: var(--tagline-bg);
  border: 1px solid rgba(109, 141, 255, 0.2);
  color: var(--tagline-text);
  font-size: 14px;
  line-height: 1.8;
}

/* 相关阅读 */
.related { margin-top: 56px; }
.related h3 { font-size: 17px; font-weight: 700; margin-bottom: 16px; }
.related .grid { grid-template-columns: repeat(3, 1fr); }
.related .mini-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s;
}
.related .mini-card:hover {
  background: var(--card-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.related .mini-card .t {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related .mini-card .m {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-3);
}

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .grid, .related .grid { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 64px 0 52px; }
  .hero .stats { gap: 28px; }
}
@media (max-width: 600px) {
  .grid, .related .grid { grid-template-columns: 1fr; }
  .section { padding: 36px 0; }
  .nav-links a { padding: 6px 10px; font-size: 13px; }
  .hero .stats { flex-wrap: wrap; }
}

/* 淡入动画 */
.fade-in {
  opacity: 0;
  transform: translateY(14px);
  animation: fadeIn 0.6s ease forwards;
}
@keyframes fadeIn {
  to { opacity: 1; transform: translateY(0); }
}
