:root {
    --primary: #2563eb;
    --primary-grad: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --success: #10b981;
    --error: #ef4444;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-page: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --border-color: #e2e8f0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    background: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- 菜单 --- */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.5px;
}
.logo span {
    background: var(--primary-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.logo svg { color: var(--primary); }

/* --- 导航栏 (适配移动端) --- */
.nav-links {
    display: flex;
    gap: 8px;
    /*gap: 32px;*/
    list-style: none;
    /*align-items: center;*/
}
.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 10px;
    /*border: 1px solid transparent;*/
    transition: var(--transition);
}
.nav-links a:hover {
    background: var(--primary-light);
    color: var(--primary);
}
.nav-links a.active {
    color: var(--primary);
    background: var(--primary-light);
    border: 1px solid rgba(37, 99, 235, 0.1);
}

/* 移动端汉堡图标 */
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; border-radius: 8px; }
.menu-toggle:active { background: var(--primary-light); }

/* --- 移动端专用菜单样式 --- */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-links {
        position: fixed; top: 0; right: -100%; width: 280px; height: 100vh;
        background: var(--white); flex-direction: column; padding: 80px 20px;
        gap: 0; /* 移动端垂直排列，间距通过边距控制 */
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 30px rgba(0,0,0,0.05);
    }
    .nav-links.active { right: 0; }
     /*移动端垂直列表边框优化：只设置底部，且最后一个去掉，防止重叠*/
    .nav-links li { width: 100%; border-bottom: 1px solid var(--border-color); }
    .nav-links li:last-child { border-bottom: none; }
    .nav-links a { display: block; width: 100%; padding: 16px; border: none !important; border-radius: 0; text-align: left; }

    .compare-grid { grid-template-columns: 1fr !important; }
    .card { padding: 24px !important; border-radius: 12px !important; }

    .footer-grid { grid-template-columns: 1fr; text-align: center; }
}

/* --- 主体内容区 --- */
main { flex: 1; max-width: 1000px; margin: 48px auto; width: 100%; padding: 0 24px; }
/*main { max-width: 1100px; margin: 0 auto; padding: 0 20px 80px; }*/

.card {
    background: var(--white);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.section-title { font-size: 1.8rem; font-weight: 700; margin-bottom: 12px; color: var(--text-main); text-align: center;}
.section-desc { color: var(--text-muted); text-align: center; margin-bottom: 32px; font-size: 1rem; }

/* 输入与验证样式 */
.form-group { margin-bottom: 24px; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
input[type="text"] {
    width: 100%; padding: 14px 18px; border: 1.5px solid #e2e8f0; border-radius: 12px;
    font-size: 1rem; outline: none; transition: var(--transition); background: #fcfdfe;
}
input[type="text"]:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }

/* 验证方式卡片 */
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 32px; }
.method-item {
    border: 1.5px solid #e2e8f0; padding: 20px; border-radius: 16px; cursor: pointer; transition: var(--transition); background: var(--white);
}
.method-item:hover { border-color: #cbd5e1; transform: translateY(-2px); }
.method-item.active { border-color: var(--primary); background: var(--primary-light); }
.method-item h4 { margin-bottom: 6px; font-size: 1rem; }
.method-item p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.4; }

.btn {
    width: 100%; padding: 16px; border: none; border-radius: 14px; font-weight: 600;
    cursor: pointer; transition: var(--transition); font-size: 1rem;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3); }

/* --- 底部菜单 --- */
footer {
    background: var(--white);
    padding: 64px 24px 32px;
    border-top: 1px solid #e2e8f0;
    margin-top: 80px;
}
.footer-container { max-width: 1100px; margin: 0 auto; }
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}
.footer-brand p { margin-top: 12px; color: var(--text-muted); font-size: 0.95rem; max-width: 280px; }
.footer-heading {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-main);
    margin-bottom: 20px;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links a {
    text-decoration: none; color: var(--text-muted);
    font-size: 0.95rem; transition: var(--transition);
}
.footer-links a:hover { color: var(--primary); padding-left: 4px; }

.footer-bottom {
    padding-top: 32px; border-top: 1px solid #f1f5f9;
    text-align: center; color: var(--text-muted); font-size: 0.85rem;
}

