:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --text-main: #1f2937;
    --text-muted: #4b5563;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
    --shadow-md: 0 10px 20px rgba(0,0,0,0.05);
    --transition-base: 0.2s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    color: var(--text-main);
    line-height: 1.7;
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
}

/* ===== 导航（与首页完全一致） ===== */
header {
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
    gap: 1rem;
}

.logo-wrap {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0.5rem;
    flex-shrink: 0;
}

.logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    padding: 0.4rem 0.85rem;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: color var(--transition-base), background-color var(--transition-base);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    background-color: #f0f0ff;
}

.github-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #24292e;
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color var(--transition-base);
    white-space: nowrap;
    flex-shrink: 0;
}

.github-btn:hover {
    background-color: #1a1e22;
}

/* ===== FAQ Hero ===== */
.faq-hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem 2rem;
    text-align: center;
}

.faq-hero h1 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    color: #111827;
    margin-bottom: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.faq-hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

/* ===== 诊断卡片（创意版块） ===== */
.diagnose-cards {
    max-width: 1100px;
    margin: 0 auto 3rem;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.diag-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.8rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.diag-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.diag-icon {
    font-size: 2.2rem;
    margin-bottom: 0.7rem;
    display: block;
}

.diag-card h4 {
    font-size: 1.15rem;
    color: #111827;
    margin-bottom: 0.5rem;
}

.diag-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ===== FAQ 问答区 ===== */
.faq-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 2rem 5rem;
}

.faq-group {
    margin-bottom: 3.5rem;
}

.group-title {
    font-size: 1.4rem;
    color: #111827;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    font-weight: 700;
}

.faq-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base);
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-question {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.faq-q-badge {
    background-color: #fee2e2;
    color: #ef4444;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    line-height: 1.3;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.faq-question h3 {
    font-size: 1.1rem;
    color: #111827;
    font-weight: 600;
    line-height: 1.4;
}

.faq-answer {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding-left: 0.25rem;
}

.faq-a-badge {
    background-color: #dcfce7;
    color: #15803d;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    line-height: 1.3;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.faq-answer p {
    font-size: 0.98rem;
    color: #374151;
    line-height: 1.65;
    text-align: justify;
}

.faq-answer code {
    background-color: #f3f4f6;
    color: #e11d48;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.88rem;
    font-weight: 500;
}

/* ===== 自助排查向导（创意版块） ===== */
.troubleshooter {
    background-color: var(--bg-light);
    max-width: 100%;
    padding: 4rem 2rem;
}

.troubleshooter h3 {
    text-align: center;
    font-size: 1.6rem;
    color: #111827;
    margin-bottom: 2.5rem;
    font-weight: 700;
}

.steps-row {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto;
}

.step {
    flex: 1 1 200px;
    min-width: 200px;
    max-width: 250px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.8rem 1.3rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base);
}

.step:hover {
    box-shadow: var(--shadow-md);
}

.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

.step h4 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    color: #111827;
}

.step p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.step-arrow {
    display: flex;
    align-items: flex-start;
    padding-top: 2rem;
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: bold;
    flex-shrink: 0;
}

/* ===== 页脚（与首页完全一致） ===== */
footer {
    background-color: #111827;
    color: #9ca3af;
    padding: 4rem 2rem 2rem;
    font-size: 0.93rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2.5rem;
    border-bottom: 1px solid #374151;
    padding-bottom: 2rem;
}

.footer-section h4 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.55rem;
}

.footer-section a {
    color: #9ca3af;
    text-decoration: none;
    transition: color var(--transition-base);
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: #6b7280;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 0.8rem;
        padding: 1rem;
    }

    .nav-right {
        flex-direction: column;
        gap: 0.8rem;
        width: 100%;
        align-items: center;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links a {
        margin: 0;
        padding: 0.35rem 0.65rem;
        font-size: 0.9rem;
    }

    .faq-hero h1 {
        font-size: 1.8rem;
    }

    .diagnose-cards {
        grid-template-columns: 1fr;
    }

    .faq-item {
        padding: 1.25rem;
    }

    .steps-row {
        flex-direction: column;
        align-items: center;
    }

    .step-arrow {
        transform: rotate(90deg);
        padding-top: 0;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    section {
        padding: 3rem 1.2rem;
    }
}

@media (max-width: 480px) {
    .faq-section {
        padding: 1.5rem 1rem 3rem;
    }

    .troubleshooter {
        padding: 3rem 1rem;
    }
}