/* ============================================
   纸飞机下载教程页 - 主样式表 (download.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);
    transition: box-shadow var(--transition-smooth);
}

.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);
    position: relative;
    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;
}

/* ---------- 下载页Hero ---------- */
.download-hero {
    text-align: center;
    padding: 50px 24px 30px;
    background: linear-gradient(135deg, #f0f8fd 0%, #ffffff 100%);
    border-bottom: 1px solid var(--border-light);
}

.download-hero 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 80%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.download-hero p {
    font-size: 16px;
    color: #6b7280;
    max-width: 780px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ---------- 三步下载引导 (创意板块) ---------- */
.steps-overview {
    max-width: var(--nav-max-width);
    margin: 30px auto 10px;
    padding: 0 24px;
}

.steps-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 28px 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.step-item {
    text-align: center;
    flex: 1;
    min-width: 140px;
    padding: 10px;
    transition: transform var(--transition-smooth);
}

.step-item:hover {
    transform: translateY(-4px);
}

.step-number {
    display: inline-block;
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-color);
    background: var(--primary-light);
    width: 50px;
    height: 50px;
    line-height: 50px;
    border-radius: 50%;
    margin-bottom: 12px;
    letter-spacing: 0;
}

.step-item h4 {
    font-size: 17px;
    color: var(--dark-color);
    margin-bottom: 6px;
    font-weight: 700;
}

.step-item p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.step-arrow {
    font-size: 24px;
    color: #ccc;
    font-weight: 300;
    display: flex;
    align-items: center;
}

/* ---------- 下载卡片容器 ---------- */
.dl-section-container {
    max-width: var(--nav-max-width);
    margin: 40px auto;
    padding: 0 24px;
}

.dl-row {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-bottom: 60px;
}

.dl-box {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    background: var(--card-bg);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 28px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

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

/* 下载卡片左侧装饰条 */
.dl-box::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    height: 70%;
    width: 4px;
    background: var(--primary-color);
    border-radius: 0 4px 4px 0;
    opacity: 0.6;
    transition: opacity var(--transition-smooth);
}

.dl-box:hover::before {
    opacity: 1;
}

.dl-info {
    flex: 2;
    min-width: 300px;
}

.dl-info h2 {
    font-size: 24px;
    color: var(--dark-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.dl-info h2 img {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.dl-info > p {
    color: #555;
    margin-bottom: 18px;
    line-height: 1.7;
    font-size: 15px;
}

/* 安装小贴士 */
.install-tips {
    background: #f8fafc;
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 18px;
    border: 1px solid var(--border-light);
}

.badge {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

.install-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.install-tips li {
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
    padding-left: 16px;
    position: relative;
}

.install-tips li::before {
    content: '💡';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 11px;
}

.install-tips strong {
    color: #333;
}

/* 元信息列表 */
.meta-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px dashed var(--border-light);
    padding-top: 14px;
}

.meta-list li {
    font-size: 13px;
    margin-bottom: 8px;
    color: #666;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.meta-list li span:first-child {
    color: #888;
    font-weight: 500;
}

.meta-list li span:last-child {
    font-weight: 600;
    color: #333;
    background: #f1f5f9;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
}

/* 下载按钮区域 */
.dl-action {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.btn-main {
    display: block;
    background: var(--primary-color);
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: all var(--transition-smooth);
    text-align: center;
    width: 100%;
    box-shadow: 0 6px 18px rgba(36, 161, 222, 0.25);
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn-main::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn-main:hover {
    background: var(--primary-dark);
    box-shadow: 0 10px 28px rgba(36, 161, 222, 0.35);
    transform: translateY(-2px);
}

.btn-main:hover::after {
    opacity: 1;
}

.btn-main:active {
    transform: translateY(0);
}

.btn-sub {
    display: block;
    background: #ffffff;
    color: #555;
    padding: 10px 18px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition-smooth);
    text-align: center;
    width: 100%;
    border: 1px solid #ddd;
}

.btn-sub:hover {
    background: var(--light-bg);
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.hash-hint {
    font-size: 11px;
    color: #aaa;
    margin-top: 4px;
    word-break: break-all;
    text-align: center;
}

/* ---------- 安全须知创意板块 ---------- */
.safety-notice {
    max-width: var(--nav-max-width);
    margin: 0 auto 40px;
    padding: 0 24px;
}

.notice-card {
    background: linear-gradient(135deg, #fff9f0, #ffffff);
    border: 1px solid #ffe4c4;
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    box-shadow: var(--shadow-md);
    position: relative;
}

.notice-icon {
    font-size: 40px;
    position: absolute;
    top: -20px;
    left: 28px;
    background: #fff;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.notice-card h3 {
    font-size: 20px;
    color: var(--dark-color);
    margin: 0 0 15px 0;
    padding-left: 50px;
    font-weight: 700;
}

.notice-card > p {
    color: #555;
    margin-bottom: 18px;
    padding-left: 50px;
    line-height: 1.7;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    padding-left: 50px;
}

.feature-item {
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-light);
    transition: all var(--transition-fast);
}

.feature-item:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.feature-item span {
    font-size: 18px;
}

.feature-item strong {
    color: #000;
    font-weight: 700;
}

/* ---------- 文章内容区域 ---------- */
.text-content {
    max-width: var(--content-max-width);
    margin: 50px auto 60px;
    padding: 0 24px;
}

.text-content h3 {
    font-size: 22px;
    color: var(--dark-color);
    margin: 40px 0 15px;
    padding-left: 14px;
    border-left: 4px solid var(--primary-color);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.text-content h3:first-child {
    margin-top: 0;
}

.text-content p {
    margin-bottom: 18px;
    text-align: justify;
    color: #555;
    font-size: 15px;
    line-height: 1.9;
}

.text-content ul {
    margin-left: 6px;
    margin-bottom: 22px;
    color: #555;
    list-style: none;
    padding-left: 4px;
}

.text-content li {
    margin-bottom: 10px;
    padding-left: 22px;
    position: relative;
    line-height: 1.7;
}

.text-content li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 10px;
    width: 6px;
    height: 6px;
    background-color: var(--primary-color);
    border-radius: 50%;
    opacity: 0.7;
}

.text-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dashed var(--primary-color);
    transition: all var(--transition-fast);
}

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

.text-content strong {
    color: #333;
    font-weight: 700;
}

/* FAQ 速答板块 */
.faq-mini {
    margin: 20px 0 30px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.faq-item {
    background: #f8fafc;
    border-radius: var(--radius-md);
    padding: 18px 20px;
    border: 1px solid var(--border-light);
    transition: all var(--transition-smooth);
    cursor: default;
}

.faq-item:hover {
    background: #ffffff;
    box-shadow: var(--shadow-md);
    border-color: #d0ddf0;
}

.faq-question {
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 8px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.faq-question::before {
    content: 'Q';
    background: var(--primary-color);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.faq-answer {
    color: #666;
    font-size: 14px;
    line-height: 1.7;
    padding-left: 28px;
}

.faq-answer::before {
    content: 'A：';
    font-weight: 700;
    color: var(--primary-color);
}

.faq-answer code {
    background: #eee;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 13px;
    color: #333;
}

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

.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;
    }

    .download-hero h1 {
        font-size: 24px;
    }
    .download-hero p {
        font-size: 14px;
    }

    .steps-container {
        flex-direction: column;
        gap: 10px;
    }
    .step-arrow {
        transform: rotate(90deg);
        margin: 0;
    }

    .dl-box {
        flex-direction: column;
        padding: 24px 20px;
    }
    .dl-action {
        width: 100%;
        text-align: center;
    }
    .dl-info {
        min-width: 100%;
    }

    .notice-card {
        padding: 24px 20px;
    }
    .notice-card h3,
    .notice-card > p,
    .feature-grid {
        padding-left: 0;
    }
    .notice-icon {
        position: static;
        margin-bottom: 12px;
        display: inline-flex;
    }

    .text-content h3 {
        font-size: 19px;
    }
    .text-content p {
        text-align: left;
        font-size: 14px;
    }

    .footer-container {
        gap: 24px;
    }
    .footer-info {
        min-width: 100%;
    }
}

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

.dl-box {
    animation: fadeInUp 0.5s ease backwards;
}
.dl-box:nth-child(1) { animation-delay: 0.05s; }
.dl-box:nth-child(2) { animation-delay: 0.1s; }
.dl-box:nth-child(3) { animation-delay: 0.15s; }
.dl-box:nth-child(4) { animation-delay: 0.2s; }

/* 减少动画偏好 */
@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;
    }
}