/* === 设计变量与基础设置 === */
:root {
    /* 颜色系统 */
    --color-dark: #19102D;
    --color-paper: #FCFCFD;
    --color-text: #191523;
    --color-brand: #5214EB;
    --color-accent: #D66EED;
    
    /* 结构参数 */
    --radius-card: 0;
    --radius-btn: 0;
    --card-border: 2px solid var(--color-text);
    --card-shadow: 4px 4px 0 var(--color-text);
    --section-y: clamp(5rem, 10vw, 9rem);
    --gap: clamp(1.5rem, 3vw, 2.5rem);
    --content-max: 1280px;
    
    /* 排版参数 */
    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-paper);
    color: var(--color-text);
    line-height: 1.75;
    font-size: 16px;
    overflow-x: hidden;
}

img, svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

/* === 布局容器 === */
.container {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--gap);
}

.section {
    padding-top: var(--section-y);
    padding-bottom: var(--section-y);
    position: relative;
}

.section + .section {
    border-top: 1px solid var(--color-text);
}

.dark-section {
    background-color: var(--color-dark);
    color: var(--color-paper);
}

.dark-section .hl {
    color: var(--color-accent);
}

.paper-section {
    background-color: var(--color-paper);
    color: var(--color-text);
}

.paper-section .hl {
    color: var(--color-brand);
}

/* === 排版组件 === */
.label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 2px solid var(--color-brand);
}

.dark-section .label {
    border-left-color: var(--color-accent);
}

h1 {
    font-size: clamp(2rem, 4.6vw, 3.4rem);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
    max-width: 38em;
}

.hl {
    color: var(--color-brand);
    font-weight: 700;
}

.dark-section .hl {
    color: var(--color-accent);
}

/* === 按钮 === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    gap: 10px;
}

.btn:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-dark);
    border: 2px solid var(--color-accent);
}

.btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(0.95);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-text);
    border: 2px solid var(--color-text);
}

.dark-section .btn-secondary {
    color: var(--color-paper);
    border-color: var(--color-paper);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background-color: rgba(0,0,0,0.05);
}

.dark-section .btn-secondary:hover {
    background-color: rgba(255,255,255,0.1);
}

.btn-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* === 导航栏 === */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--color-paper);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding: 16px 0;
}

.dark-section .header {
    background-color: var(--color-dark);
    border-bottom-color: rgba(255,255,255,0.1);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.2rem;
}

.logo img {
    height: 32px;
    width: auto;
}

.nav-list {
    display: flex;
    gap: 24px;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-link[aria-current="page"] {
    color: var(--color-brand);
    font-weight: 700;
}

.dark-section .nav-link[aria-current="page"] {
    color: var(--color-accent);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
    transform: scaleX(1);
    transform-origin: left;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: currentColor;
}

@media (max-width: 768px) {
    .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-paper);
        flex-direction: column;
        padding: 24px;
        border-bottom: 1px solid var(--color-text);
        gap: 16px;
    }
    
    .dark-section .nav-list {
        background-color: var(--color-dark);
        border-bottom-color: var(--color-paper);
    }
    
    .nav-list.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
}

/* === 页脚 === */
.footer {
    padding: 64px 0;
    border-top: 1px solid var(--color-text);
    background-color: var(--color-paper);
    color: var(--color-text);
}

.dark-section .footer {
    border-top-color: rgba(255,255,255,0.1);
    background-color: var(--color-dark);
    color: var(--color-paper);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 48px;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--color-brand);
}

.dark-section .footer-col h4 {
    color: var(--color-accent);
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-bottom {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid rgba(0,0,0,0.1);
    font-size: 0.85rem;
    opacity: 0.6;
    text-align: center;
}

.dark-section .footer-bottom {
    border-top-color: rgba(255,255,255,0.1);
}

/* === 卡片与面板 === */
.card {
    background-color: var(--color-paper);
    border: var(--card-border);
    box-shadow: var(--card-shadow);
    padding: 24px;
    border-radius: var(--radius-card);
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
}

.panel {
    background-color: var(--color-dark);
    padding: 32px;
    border-radius: var(--radius-card);
    position: relative;
    overflow: hidden;
}

.paper-panel {
    background-color: var(--color-paper);
    border: var(--card-border);
    box-shadow: var(--card-shadow);
    padding: 24px;
}

/* === 功能交错布局 === */
.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
    align-items: center;
    margin-bottom: 64px;
}

