/* ===== 巴菲特投资思想知识库 - Global Styles ===== */

:root {
  --primary: #1a365d;
  --primary-light: #2c5282;
  --accent: #c59a2e;
  --accent-light: #d4b04a;
  --bg: #fefcf7;
  --bg-card: #ffffff;
  --bg-warm: #faf6ed;
  --text: #2d3748;
  --text-light: #718096;
  --text-muted: #a0aec0;
  --border: #e8e0d0;
  --border-light: #f0ebe0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --font-serif: 'Georgia', 'Noto Serif SC', 'STSong', 'SimSun', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --max-width: 1200px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

/* ===== Navigation ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(254, 252, 247, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  padding: 0 24px;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--primary);
}

.nav-brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-serif);
}

.nav-brand-text {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--primary);
}

.nav-brand-sub {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 400;
  margin-top: -2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all var(--transition);
}

.nav-links a:hover { color: var(--primary); background: rgba(26, 54, 93, 0.06); }
.nav-links a.active { color: var(--primary); background: rgba(26, 54, 93, 0.08); font-weight: 600; }

.nav-cta {
  background: var(--primary) !important;
  color: #fff !important;
  padding: 8px 20px !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
}

.nav-cta:hover {
  background: var(--primary-light) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 54, 93, 0.3);
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  margin: 5px 0;
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
  padding: 80px 24px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(197, 154, 46, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner { max-width: 800px; margin: 0 auto; position: relative; }

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
  margin-bottom: 24px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.25;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-desc {
  font-size: 18px;
  color: var(--text-light);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: all var(--transition);
  text-decoration: none;
  display: block;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--border);
}

.stat-num {
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 500;
}

/* ===== Section ===== */
.section {
  padding: 64px 24px;
}

.section-inner { max-width: var(--max-width); margin: 0 auto; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

.section-header h2 .count {
  color: var(--accent);
  margin-left: 8px;
}

.section-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition);
}

.section-link:hover { gap: 10px; }

/* Grid Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.card:hover .card-arrow { opacity: 1; transform: translateX(0); }

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.card-icon.blue { background: rgba(26, 54, 93, 0.08); }
.card-icon.gold { background: rgba(197, 154, 46, 0.1); }

.card-content { flex: 1; min-width: 0; }

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}

.card-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.card-arrow {
  opacity: 0;
  transform: translateX(-8px);
  transition: all var(--transition);
  color: var(--accent);
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 10px;
}

/* ===== Page Header ===== */
.page-header {
  padding: 48px 24px 32px;
  text-align: center;
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.page-header p {
  font-size: 16px;
  color: var(--text-light);
  max-width: 560px;
  margin: 0 auto;
}

/* ===== Pricing Page ===== */
.pricing-hero {
  padding: 80px 24px 48px;
  text-align: center;
}

.pricing-hero h1 {
  font-family: var(--font-serif);
  font-size: 42px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}

.pricing-hero .subtitle {
  font-size: 17px;
  color: var(--text-light);
  max-width: 520px;
  margin: 0 auto 16px;
  line-height: 1.8;
}

.pricing-hero .guarantee {
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
}

.pricing-card-wrapper {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.pricing-card {
  background: var(--bg-card);
  border: 2px solid var(--accent);
  border-radius: 16px;
  padding: 44px 36px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.pricing-card .popular-tag {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  padding: 5px 20px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
}

.pricing-name {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.pricing-price {
  margin: 24px 0;
}

.pricing-amount {
  font-family: var(--font-serif);
  font-size: 56px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.pricing-currency {
  font-size: 28px;
  font-weight: 500;
  vertical-align: super;
}

.pricing-period {
  font-size: 15px;
  color: var(--text-light);
  margin-top: 4px;
}

.pricing-features {
  text-align: left;
  margin: 32px 0;
  padding: 24px;
  background: var(--bg-warm);
  border-radius: var(--radius-sm);
}

.pricing-features li {
  list-style: none;
  padding: 10px 0;
  font-size: 15px;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.pricing-features li:last-child { border-bottom: none; }

.pricing-features .check {
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

.pricing-btn {
  display: block;
  width: 100%;
  padding: 16px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  text-align: center;
}

.pricing-btn:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 54, 93, 0.35);
}

.pricing-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Value Props */
.value-props {
  padding: 0 24px 80px;
}

.value-grid {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.value-item {
  text-align: center;
  padding: 28px 16px;
}

.value-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.value-item h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
}

.value-item p {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
}

/* FAQ */
.faq-section {
  padding: 0 24px 80px;
}

.faq-inner {
  max-width: 680px;
  margin: 0 auto;
}

.faq-inner h2 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  margin-bottom: 32px;
}

.faq-item {
  border-bottom: 1px solid var(--border-light);
  padding: 20px 0;
}

.faq-q {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-q:hover { color: var(--accent); }

.faq-a {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 10px;
  line-height: 1.8;
  display: none;
}

.faq-item.open .faq-a { display: block; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }

.faq-arrow {
  font-size: 12px;
  transition: transform var(--transition);
  flex-shrink: 0;
}

/* ===== Content Pages ===== */
.period-section {
  margin-bottom: 40px;
}

.period-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border-light);
  padding: 40px 24px;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 14px;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--primary); }

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  padding: 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-light);
  text-decoration: none;
}

.breadcrumb a:hover { color: var(--accent); }

.breadcrumb span { margin: 0 8px; }

/* ===== Detail page ===== */
.detail-page {
  padding: 0 24px 64px;
}

.detail-inner {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 48px;
}

.detail-inner h1 {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 24px;
}

.detail-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.detail-tag {
  padding: 4px 12px;
  background: var(--bg-warm);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-light);
}

.detail-body {
  font-size: 15px;
  line-height: 2;
  color: var(--text);
}

.detail-body h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--primary);
  margin: 32px 0 16px;
}

.detail-body h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--primary);
  margin: 24px 0 12px;
}

.detail-body p {
  margin-bottom: 16px;
}

.detail-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  margin: 20px 0;
  background: var(--bg-warm);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-light);
}

.detail-body ul, .detail-body ol {
  margin: 0 0 16px 24px;
}

.detail-body li {
  margin-bottom: 8px;
}

.highlight-box {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  margin: 24px 0;
}

.highlight-box .hl-label {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.highlight-box .hl-quote {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--primary);
  line-height: 1.8;
  font-style: italic;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero h1 { font-size: 32px; }
  .hero-desc { font-size: 16px; }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .stat-num { font-size: 32px; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .nav-links.open { display: flex; }

  .nav-toggle { display: block; }

  .card-grid { grid-template-columns: 1fr; }

  .detail-inner { padding: 28px 20px; }

  .pricing-card { padding: 32px 24px; }
  .pricing-amount { font-size: 44px; }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeInUp 0.6s ease forwards; }
.fade-in-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-in-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-in-delay-3 { animation-delay: 0.3s; opacity: 0; }
.fade-in-delay-4 { animation-delay: 0.4s; opacity: 0; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== Toast / Modal for purchase ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 40px 32px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.modal h3 {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--primary);
  margin-bottom: 16px;
}

.modal p {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 20px;
  line-height: 1.7;
}

.modal .qr-code {
  width: 180px;
  height: 180px;
  background: var(--bg-warm);
  border-radius: var(--radius-sm);
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.modal-close {
  padding: 10px 24px;
  background: var(--text-muted);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover { background: var(--text-light); }
