/* ===== 全局变量与主题 ===== */
:root {
    --bg: #f0f4fa;
    --bg-gradient: radial-gradient(ellipse at top left, #e8f0fe, transparent 60%), radial-gradient(ellipse at bottom right, #dbe7f5, transparent 50%);
    --card-bg: rgba(255, 255, 255, 0.82);
    --card-bg-solid: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #334155;
    --text-heading: #0b2239;
    --text-accent: #0a3d62;
    --border-light: rgba(209, 217, 230, 0.7);
    --nav-bg: rgba(255, 255, 255, 0.72);
    --footer-bg: #0f1f2f;
    --footer-text: #e2e8f0;
    --btn-bg: linear-gradient(135deg, #0b3a5c, #1a5a8a);
    --btn-text: #ffffff;
    --shadow: 0 8px 32px rgba(10, 40, 80, 0.08);
    --shadow-hover: 0 16px 40px rgba(10, 40, 80, 0.14);
    --max-width: 1280px;
    --radius: 18px;
    --radius-sm: 12px;
    --section-space: 70px;
    --glass-border: rgba(255, 255, 255, 0.4);
    --accent-glow: rgba(10, 61, 98, 0.08);
    --scrollbar-thumb: #b0c4d9;
    --scrollbar-track: transparent;
    --hero-overlay: linear-gradient(145deg, rgba(11, 34, 57, 0.05), rgba(26, 90, 138, 0.08));
}

[data-theme="dark"] {
    --bg: #0d1520;
    --bg-gradient: radial-gradient(ellipse at top left, #152338, transparent 60%), radial-gradient(ellipse at bottom right, #1a2a3f, transparent 50%);
    --card-bg: rgba(30, 41, 59, 0.78);
    --card-bg-solid: #1e293b;
    --text-primary: #e2e8f0;
    --text-secondary: #cbd5e1;
    --text-heading: #f8fafc;
    --text-accent: #a5c9ff;
    --border-light: rgba(51, 65, 85, 0.6);
    --nav-bg: rgba(13, 21, 32, 0.78);
    --footer-bg: #09111c;
    --footer-text: #cbd5e1;
    --btn-bg: linear-gradient(135deg, #1e4a76, #2d6da3);
    --btn-text: #ffffff;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 16px 40px rgba(0, 0, 0, 0.45);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent-glow: rgba(165, 201, 255, 0.06);
    --scrollbar-thumb: #2d3f50;
    --hero-overlay: linear-gradient(145deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.1));
}

/* ===== 基础重置 ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

body {
    background: var(--bg);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Roboto, 'Helvetica Neue', sans-serif;
    line-height: 1.8;
    transition: background 0.35s ease, color 0.35s ease;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 20%, rgba(10, 61, 98, 0.03), transparent 40%);
    pointer-events: none;
    z-index: 0;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 20px;
}

::selection {
    background: var(--text-accent);
    color: #fff;
}

a {
    color: var(--text-accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
    color: var(--text-heading);
    text-decoration: underline;
}

[data-theme="dark"] a {
    color: #a5c9ff;
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ===== 导航栏 ===== */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border-light);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 20px;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--text-heading), var(--text-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.logo span {
    background: linear-gradient(135deg, #e63946, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.menu {
    display: flex;
    gap: 32px;
    list-style: none;
    align-items: center;
}

.menu a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 6px 2px;
    transition: color 0.2s;
}

.menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--text-accent), #e63946);
    border-radius: 2px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu a:hover {
    color: var(--text-heading);
    text-decoration: none;
}

.menu a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 50px;
    padding: 4px 6px 4px 16px;
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
    backdrop-filter: blur(10px);
}

.search-box:focus-within {
    border-color: var(--text-accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-box input {
    border: none;
    background: transparent;
    padding: 8px 4px;
    color: var(--text-primary);
    outline: none;
    width: 160px;
    font-size: 0.9rem;
    transition: width 0.3s;
}

.search-box input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.search-box input:focus {
    width: 180px;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background 0.2s, transform 0.2s;
    position: relative;
}

.icon-btn:hover {
    background: var(--accent-glow);
    transform: scale(1.05);
}

.mobile-toggle {
    display: none;
}

/* ===== 按钮 ===== */
.btn {
    background: var(--btn-bg);
    color: var(--btn-text);
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 15px rgba(10, 61, 98, 0.2);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(10, 61, 98, 0.3);
}

.btn:hover::before {
    left: 100%;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--text-accent);
    color: var(--text-heading);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--text-accent);
    color: #fff;
    opacity: 1;
    box-shadow: 0 8px 25px rgba(10, 61, 98, 0.2);
}