.feature-row:last-child {
    margin-bottom: 0;
}

.feature-row.reverse .feature-text {
    order: 2;
}

.feature-row.reverse .feature-visual {
    order: 1;
}

@media (max-width: 768px) {
    .feature-row {
        grid-template-columns: 1fr;
    }
    
    .feature-row.reverse .feature-text {
        order: 1;
    }
    
    .feature-row.reverse .feature-visual {
        order: 2;
    }
}

/* === 步骤条 === */
.steps-container {
    display: flex;
    gap: 24px;
    counter-reset: step;
}

.step-item {
    flex: 1;
    position: relative;
    padding-top: 48px;
}

.step-item::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    background-color: var(--color-accent);
    color: var(--color-dark);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-card);
}

.step-line {
    position: absolute;
    top: 18px;
    left: 36px;
    width: calc(100% - 36px);
    height: 2px;
    background-color: rgba(0,0,0,0.1);
    z-index: -1;
}

.dark-section .step-line {
    background-color: rgba(255,255,255,0.1);
}

@media (max-width: 768px) {
    .steps-container {
        flex-direction: column;
    }
    
    .step-line {
        display: none;
    }
}

/* === 表格 === */
.table-wrapper {
    overflow-x: auto;
    border: var(--card-border);
    box-shadow: var(--card-shadow);
    border-radius: var(--radius-card);
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--color-paper);
}

th, td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.dark-section table {
    background-color: var(--color-dark);
    color: var(--color-paper);
}

.dark-section th, .dark-section td {
    border-bottom-color: rgba(255,255,255,0.1);
}

th {
    font-weight: 700;
    background-color: rgba(0,0,0,0.02);
}

.dark-section th {
    background-color: rgba(255,255,255,0.05);
}

tr:last-child td {
    border-bottom: none;
}

/* === FAQ === */
.faq-item {
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.dark-section .faq-item {
    border-bottom-color: rgba(255,255,255,0.1);
}

details {
    padding: 24px 0;
    cursor: pointer;
}

summary {
    font-weight: 600;
    font-size: 1.1rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 400;
    transition: transform 0.3s ease;
}

details[open] summary::after {
    transform: rotate(45deg);
}

details p {
    margin-top: 16px;
    opacity: 0.9;
}

/* === 场景卡片 === */
.scenario-card {
    margin-bottom: 48px;
}

.scenario-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    margin-right: 8px;
    margin-bottom: 8px;
    border: 1px solid currentColor;
    border-radius: var(--radius-card);
}

.label-problem {
    color: var(--color-brand);
    background-color: rgba(82, 20, 235, 0.1);
}

.label-action {
    color: var(--color-text);
    background-color: rgba(0,0,0,0.05);
}

.dark-section .label-action {
    color: var(--color-paper);
    background-color: rgba(255,255,255,0.1);
}

.label-result {
    color: var(--color-accent);
    background-color: rgba(214, 110, 237, 0.1);
}

/* === 新闻卡片 === */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.news-card {
    border: var(--card-border);
    box-shadow: var(--card-shadow);
    padding: 24px;
    border-radius: var(--radius-card);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-date {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-brand);
    margin-bottom: 12px;
}

.dark-section .news-date {
    color: var(--color-accent);
}

.news-card h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.news-card p {
    font-size: 0.95rem;
    opacity: 0.85;
    margin-bottom: 0;
    flex-grow: 1;
}

/* === SVG 动效 === */
.svg-anim-dot {
    offset-path: path('M 0 0 Q 100 50 200 0');
    animation: flowDot 4s linear infinite;
}

.svg-anim-dot-delay {
    animation-delay: 2s;
}

@keyframes flowDot {
    0% { offset-distance: 0%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { offset-distance: 100%; opacity: 0; }
}

.svg-anim-bubble {
    animation: bubbleFloat 6s ease-in-out infinite;
}

@keyframes bubbleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.svg-anim-pulse {
    animation: pulseAnim 3s ease-in-out infinite;
}

@keyframes pulseAnim {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

svg {
    width: 100%;
    height: auto;
}

/* === 减少动态效果 === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .svg-anim-dot, .svg-anim-bubble, .svg-anim-pulse {
        animation: none !important;
        opacity: 1 !important;
    }
}
