/* ============================================
   交易体系网站 V7 - Patreon 浅色简洁风
   参考 TheMarketMemo · 白底 · 干净专业
   ============================================ */

:root {
  /* 浅色主色 */
  --bg-body: #ffffff;
  --bg-surface: #f7f8fa;
  --bg-card: #ffffff;
  --bg-card-hover: #fafbfc;
  --bg-elevated: #f0f1f3;
  --bg-hero: #1a1a2e;

  /* 强调色 */
  --color-accent: #0546b5;
  --color-accent-light: #0d6efd;
  --color-accent-subtle: rgba(13, 110, 253, 0.06);
  --color-accent-border: rgba(13, 110, 253, 0.15);

  /* 功能色 */
  --color-success: #198754;
  --color-danger: #dc3545;
  --color-warning: #e67700;
  --color-info: #0c8599;
  --color-gold: #e67700;

  /* 文字 */
  --color-text: #212529;
  --color-text-secondary: #495057;
  --color-text-muted: #868e96;
  --color-text-bright: #ffffff;

  /* 边框 */
  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-light: rgba(0, 0, 0, 0.12);
  --border-glow: rgba(13, 110, 253, 0.25);

  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);

  /* 字体 */
  --font-sans: -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* 过渡 */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg-body);
  color: var(--color-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--color-accent); text-decoration: none; transition: color 0.18s; }
a:hover { color: var(--color-accent-light); text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* ========== 布局 ========== */
.site-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ========== 页眉（TheMarketMemo 风格）========== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
  transition: box-shadow 0.2s;
}
.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo：圆形图片 + 文字 */
.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none !important;
}
.logo-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.logo-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.logo:hover .logo-text { color: var(--color-accent); }

/* 导航菜单 — 毛玻璃3D效果 */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  display: block;
  padding: 0.42rem 0.85rem;
  font-size: 0.86rem;
  font-weight: 500;
  color: #444;
  border-radius: 999px;
  text-decoration: none !important;
  /* 毛玻璃效果 */
  background: rgba(240, 242, 245, 0.55);
  backdrop-filter: blur(8px) saturate(180%);
  -webkit-backdrop-filter: blur(8px) saturate(180%);
  border: 1px solid rgba(200, 205, 212, 0.35);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.6);
  transition: all 0.18s ease;
}
.nav-link:hover {
  color: #111;
  background: rgba(230, 233, 237, 0.65);
  border-color: rgba(180, 185, 192, 0.45);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.8);
  transform: translateY(-1px);
  text-decoration: none;
}
.nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(37,99,235,0.25), inset 0 1px 0 rgba(255,255,255,0.2);
  font-weight: 600;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.35rem 0.55rem;
  line-height: 1;
}

@media (max-width: 640px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 56px; left: 0; right: 0;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border-light);
    padding: 0.5rem;
    box-shadow: var(--shadow-md);
  }
  .main-nav.open { display: flex; }
  .nav-link { padding: 0.58rem 0.75rem; width: 100%; }
  .menu-toggle { display: block; }
}

/* ========== 页脚 ========== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2rem 1.5rem;
  margin-top: 3rem;
  background: var(--bg-surface);
}

.footer-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.footer-brand { font-size: 0.9rem; color: var(--color-text); }
.footer-brand strong { font-weight: 600; }

.footer-links {
  display: flex;
  gap: 1.25rem;
}
.footer-links a {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  text-decoration: none !important;
}
.footer-links a:hover { color: var(--color-accent); }

.footer-disclaimer {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  max-width: 480px;
  line-height: 1.55;
}

/* ========== 通用卡片 ========== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 1rem;
}
.card-icon { font-size: 1.35rem; flex-shrink: 0; line-height: 1; }
.card-title { font-size: 1rem; font-weight: 700; color: var(--color-text); }
.card-desc { font-size: 0.82rem; color: var(--color-text-muted); margin-top: 0.1rem; }

/* ========== 列表 ========== */
.rule-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.rule-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}
.rule-icon { font-size: 1rem; flex-shrink: 0; margin-top: 0.2rem; }
.rule-content strong { display: block; font-size: 0.95rem; color: var(--color-text); font-weight: 600; }
.rule-content p { font-size: 0.86rem; color: var(--color-text-secondary); margin-top: 0.15rem; line-height: 1.6; }

/* ========== 标签 ========== */
.tag {
  display: inline-block;
  padding: 0.14rem 0.52rem;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.tag-green { background: rgba(25, 135, 84, 0.09); color: #157347; }
.tag-red { background: rgba(220, 53, 69, 0.09); color: #c23a3a; }
.tag-blue { background: rgba(12, 133, 153, 0.09); color: #0c7485; }
.tag-yellow { background: rgba(230, 119, 0, 0.09); color: #996600; }
.tag-orange { background: rgba(249, 115, 22, 0.09); color: #c45d00; }
.tag-gold { background: rgba(230, 119, 0, 0.09); color: #996600; }

/* ========== 数据表格 ========== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.data-table th {
  text-align: left;
  padding: 0.72rem 0.6rem;
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--border-subtle);
}
.data-table td {
  padding: 0.7rem 0.6rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  vertical-align: top;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-surface); }

/* ========== 页面标题 ========== */
.page-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 0.3rem;
  letter-spacing: -0.01em;
}
.page-subtitle {
  font-size: 0.96rem;
  color: var(--color-text-muted);
  margin-bottom: 2.5rem;
}

/* ========== 网格 ========== */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ========== 进场动画 ========== */
.animate-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== 选中区 & 滚动条 ========== */
::selection { background: rgba(13, 110, 253, 0.18); color: inherit; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: #d0d3d8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #adb5bd; }