/* ===== Hero区 ===== */
.hero {
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    pointer-events: none;
}

.hero-grid {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    position: relative;
}

.hero-content {
    flex: 1 1 380px;
    animation: fadeInUp 0.8s ease both;
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-heading);
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-heading) 40%, var(--text-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 600px;
    line-height: 1.8;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #dce7f5, #eef4fb);
    color: var(--text-accent);
    padding: 8px 20px;
    border-radius: 60px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 20px;
    border: 1px solid rgba(10, 61, 98, 0.1);
    backdrop-filter: blur(4px);
}

[data-theme="dark"] .hero-badge {
    background: linear-gradient(135deg, #1e3a5a, #2d4a6e);
    color: #a5c9ff;
    border-color: rgba(165, 201, 255, 0.15);
}

.hero-visual {
    flex: 1 1 300px;
    text-align: center;
    animation: fadeInRight 0.8s ease both 0.1s;
    position: relative;
}

.hero-visual::after {
    content: '';
    position: absolute;
    inset: auto 10% -10% 10%;
    height: 30%;
    background: radial-gradient(ellipse, var(--accent-glow), transparent 70%);
    filter: blur(20px);
    z-index: -1;
}

.hero-visual svg {
    max-width: 100%;
    height: auto;
    border-radius: 24px;
    box-shadow: var(--shadow);
    transition: transform 0.4s ease;
}

.hero-visual:hover svg {
    transform: scale(1.02) rotate(1deg);
}

/* ===== 区块通用 ===== */
.section {
    padding: var(--section-space) 0;
    position: relative;
    animation: fadeInUp 0.6s ease both;
}

.section-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 20px;
    position: relative;
    letter-spacing: -0.02em;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--text-accent), #e63946);
    border-radius: 4px;
}

.section-sub {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 700px;
}

/* ===== 卡片 ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px;
    margin-top: 20px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s, border-color 0.3s;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease both;
    animation-delay: calc(var(--card-index, 0) * 0.08s);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--text-accent), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--text-accent);
}

.card:hover::before {
    opacity: 1;
}

.card h3 {
    font-size: 1.35rem;
    color: var(--text-heading);
    margin-bottom: 12px;
    font-weight: 700;
    transition: color 0.3s;
}

.card:hover h3 {
    color: var(--text-accent);
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.card .meta {
    color: #5b6b7c;
    font-size: 0.85rem;
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card .meta::before {
    content: '📅';
    font-size: 0.9rem;
}

/* ===== 文章列表 ===== */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.article-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px 28px;
    border-left: 4px solid var(--text-accent);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--text-accent);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s;
    animation: fadeInLeft 0.6s ease both;
    position: relative;
    overflow: hidden;
}

.article-item::after {
    content: '';
    position: absolute;
    right: -20px;
    top: -20px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.article-item:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-hover);
    background: var(--card-bg-solid);
}

.article-item:hover::after {
    opacity: 1;
}

.article-item h3 {
    font-size: 1.3rem;
    color: var(--text-heading);
    margin-bottom: 8px;
    font-weight: 700;
    transition: color 0.3s;
}

.article-item:hover h3 {
    color: var(--text-accent);
}

.article-item .sum {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 0.95rem;
    line-height: 1.7;
}

.article-item .meta {
    color: var(--text-secondary);
    font-size: 0.85rem;
    opacity: 0.7;
    margin-right: 16px;
}

.article-item .readmore {
    color: var(--text-accent);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.3s;
}

.article-item .readmore:hover {
    text-decoration: none;
    gap: 10px;
}

