/* ============================================
   全局基础与设计系统
   ============================================ */
:root {
    /* 配色方案：深色沉浸背景 + 高饱和强调色 */
    --color-bg-body: #0B0E14;       /* 极深灰，接近纯黑 */
    --color-surface: #151921;       /* 卡片/模块背景 */
    --color-surface-hover: #1C212B; /* 悬停态背景 */
    --color-primary: #FF3B30;       /* 高饱和强调色 (类似 iOS Red) */
    --color-primary-dark: #D70015;  /* 强调色深版 */
    --color-text-main: #EAECEF;     /* 正文文字 */
    --color-text-muted: #848E9C;    /* 次要说明文字 */
    --color-border: rgba(255, 255, 255, 0.08);
    
    /* 排版参数 */
    --font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --container-width: 1200px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg-body);
    color: var(--color-text-main);
    font-family: var(--font-family);
    line-height: 1.8;
    font-size: clamp(14px, 1vw, 16px);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

ul { list-style: none; }

img, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ============================================
   通用布局容器
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 clamp(16px, 5vw, 40px);
}

section {
    padding: clamp(60px, 10vh, 120px) 0;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: clamp(24px, 4vw, 48px);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* ============================================
   页头与页脚
   ============================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background-color: rgba(11, 14, 20, 0.8);
    border-bottom: 1px solid var(--color-border);
    padding: 16px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-img {
    height: 32px;
    width: auto;
}

.main-nav ul {
    display: flex;
    gap: 24px;
}

.main-nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.main-nav a:hover, 
.main-nav a[aria-current="page"] {
    color: var(--color-text-main);
}

.site-footer {
    background-color: #080A0E;
    padding: clamp(40px, 6vw, 60px) 0;
    margin-top: clamp(60px, 10vh, 120px);
    border-top: 1px solid var(--color-border);
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-inner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a:hover {
    color: var(--color-text-main);
}

/* ============================================
   按钮组件
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-1px);
}

/* ============================================
   卡片与通用 UI
   ============================================ */
.card {
    background-color: var(--color-surface);
    border-radius: var(--radius-md);
    padding: clamp(24px, 3vw, 32px);
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--color-border);
    background-color: var(--color-surface-hover);
    transform: translateY(-4px);
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--color-text-main);
}

.card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

/* ============================================
   表单 (FAQ Details/Summary)
   ============================================ */
.faq-item {
    background-color: var(--color-surface);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-item summary {
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 500;
    list-style: none;
    position: relative;
    padding-right: 40px;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--color-text-muted);
    transition: transform 0.3s;
}

.faq-item[open] summary::after {
    content: '-';
    transform: translateY(-50%) rotate(180deg);
}

.faq-item p {
    padding: 0 20px 16px 20px;
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
    margin-top: 0;
    padding-top: 16px;
}

/* ============================================
   表格 (Table)
   ============================================ */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--color-surface);
    text-align: left;
    white-space: nowrap;
}

th, td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--color-border);
}

th {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--color-text-main);
    font-weight: 600;
}

td {
    color: var(--color-text-muted);
}

tr:last-child td {
    border-bottom: none;
}

/* ============================================
   SVG 动效 (CSS Only)
   ============================================ */
@keyframes drawLine {
    0% { stroke-dashoffset: 1; }
    100% { stroke-dashoffset: 0; }
}

@keyframes pulseNode {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; fill: var(--color-primary); }
}

.draw-line {
    pathLength: 1;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
    animation: drawLine 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.5s;
}

.float-node {
    animation: pulseNode 3s infinite alternate ease-in-out;
    animation-delay: 2s;
}

svg {
    overflow: visible;
}

/* ============================================
   无障碍 / 减少动态效果
   ============================================ */
@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;
    }
    .draw-line {
        stroke-dashoffset: 0;
    }
}
