/* 设计变量与基础重置 */
:root {
    /* 颜色体系 */
    --color-dark-bg: #1B1231;
    --color-paper-bg: #DBD4ED;
    --color-text-body: #191523;
    --color-brand: #5214EB;
    --color-accent: #9977EE;
    
    /* 结构变量 */
    --radius-card: 24px;
    --radius-btn: 999px;
    --card-border: 2px solid var(--color-text-body);
    --card-shadow: 4px 4px 0 var(--color-text-body);
    --section-y: clamp(2.5rem, 5vw, 4rem);
    --gap: clamp(0.75rem, 1.5vw, 1.25rem);
    --content-max: 1280px;
    
    /* 排版变量 */
    --font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.55;
    color: var(--color-text-body);
    background-color: var(--color-paper-bg);
    -webkit-font-smoothing: antialiased;
}

/* 容器与布局 */
.container {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--gap);
}

section {
    padding-top: var(--section-y);
    padding-bottom: var(--section-y);
}

/* 页面背景切换 */
.bg-dark {
    background-color: var(--color-dark-bg);
    color: var(--color-paper-bg);
}

.bg-dark .hl {
    color: var(--color-accent);
}

.bg-dark .brand-tag {
    color: var(--color-accent);
}

.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark p, .bg-dark li {
    color: var(--color-paper-bg);
}

/* 标题系统 */
h1, h2, h3, h4 {
    font-weight: 500;
    line-height: 1.15;
    margin-top: 0;
    margin-bottom: var(--gap);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.6rem, 6.4vw, 5rem);
}

h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
}

h3 {
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
}

.hl {
    color: var(--color-brand);
}

.brand-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 0.5em;
    color: var(--color-brand);
    text-transform: uppercase;
}

/* 按钮系统 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 24px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-btn);
    transition: transform 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
    gap: 8px;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-dark-bg);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text-body);
    border: 2px solid var(--color-text-body);
}

.bg-dark .btn-secondary {
    color: var(--color-paper-bg);
    border-color: var(--color-paper-bg);
}

.btn:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

/* 卡片系统 */
.card {
    background: var(--color-paper-bg);
    border: var(--card-border);
    border-radius: var(--radius-card);
    box-shadow: var(--card-shadow);
    padding: var(--gap);
    position: relative;
}

.bg-dark .card {
    background: #2A1F42; /* Slightly lighter dark for card surface */
    border-color: rgba(255,255,255,0.2);
    box-shadow: 4px 4px 0 rgba(255,255,255,0.1);
    color: var(--color-paper-bg);
}

/* 表格系统 */
.table-wrapper {
    overflow-x: auto;
    border: var(--card-border);
    border-radius: var(--radius-card);
    background: var(--color-paper-bg);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th, td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

th {
    font-weight: 700;
    background: rgba(0,0,0,0.03);
}

td:first-child {
    font-weight: 600;
    width: 30%;
}

/* FAQ 系统 */
details {
    border: var(--card-border);
    border-radius: var(--radius-card);
    margin-bottom: 16px;
    background: var(--color-paper-bg);
    overflow: hidden;
}

summary {
    padding: 16px 24px;
    cursor: pointer;
    font-weight: 600;
    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: 300;
    transition: transform 0.3s ease;
}

details[open] summary::after {
    transform: rotate(45deg);
}

details[open] summary {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    background: rgba(0,0,0,0.02);
}

.detail-content {
    padding: 16px 24px;
    line-height: 1.6;
}

/* 页头与页脚 */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(219, 212, 237, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.bg-dark header {
    background: rgba(27, 18, 49, 0.9);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo img {
    height: 32px;
    width: auto;
    vertical-align: middle;
}

nav ul {
    display: flex;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav a {
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

nav a:hover, nav a[aria-current="page"] {
    color: var(--color-brand);
}

.bg-dark nav a:hover, .bg-dark nav a[aria-current="page"] {
    color: var(--color-accent);
}

footer {
    padding: 48px 0;
    border-top: 1px solid rgba(0,0,0,0.1);
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* SVG 动效 Keyframes */
@keyframes dash-flow {
    from { stroke-dashoffset: 1; }
    to { stroke-dashoffset: 0; }
}

@keyframes float-bubble {
    0%, 100% { transform: translateY(0); opacity: 0.8; }
    50% { transform: translateY(-6px); opacity: 1; }
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

@keyframes slide-in-right {
    from { transform: translateX(20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* SVG 类名 */
.svg-path-draw {
    pathLength: 1;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
    animation: dash-flow 2s ease forwards;
}

.svg-float-1 {
    animation: float-bubble 3s ease-in-out infinite;
}

.svg-float-2 {
    animation: float-bubble 3.5s ease-in-out infinite 0.5s;
}

.svg-pulse {
    transform-box: fill-box;
    transform-origin: center;
    animation: pulse-dot 2s ease-in-out infinite;
}

.svg-slide {
    opacity: 0;
    animation: slide-in-right 1s ease forwards 0.5s;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .grid-3 {
        grid-template-columns: 1fr !important;
    }
    
    .hero-layout {
        flex-direction: column-reverse !important;
        text-align: center;
    }
    
    .hero-layout .text-col {
        margin-top: 32px;
    }
    
    nav ul {
        display: none; /* Simplified for this task, usually hamburger menu */
    }
}

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    svg {
        display: none; /* Hide decorative SVGs if motion is reduced */
    }
    .svg-slide {
        opacity: 1;
    }
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--gap);
}

.hero-layout {
    display: flex;
    align-items: center;
    gap: 48px;
}

.text-col {
    flex: 1;
    min-width: 0;
}

.visual-col {
    flex: 1;
}

.step-list {
    counter-reset: step;
    list-style: none;
    padding: 0;
}

.step-list li {
    position: relative;
    padding-left: 48px;
    margin-bottom: 24px;
}

.step-list li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    background: var(--color-accent);
    color: var(--color-dark-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* 兜底：裁掉横向溢出 */
div.hero-layout {
  overflow-x: clip;
}