/* ===== FAQ ===== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-list details {
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    padding: 18px 24px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    cursor: pointer;
    animation: fadeInUp 0.5s ease both;
    overflow: hidden;
}

.faq-list details:hover {
    border-color: var(--text-accent);
    box-shadow: var(--shadow);
}

.faq-list details[open] {
    background: var(--card-bg-solid);
    border-color: var(--text-accent);
}

.faq-list summary {
    font-weight: 600;
    color: var(--text-heading);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    transition: color 0.3s;
    position: relative;
    padding-right: 30px;
}

.faq-list summary::-webkit-details-marker {
    display: none;
}

.faq-list summary::before {
    content: 'Q';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--text-accent), #e63946);
    color: #fff;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.faq-list summary::after {
    content: '+';
    position: absolute;
    right: 0;
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--text-accent);
    transition: transform 0.3s;
}

.faq-list details[open] summary::after {
    transform: rotate(45deg);
}

.faq-list details[open] summary {
    color: var(--text-accent);
}

.faq-list p {
    color: var(--text-secondary);
    margin-top: 14px;
    padding-left: 40px;
    line-height: 1.8;
    font-size: 0.95rem;
    animation: fadeIn 0.3s ease;
}

/* ===== 教程区块 ===== */
.howto-box {
    background: var(--card-bg);
    padding: 36px;
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.howto-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
}

.howto-box h3 {
    color: var(--text-heading);
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.howto-box ol {
    color: var(--text-secondary);
    margin-left: 20px;
    line-height: 2.2;
    counter-reset: step;
    list-style: none;
}

.howto-box ol li {
    counter-increment: step;
    position: relative;
    padding-left: 40px;
    margin-bottom: 8px;
    transition: transform 0.2s;
}

.howto-box ol li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 4px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--text-accent), #e63946);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.howto-box ol li:hover {
    transform: translateX(4px);
}

.howto-box ol li strong {
    color: var(--text-heading);
}

/* ===== 表格 ===== */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    border-radius: var(--radius);
    overflow: hidden;
    min-width: 600px;
}

th, td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.95rem;
}

