/* 全局变量与重置 */
:root {
    /* 色板 */
    --color-dark: #2D1438;
    --color-paper: #F6F3F7;
    --color-body: #1F1523;
    --color-brand: #9E13DD;
    --color-accent: #6EEDA8;
    
    /* 结构 Token */
    --radius-card: 20px;
    --radius-btn: 12px;
    --card-border: 1px solid rgba(31, 21, 35, 0.16);
    --card-shadow: none;
    --section-y: clamp(5rem, 10vw, 9rem);
    --gap: clamp(1.5rem, 3vw, 2.5rem);
    --content-max: 1120px;
    
    /* 字体 */
    --font-sans: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.75;
    color: var(--color-body);
    background-color: var(--color-paper);
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

img, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}

/* 容器 */
.container {
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--gap);
}

/* 页头 */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(246, 243, 247, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(31, 21, 35, 0.1);
    padding: 16px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-body);
}

.brand-logo img {
    width: auto;
    height: 32px;
    border-radius: 6px;
}

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-body);
    padding: 8px 12px;
    border-radius: 8px;
}

.nav-links a:hover, .nav-links a[aria-current="page"] {
    color: var(--color-brand);
    background-color: rgba(158, 19, 221, 0.06);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: var(--color-accent);
    color: var(--color-dark);
    font-weight: 700;
    font-size: 1rem;
    padding: 0 24px;
    height: 48px;
    border-radius: var(--radius-btn);
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(110, 237, 168, 0.4);
}

.btn-primary:focus-visible {
    outline: 3px solid var(--color-brand);
    outline-offset: 2px;
}

/* 修复：深色背景上的按钮文字颜色 */
.container .grid-chess .grid-text a.btn-primary {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: transparent;
    color: var(--color-body);
    font-weight: 600;
    font-size: 1rem;
    padding: 0 24px;
    height: 48px;
    border-radius: var(--radius-btn);
    border: 2px solid var(--color-body);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.btn-secondary:hover {
    background: var(--color-body);
    color: var(--color-paper);
}

.btn-secondary:focus-visible {
    outline: 3px solid var(--color-brand);
    outline-offset: 2px;
}

/* 区块通用 */
.section {
    padding-top: var(--section-y);
    padding-bottom: var(--section-y);
}

.section-dark {
    background-color: var(--color-dark);
    color: var(--color-paper);
}

.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 16px;
    color: var(--color-brand);
}

.section-dark .section-label {
    color: var(--color-accent);
}

.section-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.02em;
    margin-bottom: 24px;
    color: var(--color-body);
}

.section-dark .section-title {
    color: var(--color-paper);
}

.section-title .hl {
    color: var(--color-brand);
}

.section-dark .section-title .hl {
    color: var(--color-accent);
}

.section-desc {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 40em;
    margin-bottom: 32px;
    color: var(--color-body);
}

.section-dark .section-desc {
    color: var(--color-paper);
    opacity: 0.9;
}

/* 正文段落行长优化：限制最大宽度约 40 字，避免大分辨率下阅读疲劳 */
.timeline-step p,
.checklist-item p,
.faq-answer p,
.deep-dive-card p {
    max-width: 40em;
}

/* 棋盘式交错布局 */
.grid-chess {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
    align-items: center;
}

.chess-item:nth-child(even) .grid-text {
    order: 2;
}

.chess-item:nth-child(even) .grid-visual {
    order: 1;
}

.grid-text {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.grid-visual {
    background-color: var(--color-dark);
    border-radius: var(--radius-card);
    padding: 32px;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.section-dark .grid-visual {
    background-color: rgba(255, 255, 255, 0.08);
}

/* 列表与要点 */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.feature-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--color-brand);
}

.section-dark .feature-icon {
    color: var(--color-accent);
}

/* 时间轴 */
.timeline {
    position: relative;
    padding-left: 32px;
    border-left: 2px solid var(--color-brand);
}

.section-dark .timeline {
    border-left-color: var(--color-accent);
}

.timeline-item {
    position: relative;
    margin-bottom: 32px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -39px;
    top: 0;
    width: 16px;
    height: 16px;
    background-color: var(--color-brand);
    border: 4px solid var(--color-paper);
    border-radius: 50%;
}

.section-dark .timeline-marker {
    background-color: var(--color-accent);
    border-color: var(--color-dark);
}

.timeline-time {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-brand);
    margin-bottom: 4px;
    letter-spacing: 0.05em;
}

.section-dark .timeline-time {
    color: var(--color-accent);
}

/* 核心功能 Tab */
.tabs-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(31, 21, 35, 0.1);
    padding-bottom: 16px;
    overflow-x: auto;
}

.section-dark .tabs-nav {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.tab-btn {
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-body);
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 8px;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.section-dark .tab-btn {
    color: var(--color-paper);
}

.tab-btn:hover {
    background-color: rgba(158, 19, 221, 0.06);
    color: var(--color-brand);
}

.section-dark .tab-btn:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--color-accent);
}

.tab-btn.active {
    color: var(--color-brand);
    background-color: rgba(158, 19, 221, 0.1);
}

.section-dark .tab-btn.active {
    color: var(--color-accent);
    background-color: rgba(110, 237, 168, 0.15);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* 深度专题 */
.deep-dive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.deep-dive-card {
    background-color: var(--color-paper);
    border: var(--card-border);
    border-radius: var(--radius-card);
    padding: 24px;
    box-shadow: var(--card-shadow);
}

.section-dark .deep-dive-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.deep-dive-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--color-body);
}

