:root {
    --bg-light: #f7f9fc;
    --bg-accent: #eef3ff;
    --primary: #6c63ff;
    --primary-dark: #5b54ff;
    --text: #333;
    --card-bg: #ffffff;
    --radius: 14px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-light);
    background-image: radial-gradient(circle at 25px 25px, var(--bg-accent) 1px, transparent 0);
    background-size: 50px 50px; /* 轻量点阵图案 */
    background-attachment: fixed; /* 视差感 */
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

header {
    position: sticky;
    top: 0;
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 24px 20px 0;
    text-align: center;
    z-index: 10;
    box-shadow: var(--shadow);
    overflow: hidden;
}

header h1 {
    margin: 0 0 16px;
    font-size: 1.8rem;
    letter-spacing: 0.05em;
}

/* 顶部类型切换 */
.type-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding-bottom: 20px;
}

.tab {
    padding: 6px 14px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background 0.25s ease;
}

.tab.active {
    background: #fff;
    color: var(--primary);
    font-weight: 600;
    cursor: default;
}

.tab:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 波浪 SVG */
.header-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 60px;
}

.header-wave path {
    fill: var(--bg-light);
}

main {
    padding: 40px 16px 80px; /* 为底部按钮留空间 */
    max-width: 720px;
    margin: 0 auto;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    overflow: hidden;
    padding-bottom: 10px;
}

.card-header {
    margin: 0;
    padding: 20px 16px 12px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    text-align: left;
}

.card-content {
    padding: 0 16px 16px;
    line-height: 1.7em;
    font-size: 0.95rem;
    text-align: left;
}

.card p {
    margin: 0 0 1em;
}

.card ul {
    margin: 0 0 1em 1.2em;
    padding: 0;
}

/* 引用块样式 */
blockquote { /* 引用样式 */
    margin: 0 0 1.2em;
    padding: 14px 20px;
    background: var(--bg-accent);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    font-style: italic;
    color: #555;
}

/* Callout 提示框 */
.callout {
    margin: 0 0 1.2em;
    padding: 16px 20px;
    background: #fffbe6;
    border-left: 4px solid #f5c842;
    border-radius: var(--radius);
    color: #664d03;
    font-weight: 500;
}

/* Q&A 样式 */
.qna p {
    margin-bottom: 0.8em;
}

.qna strong {
    display: block;
    color: var(--primary);
    margin-bottom: 4px;
}

/* 分享按钮 */
.share-btn {
    position: fixed;
    right: 16px;
    bottom: 24px;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 0.9rem;
    box-shadow: var(--shadow);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.2s ease;
}

.share-btn:active {
    transform: scale(0.95);
}

footer {
    text-align: center;
    padding: 40px 0 20px;
    font-size: 0.8rem;
    color: #888;
}

/* 响应式调整 */
@media (min-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .card-header {
        font-size: 1.35rem;
    }
}