:root {
  --bg-color: #f9f8f6;
  --text-color: #0f172a;
  --text-muted: #64748b;
  --primary-color: #dc2626;
  --primary-hover: #b91c1c;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --header-bg: rgba(249, 248, 246, 0.85);
  --hover-wash: rgba(0, 0, 0, 0.02);
  --transition-speed: 0.4s;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.06);
  --border-radius: 12px;
}

[data-theme="dark"] {
  --bg-color: #0d1117;
  --text-color: #e6edf3;
  --text-muted: #8b949e;
  --primary-color: #dc2626;
  --primary-hover: #f85149;
  --card-bg: #161b22;
  --border-color: #30363d;
  --header-bg: rgba(13, 17, 23, 0.85);
  --hover-wash: rgba(255, 255, 255, 0.03);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.6);
}

html {
    scroll-behavior: smooth;
}

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

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.7;
  transition: background-color var(--transition-speed), color var(--transition-speed);
  -webkit-font-smoothing: antialiased;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h40v40H0V0zm20 20h20v20H20V20zM0 20h20v20H0V20z' fill='%23000000' fill-opacity='0.01' fill-rule='evenodd'/%3E%3C/svg%3E");
}

a {
  text-decoration: none;
  color: var(--text-color);
  transition: color var(--transition-speed);
}

header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 2px;
}

.logo a {
  color: var(--text-color);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav a {
  font-size: 0.95rem;
  opacity: 0.8;
  position: relative;
}

nav a:hover, nav a.active {
  opacity: 1;
  color: var(--primary-color);
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed);
}

.theme-toggle:hover {
  border-color: var(--text-color);
}

/* Hero Section */
.hero {
  padding: 12rem 2rem 8rem;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.editorial-title {
  font-size: 3.5rem;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 2rem;
  letter-spacing: -0.5px;
}

.hero .subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
  max-width: 90%;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2rem;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  transition: all var(--transition-speed);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #fff !important;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: #fff !important;
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-color);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--text-color);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-color);
  border-color: var(--border-color);
}

.btn-outline:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Parallax Widget Card */
.hero-widget-container {
  perspective: 1000px;
}

.porcelain-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-speed), border-color var(--transition-speed);
}

.widget-card {
  padding: 2rem;
  max-width: 380px;
  margin: 0 auto;
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
}

.widget-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
  transform: translateZ(20px);
}

.hairline-icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.widget-body {
  text-align: center;
  margin-bottom: 3rem;
  transform: translateZ(40px);
}

.connect-btn {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 1rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  transition: all 0.5s ease;
  box-shadow: var(--shadow-sm);
}

.connect-btn .btn-text {
  position: relative;
  z-index: 2;
  transition: color 0.3s;
}

.ink-wash {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background-color: var(--primary-color);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.8s ease, height 0.8s ease;
  z-index: 1;
}

.connect-btn.connecting .ink-wash,
.connect-btn.connected .ink-wash {
  width: 300px;
  height: 300px;
}

.connect-btn.connecting .btn-text,
.connect-btn.connected .btn-text {
  color: #fff;
}

.status-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--border-color);
  transition: background-color 0.8s ease;
}

.widget-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  transform: translateZ(20px);
}

.copy-sub-btn {
  width: 100%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--text-color);
  cursor: pointer;
  font-size: 0.95rem;
  transition: color var(--transition-speed);
}

.copy-sub-btn:hover {
  color: var(--primary-color);
}

.copy-sub-btn.copied {
  color: #10b981;
}

/* Sections Common */
.section-divider {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--border-color);
}

.section-title {
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 4rem;
  letter-spacing: -0.5px;
}

/* Grid Layouts */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}

/* Content Cards */
.card {
  padding: 3rem 2.5rem;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-icon {
  margin-bottom: 2rem;
  color: var(--text-color);
}

.card-icon svg {
  width: 32px;
  height: 32px;
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.showcase-card {
  padding: 4rem 3rem;
}

/* Pricing Table / Rows */
.pricing-list {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.pricing-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2.5rem 3rem;
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-speed);
}

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

.pricing-row:hover {
  background-color: var(--hover-wash);
}

/* Red Vermilion Indicator */
.pricing-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 60%;
  background-color: var(--primary-color);
  transition: transform 0.3s ease;
}

.pricing-row:hover::before {
  transform: translateY(-50%) scaleY(1);
}