.section-dark .deep-dive-card h3 {
    color: var(--color-paper);
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    border: var(--card-border);
    border-radius: var(--radius-card);
    overflow: hidden;
    background-color: var(--color-paper);
}

.section-dark .faq-item {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.faq-item summary {
    padding: 20px 24px;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-body);
}

.section-dark .faq-item summary {
    color: var(--color-paper);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--color-brand);
}

.section-dark .faq-item summary::after {
    color: var(--color-accent);
}

.faq-item[open] summary::after {
    content: "-";
}

.faq-answer {
    padding: 0 24px 20px;
    color: var(--color-body);
    line-height: 1.7;
}

.section-dark .faq-answer {
    color: var(--color-paper);
    opacity: 0.9;
}

/* 快速开始 */
.steps-container {
    display: flex;
    gap: 24px;
    counter-reset: step-counter;
}

.step-item {
    flex: 1;
    position: relative;
    padding-top: 40px;
}

.step-number {
    position: absolute;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    background-color: var(--color-brand);
    color: var(--color-paper);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.section-dark .step-number {
    background-color: var(--color-accent);
    color: var(--color-dark);
}

.step-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

/* 资讯卡片 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.news-card {
    background-color: var(--color-paper);
    border: var(--card-border);
    border-radius: var(--radius-card);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section-dark .news-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.news-date {
    font-size: 0.85rem;
    color: var(--color-brand);
    font-weight: 600;
}

.section-dark .news-date {
    color: var(--color-accent);
}

.news-title {
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.4;
}

.news-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-body);
    opacity: 0.8;
}

.section-dark .news-excerpt {
    color: var(--color-paper);
}

/* 表格 */
.data-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: var(--card-border);
    border-radius: var(--radius-card);
    background-color: var(--color-paper);
    max-width: 100%;
}

.section-dark .data-table-wrapper {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.data-table {
    min-width: 640px;
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th, .data-table td {
    word-break: break-word;
}

.data-table th, .data-table td {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(31, 21, 35, 0.1);
}

.section-dark .data-table th, .section-dark .data-table td {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.data-table th {
    font-weight: 700;
    background-color: rgba(158, 19, 221, 0.05);
    color: var(--color-body);
}

.section-dark .data-table th {
    background-color: rgba(255, 255, 255, 0.05);
    color: #2D1438;
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* 页脚 */
.site-footer {
    background-color: var(--color-dark);
    color: var(--color-paper);
    padding: 64px 0 32px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 48px;
    margin-bottom: 48px;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--color-accent);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col a {
    font-size: 0.95rem;
    color: var(--color-paper);
    opacity: 0.8;
}

.footer-col a:hover {
    opacity: 1;
    color: var(--color-accent);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    opacity: 0.6;
}

/* SVG 动效 */
svg {
    width: 100%;
    height: auto;
}

@keyframes breathe {
    0%, 100% { transform: scale(0.95); opacity: 0.4; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes dash-flow {
    to { stroke-dashoffset: -20; }
}

.orbit-circle {
    fill: none;
    stroke: var(--color-accent);
    stroke-width: 1.5;
    transform-origin: center;
    animation: breathe 6s ease-in-out infinite;
}

.orbit-circle:nth-child(2) {
    animation-delay: 1s;
    animation-duration: 8s;
}

.orbit-circle:nth-child(3) {
    animation-delay: 2s;
    animation-duration: 10s;
}

.float-element {
    animation: float 4s ease-in-out infinite;
}

.flow-line {
    stroke-dasharray: 10 10;
    animation: dash-flow 1s linear infinite;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .grid-chess {
        grid-template-columns: 1fr;
    }
    
    .chess-item:nth-child(even) .grid-text,
    .chess-item:nth-child(even) .grid-visual {
        order: unset;
    }
    
    .steps-container {
        flex-direction: column;
    }
    
    .nav-links {
        display: none; /* 简化处理，实际项目可加汉堡菜单 */
    }
    
    .header-inner {
        justify-content: space-between;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* 减少动态效果偏好 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 兜底：裁掉横向溢出 */
body > * {
  overflow-x: clip;
}
/* factory-contrast-width */
@media (min-width: 1440px) {
  [data-fc-1440="ink"] {
    color: #1f1523 !important;
    -webkit-text-fill-color: #1f1523 !important;
  }
}
@media (max-width: 1439px) {
  [data-fc-1440="ink"] {
    color: #f6f3f7 !important;
    -webkit-text-fill-color: #f6f3f7 !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="ink"] {
    color: #1f1523 !important;
    -webkit-text-fill-color: #1f1523 !important;
  }
}
@media (max-width: 1439px) {
  [data-fc-1440="ink"] {
    color: #f6f3f7 !important;
    -webkit-text-fill-color: #f6f3f7 !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="ink"] {
    color: #1f1523 !important;
    -webkit-text-fill-color: #1f1523 !important;
  }
}
@media (max-width: 1439px) {
  [data-fc-1440="ink"] {
    color: #f6f3f7 !important;
    -webkit-text-fill-color: #f6f3f7 !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="ink"] {
    color: #1f1523 !important;
    -webkit-text-fill-color: #1f1523 !important;
  }
}
@media (max-width: 1439px) {
  [data-fc-1440="ink"] {
    color: #f6f3f7 !important;
    -webkit-text-fill-color: #f6f3f7 !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="ink"] {
    color: #1f1523 !important;
    -webkit-text-fill-color: #1f1523 !important;
  }
}
@media (max-width: 1439px) {
  [data-fc-1440="ink"] {
    color: #f6f3f7 !important;
    -webkit-text-fill-color: #f6f3f7 !important;
  }
}