/* 验证遮罩层 */
#overlay {
    display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px); z-index: 1000; flex-direction: column;
    align-items: center; justify-content: center; color: #fff;
}
.spinner {
    width: 48px; height: 48px; border: 4px solid rgba(255,255,255,0.2);
    border-top: 4px solid #fff; border-radius: 50%; animation: spin 0.8s linear infinite;
    margin-bottom: 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 证书显示增强 */
.cert-area { margin-top: 32px; }
textarea {
    width: 100%; height: 220px; font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 12px; padding: 20px; border-radius: 16px; border: 1.5px solid #e2e8f0;
    background: #f8fafc; resize: none; color: #334155; line-height: 1.6;
}
textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }
.cert-label-row { display: flex; justify-content: space-between; margin-bottom: 8px; align-items: flex-end; }

/* 页面切换动画 */
.step-page { display: none; animation: fadeIn 0.4s ease; }
.step-page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
    .compare-grid, .footer-grid { grid-template-columns: 1fr 1fr; }
    .method-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; } /* 移动端可隐藏或改为汉堡菜单 */
}

/* 透明毛玻璃提示框样式 */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

.toast-item {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.7); /* 半透明背景 */
    backdrop-filter: blur(10px);         /* 毛玻璃效果 */
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-main);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-item.show {
    opacity: 1;
    transform: translateY(0);
}

/* 成功状态样式 */
.toast-success {
    border-left: 4px solid #10b981;
}

/* 错误状态样式 */
.toast-error {
    border-left: 4px solid #ef4444;
}

/* 阅读进度条 */
.progress-container { position: fixed; top: 0; z-index: 1001; width: 100%; height: 4px; background: transparent; }
.progress-bar { height: 4px; background: var(--primary); width: 0%; }


/* 文章布局 */
.article-layout {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

.article-main {
    background: var(--white);
    border-radius: 24px;
    border: 1px solid var(--border);
    padding: 48px;
    box-shadow: var(--shadow);
    min-width: 0;
}

.breadcrumb { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 24px; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }

.post-header h1 { font-size: 2.2rem; line-height: 1.3; margin-bottom: 20px; letter-spacing: -0.5px; }
.post-header .post-meta { display: flex; gap: 15px; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 40px; border-bottom: 1px solid var(--bg-page); padding-bottom: 20px; }

/* 正文内容 */
.post-content h2 { font-size: 1.6rem; margin: 40px 0 20px; color: var(--text-main); border-left: 4px solid var(--primary); padding-left: 15px; }
.post-content h3 { font-size: 1.3rem; margin: 30px 0 15px; }
.post-content p { margin-bottom: 20px; font-size: 1.05rem; }
.post-content b { color: var(--text-main); font-weight: 600; }

.post-content pre {
    margin: 24px 0;
    border-radius: 12px;
    overflow-x: auto;
    background: #0d1117;
    padding: 16px;
    font-size: 0.95rem;
}

.post-content pre code {
    color: var(--white);
    font-family: 'Fira Code', monospace;
}

.post-content blockquote {
    border-left: 4px solid var(--primary);
    background: var(--bg-page);
    padding: 20px;
    margin: 30px 0;
    border-radius: 0 12px 12px 0;
}

.info-box {
    background: var(--primary-light);
    border-left: 4px solid var(--primary);
    padding: 20px;
    margin: 30px 0;
    border-radius: 0 12px 12px 0;
    font-size: 0.95rem;
}



/* 侧边栏 */
.sidebar-sticky { position: sticky; top: 104px; display: flex; flex-direction: column; gap: 24px; }
.sidebar-box { background: var(--white); border-radius: 20px; padding: 24px; border: 1px solid var(--border); }
.sidebar-box h4 { margin-bottom: 15px; font-size: 1rem; }
#toc-container ul { list-style: none; padding-left: 0; }
#toc-container li { margin-bottom: 10px; font-size: 0.9rem; }
#toc-container a { color: var(--text-muted); text-decoration: none; transition: 0.3s; }
#toc-container a:hover { color: var(--primary); }

/* 响应式补丁 */
@media (max-width: 992px) {
    .article-layout { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .article-main { padding: 32px 20px; border-radius: 12px; }
}

/* FAQ 排版 */
.faq-section { margin-top: 40px; }
.faq-item { margin-bottom: 40px; }
.faq-item h2 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-main);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.faq-item h2::before { content: "Q:"; color: var(--primary); font-weight: 800; }

.solution-box {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 24px;
    margin-top: 15px;
    border-left: 4px solid var(--primary);
}
.solution-box h4 { margin-bottom: 10px; color: var(--text-main); font-size: 1rem; }

.error-msg { color: var(--error); font-family: monospace; font-weight: 600; background: #fee2e2; padding: 2px 6px; border-radius: 4px; }