.pricing-info h3 {
  font-size: 1.25rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.badge {
  background-color: rgba(220, 38, 38, 0.1);
  color: var(--primary-color);
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-weight: normal;
}

.pricing-info p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.pricing-price {
  font-size: 2rem;
  font-weight: 400;
  text-align: right;
  min-width: 150px;
}

.pricing-price span {
  font-size: 1rem;
  color: var(--text-muted);
}

.pricing-action {
  min-width: 120px;
  text-align: right;
}

/* Reviews */
.review-text {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  color: var(--text-color);
}

.review-author {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* FAQ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.faq-item h4 {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.faq-item p {
  color: var(--text-muted);
}

/* Footer */
footer {
  padding: 6rem 2rem 4rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

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

.footer-copy {
  color: var(--text-muted);
  font-size: 0.85rem;
  opacity: 0.6;
}

/* Page content (for static pages) */
.page-content {
  padding: 10rem 2rem 4rem;
  max-width: 800px;
  margin: 0 auto;
  min-height: 80vh;
}
.page-content h1 {
  font-size: 2.5rem;
  font-weight: 400;
  margin-bottom: 2.5rem;
}
.page-content h2 {
  font-size: 1.5rem;
  font-weight: 500;
  margin: 3rem 0 1.5rem;
}
.page-content p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}
.page-content ul {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}
.page-content li {
  margin-bottom: 0.8rem;
}

/* Insights list */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.article-item {
  padding: 2.5rem;
}
.article-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 1rem;
}
.article-item h2 {
  margin: 0 0 1rem;
  font-size: 1.4rem;
}
.article-item h2 a {
  color: var(--text-color);
}
.article-item h2 a:hover {
  color: var(--primary-color);
}
.article-item p {
  margin: 0;
  color: var(--text-muted);
}

/* ---- NEW: Article Specific Styles ---- */
.article-page {
  max-width: 800px;
}
.article-header {
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 2rem;
}
.article-header h1 {
  font-size: 2.8rem;
  line-height: 1.3;
  margin-bottom: 1.5rem;
}
.article-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.toc {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 2rem;
  border-radius: var(--border-radius);
  margin-bottom: 3rem;
}
.toc h3 {
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  font-weight: 500;
}
.toc ul {
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}
.toc li {
  margin-bottom: 0.8rem;
}
.toc a {
  color: var(--text-muted);
  transition: color var(--transition-speed);
}
.toc a:hover {
  color: var(--primary-color);
}
.article-body h2 {
  font-size: 1.8rem;
  font-weight: 500;
  margin: 4rem 0 1.5rem;
  color: var(--text-color);
  position: relative;
}
.article-body h3 {
  font-size: 1.3rem;
  font-weight: 500;
  margin: 2.5rem 0 1rem;
}
.article-body p {
  font-size: 1.1rem;
  line-height: 1.9;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}
.article-body ul, .article-body ol {
  margin-left: 1.5rem;
  margin-bottom: 2rem;
  font-size: 1.1rem;
  line-height: 1.8;
}
.article-body li {
  margin-bottom: 0.5rem;
}
.article-body a {
  color: var(--primary-color);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.article-body a:hover {
  color: var(--primary-hover);
}
.article-faq {
  margin-top: 5rem;
  padding-top: 3rem;
  border-top: 1px dashed var(--border-color);
}
.article-faq h2 {
  font-size: 1.8rem;
  margin-bottom: 2rem;
}
.related-reading {
  margin-top: 4rem;
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}
.related-reading h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}
.related-reading ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.related-reading li {
  margin-bottom: 1rem;
  position: relative;
  padding-left: 1.5rem;
}
.related-reading li::before {
  content: "•";
  color: var(--primary-color);
  position: absolute;
  left: 0;
  font-weight: bold;
}
.related-reading a {
  font-weight: 500;
  color: var(--text-color);
}
.related-reading a:hover {
  color: var(--primary-color);
}

/* Mobile Adjustments */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 10rem;
    gap: 3rem;
  }
  .hero .subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .pricing-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem;
  }
  .pricing-price {
    text-align: left;
  }
  .pricing-action {
    width: 100%;
  }
  .pricing-action .btn {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }
  .nav-container {
    padding: 1rem;
  }
  .editorial-title {
    font-size: 2.5rem;
  }
  .article-header h1 {
    font-size: 2.2rem;
  }
  nav {
    order: 3;
    width: 100%;
    margin-top: 1rem;
  }
  nav ul {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 0.5rem;
    gap: 1.5rem;
    -webkit-overflow-scrolling: touch;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
  }
  nav ul::-webkit-scrollbar {
    display: none;
  }
  .theme-toggle {
    order: 2;
  }
}