th {
    background: linear-gradient(135deg, #e6edf5, #dce7f5);
    color: var(--text-heading);
    font-weight: 600;
    letter-spacing: 0.02em;
}

[data-theme="dark"] th {
    background: linear-gradient(135deg, #1f2e4a, #243650);
    color: #f1f5f9;
}

tbody tr {
    transition: background 0.2s;
}

tbody tr:hover {
    background: var(--accent-glow);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* ===== Banner占位 ===== */
.banner-place {
    background: linear-gradient(145deg, #0b2239, #1e3b5a, #2d4a6e);
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
    color: white;
    padding: 40px;
    border-radius: 28px;
    position: relative;
    overflow: hidden;
}

.banner-place::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent 70%);
    transform: rotate(20deg);
}

.banner-place h2 {
    color: white;
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.banner-place p {
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
}

/* ===== 徽章 & 状态 ===== */
.badge {
    background: linear-gradient(135deg, var(--text-accent), #1a5a8a);
    color: white;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(10, 61, 98, 0.2);
}

.stat {
    font-weight: 800;
    font-size: 2.2rem;
    color: var(--text-heading);
    line-height: 1.2;
    background: linear-gradient(135deg, var(--text-heading), var(--text-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== 页脚 ===== */
.footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 60px 0 20px;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #e63946, var(--text-accent), transparent);
}

.footer a {
    color: #cbd5e1;
    transition: color 0.3s, padding-left 0.3s;
}

.footer a:hover {
    color: #fff;
    text-decoration: none;
    padding-left: 4px;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer h4 {
    color: #ffffff;
    margin-bottom: 16px;
    font-size: 1.05rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
}

.footer h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, #e63946, transparent);
}

.footer-columns p {
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 2;
}

.footer .copyright {
    border-top: 1px solid #2d3f50;
    padding-top: 24px;
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #b0c4d9;
    line-height: 1.8;
}

/* ===== 返回顶部 ===== */
#backTop {
    position: fixed;
    right: 24px;
    bottom: 24px;
    background: var(--btn-bg);
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 20px;
    cursor: pointer;
    z-index: 100;
    display: none;
    box-shadow: 0 4px 20px rgba(10, 61, 98, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#backTop:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 30px rgba(10, 61, 98, 0.4);
}

/* ===== 工具类 ===== */
.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 30px;
}

.mt-4 {
    margin-top: 40px;
}

.mb-2 {
    margin-bottom: 20px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.svg-icon {
    width: 48px;
    height: 48px;
}

/* ===== 滚动动画 ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* 滚动观察动画 */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .section {
        --section-space: 55px;
    }
}

@media (max-width: 820px) {
    .nav-inner {
        flex-wrap: wrap;
        padding: 10px 0;
    }
    
    .menu {
        display: none;
        flex-direction: column;
        gap: 12px;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--card-bg);
        padding: 24px;
        box-shadow: var(--shadow-hover);
        border-radius: 0 0 24px 24px;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        z-index: 99;
        border-bottom: 1px solid var(--border-light);
        max-height: 70vh;
        overflow-y: auto;
    }
    
    .menu.open {
        display: flex;
        animation: fadeInDown 0.3s ease;
    }
    
    .menu a {
        padding: 10px 0;
        font-size: 1.05rem;
        border-bottom: 1px solid var(--border-light);
    }
    
    .menu a:last-child {
        border-bottom: none;
    }
    
    .menu a::after {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .search-box input {
        width: 100px;
        transition: width 0.3s;
    }
    
    .search-box input:focus {
        width: 140px;
    }
    
    .hero {
        padding: 50px 0 40px;
    }
    
    .hero-grid {
        gap: 30px;
    }
    
    .hero-visual {
        flex-basis: 100%;
    }
    
    .hero-visual svg {
        max-width: 280px;
        margin: 0 auto;
    }
    
    .section-title {
        font-size: 1.7rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .article-item {
        padding: 20px;
    }
    
    .article-item:hover {
        transform: translateX(4px);
    }
    
    .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .hero-content .btn {
        margin-bottom: 10px;
    }
    
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .howto-box {
        padding: 24px;
    }
    
    .howto-box ol li {
        padding-left: 36px;
    }
    
    .search-box {
        display: none;
    }
    
    .nav-actions {
        gap: 8px;
    }
    
    .banner-place {
        padding: 28px;
    }
    
    .stat {
        font-size: 1.8rem;
    }
}

/* ===== 打印样式 ===== */
@media print {
    .nav, .footer, #backTop, .search-box, .icon-btn {
        display: none !important;
    }
    
    body {
        background: #fff;
        color: #000;
    }
    
    .card, .article-item, .faq-list details {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ===== 无障碍支持 ===== */
@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;
    }
}

/* 焦点可见性 */
:focus-visible {
    outline: 3px solid var(--text-accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== 额外优化 ===== */
.section:nth-child(even) {
    background: linear-gradient(180deg, var(--accent-glow), transparent);
}

.card-grid .card:nth-child(1) { --card-index: 0; }
.card-grid .card:nth-child(2) { --card-index: 1; }
.card-grid .card:nth-child(3) { --card-index: 2; }
.card-grid .card:nth-child(4) { --card-index: 3; }
.card-grid .card:nth-child(5) { --card-index: 4; }
.card-grid .card:nth-child(6) { --card-index: 5; }
.card-grid .card:nth-child(7) { --card-index: 6; }
.card-grid .card:nth-child(8) { --card-index: 7; }

/* 链接下划线动画 */
a:not(.btn):not(.readmore) {
    position: relative;
}

/* 图片圆角 */
.hero-visual img,
.card img {
    border-radius: var(--radius);
}

/* 文本溢出 */
.text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 间距工具 */
.py-1 { padding-top: 10px; padding-bottom: 10px; }
.py-2 { padding-top: 20px; padding-bottom: 20px; }
.py-3 { padding-top: 30px; padding-bottom: 30px; }
.py-4 { padding-top: 40px; padding-bottom: 40px; }

/* 暗色适配细节 */
[data-theme="dark"] .card,
[data-theme="dark"] .article-item,
[data-theme="dark"] .howto-box,
[data-theme="dark"] .faq-list details {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .hero-badge,
[data-theme="dark"] .badge {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

/* 悬停微动效 */
.btn, .icon-btn, .card, .article-item, .faq-list details {
    will-change: transform;
}

/* 加载更多按钮样式 */
.load-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    padding: 12px 30px;
    background: transparent;
    border: 2px solid var(--text-accent);
    color: var(--text-accent);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.load-more:hover {
    background: var(--text-accent);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--accent-glow);
}