/* ============================================
   纸飞机常见问题 - 主样式表 (faq.css)
   版本: 2.0 | 设计理念: 清晰·分类·速查
   ============================================ */

/* ---------- 设计令牌 (品牌统一) ---------- */
:root {
    --primary-color: #24A1DE;
    --primary-dark: #1a7faf;
    --primary-light: #e8f6fd;
    --dark-color: #1a1a2e;
    --text-color: #4A4A4A;
    --text-muted: #7a7a8a;
    --light-bg: #F4F6F9;
    --card-bg: #ffffff;
    --border-color: #E2E8F0;
    --border-light: #f0f2f5;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.10);
    --shadow-primary: 0 8px 24px rgba(36, 161, 222, 0.18);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --content-max-width: 900px;
    --nav-max-width: 1200px;
}

/* ---------- 全局重置 ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    font-size: 16px;
}

body {
    font-family: var(--font-stack);
    color: var(--text-color);
    line-height: 1.8;
    background-color: #ffffff;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---------- 导航栏 ---------- */
header {
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.92);
    z-index: 1000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: var(--nav-max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    gap: 20px;
}

.logo a {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 9px;
    letter-spacing: -0.3px;
    transition: opacity var(--transition-fast);
    white-space: nowrap;
}

.logo a:hover {
    opacity: 0.82;
}

.logo img {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    font-size: 15px;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

.nav-links a.active {
    color: #ffffff;
    background-color: var(--primary-color);
    font-weight: 600;
    box-shadow: var(--shadow-primary);
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
    max-width: var(--nav-max-width);
    margin: 12px auto 0;
    padding: 0 24px;
    font-size: 13px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb a {
    color: #777;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb span {
    color: #555;
    font-weight: 500;
}

/* ---------- FAQ 容器 ---------- */
.faq-container {
    max-width: var(--content-max-width);
    margin: 40px auto 50px;
    padding: 0 24px;
}

.faq-header {
    text-align: center;
    margin-bottom: 40px;
}

.faq-header h1 {
    font-size: 34px;
    color: var(--dark-color);
    margin-bottom: 15px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #1a1a2e 0%, #24A1DE 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.faq-header p {
    font-size: 16px;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

/* ---------- 搜索框装饰 ---------- */
.faq-search-area {
    margin-bottom: 30px;
    background: var(--light-bg);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    border: 1px solid var(--border-light);
}

.fake-search-box {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 10px 18px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    cursor: text;
}

.search-icon {
    font-size: 16px;
    margin-right: 10px;
    opacity: 0.5;
}

.fake-search-box input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 14px;
    color: #aaa;
    background: transparent;
    pointer-events: none;
}

.hot-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: #888;
}

.hot-tags span {
    font-weight: 600;
    color: #555;
    margin-right: 4px;
}

.hot-tags a {
    background: #fff;
    padding: 5px 14px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 12px;
    border: 1px solid #e0e8f0;
    transition: all var(--transition-fast);
}

.hot-tags a:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* ---------- 分类导航按钮 ---------- */
.faq-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 35px;
    justify-content: center;
}

.cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    background: #fff;
    color: #555;
    border: 1px solid var(--border-color);
    transition: all var(--transition-smooth);
    scroll-behavior: smooth;
}

.cat-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.cat-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-primary);
}

/* ---------- FAQ 分组 ---------- */
.faq-group {
    margin-bottom: 10px;
    scroll-margin-top: 100px;
}

.group-title {
    font-size: 22px;
    color: var(--dark-color);
    margin: 40px 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-light);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---------- FAQ 单项 ---------- */
.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px 24px 20px;
    margin-bottom: 20px;
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-smooth);
    scroll-margin-top: 100px;
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.faq-item h2 {
    font-size: 19px;
    color: var(--dark-color);
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.5;
    font-weight: 700;
}

.q-mark {
    background: var(--primary-color);
    color: #fff;
    min-width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 15px;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(36, 161, 222, 0.2);
}

.faq-answer {
    color: #555;
    font-size: 15px;
    padding-left: 40px;
    line-height: 1.8;
}

.faq-answer p {
    margin-bottom: 12px;
    text-align: justify;
}

.faq-answer ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.faq-answer li {
    margin-bottom: 8px;
}

.faq-answer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dashed var(--primary-color);
}

.faq-answer a:hover {
    color: var(--primary-dark);
    border-bottom-style: solid;
}

.faq-answer strong {
    color: #333;
    font-weight: 700;
}

/* ---------- 高亮提示框 ---------- */
.highlight-box {
    background: #fffdf5;
    border-left: 4px solid #e67e22;
    padding: 16px 20px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 16px 0;
    font-size: 14px;
    color: #6d4c00;
    line-height: 1.7;
}

.highlight-box strong {
    color: #c0392b;
}

/* ---------- 底部 CTA ---------- */
.faq-footer-cta {
    text-align: center;
    margin-top: 40px;
    padding: 24px;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    color: #555;
    font-size: 15px;
}

.faq-footer-cta a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.faq-footer-cta a:hover {
    text-decoration: underline;
}

/* ---------- 页脚 ---------- */
footer {
    background-color: var(--dark-color);
    color: #b0b0b8;
    padding: 44px 24px 28px;
    font-size: 14px;
    border-top: 3px solid var(--primary-color);
    margin-top: 40px;
}

.footer-container {
    max-width: var(--nav-max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 36px;
}

.footer-info {
    flex: 1.3;
    min-width: 260px;
}

.footer-info h4,
.footer-links h4 {
    color: #e8e8ec;
    margin-bottom: 14px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.2px;
    position: relative;
    padding-bottom: 10px;
}

.footer-info h4::after,
.footer-links h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 28px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
}

.footer-links {
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer-links a {
    color: #b0b0b8;
    text-decoration: none;
    font-size: 13px;
    transition: all var(--transition-fast);
    padding: 2px 0;
    display: inline-block;
    width: fit-content;
}

.footer-links a:hover {
    color: #ffffff;
    padding-left: 6px;
}

.copyright {
    width: 100%;
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    color: #777;
    letter-spacing: 0.3px;
}

/* ---------- 响应式设计 ---------- */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 10px;
        padding: 10px 16px;
    }
    .nav-links {
        gap: 4px;
        justify-content: center;
    }
    .nav-links a {
        font-size: 13px;
        padding: 6px 12px;
    }
    .logo a {
        font-size: 18px;
    }

    .faq-header h1 {
        font-size: 24px;
    }
    .faq-item h2 {
        font-size: 17px;
    }
    .faq-answer {
        padding-left: 0;
    }
    .q-mark {
        min-width: 24px;
        height: 24px;
        font-size: 13px;
    }

    .faq-categories {
        gap: 6px;
    }
    .cat-btn {
        padding: 8px 14px;
        font-size: 12px;
    }
}

/* ---------- 动画 ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.faq-item {
    animation: fadeInUp 0.4s ease backwards;
}
.faq-item:nth-child(1) { animation-delay: 0.05s; }
.faq-item:nth-child(2) { animation-delay: 0.1s; }
.faq-item:nth-child(3) { animation-delay: 0.15s; }
.faq-item:nth-child(4) { animation-delay: 0.2s; }
.faq-item:nth-child(5) { animation-delay: 0.25s; }

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}