/* ============================================
   纸飞机教学指南 - 主样式表 (guide.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;
}

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

.guide-article {
    background: var(--card-bg);
}

.guide-header {
    border-bottom: 2px solid var(--light-bg);
    padding-bottom: 24px;
    margin-bottom: 40px;
}

.guide-header h1 {
    font-size: 34px;
    color: var(--dark-color);
    line-height: 1.4;
    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;
}

.meta-info {
    font-size: 14px;
    color: #999;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ---------- 快速导航卡片 ---------- */
.quick-nav-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-light);
}

.nav-card {
    flex: 1 1 120px;
    background: var(--light-bg);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    color: var(--dark-color);
    border: 1px solid transparent;
    transition: all var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.nav-card:hover {
    background: #ffffff;
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* ---------- 文章基础排版 ---------- */
.guide-article h2 {
    font-size: 26px;
    color: var(--dark-color);
    margin: 45px 0 18px;
    padding-left: 16px;
    border-left: 4px solid var(--primary-color);
    font-weight: 700;
    letter-spacing: -0.3px;
    scroll-margin-top: 100px;
}

.guide-article h2:first-of-type {
    margin-top: 0;
}

.guide-article h3 {
    font-size: 19px;
    color: #1a1a2e;
    margin: 28px 0 12px;
    font-weight: 700;
}

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

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

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

.guide-article strong {
    color: #333;
    font-weight: 700;
}

/* ---------- 技巧卡片网格 ---------- */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    margin: 24px 0 30px;
}

.tip-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px 18px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-smooth);
    text-align: center;
}

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

.tip-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 12px;
}

.tip-card h4 {
    font-size: 16px;
    color: var(--dark-color);
    margin-bottom: 8px;
    font-weight: 700;
}

.tip-card p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 0;
}

/* ---------- 分步演示板块 ---------- */
.demo-steps {
    margin: 25px 0 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.demo-step {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    background: #f8fafc;
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-light);
    transition: all var(--transition-smooth);
}

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

.step-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 60px;
}

.step-num {
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(36, 161, 222, 0.25);
}

.visual-icon {
    font-size: 24px;
}

.step-info {
    flex: 1;
}

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

.step-info p {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    margin: 0;
    text-align: left;
}

/* ---------- 安全提示条 ---------- */
.safety-tip {
    background: #fffdf5;
    border: 1px solid #ffe082;
    border-left: 4px solid #ffa000;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 16px 20px;
    margin: 28px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.safety-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.safety-tip p {
    margin: 0;
    font-size: 14px;
    color: #6d4c00;
    text-align: left;
}

.safety-tip strong {
    color: #e65100;
}

/* ---------- 进阶列表 ---------- */
.advanced-list {
    margin-left: 6px;
    margin-bottom: 25px;
    list-style: none;
    padding-left: 4px;
}

.advanced-list li {
    margin-bottom: 12px;
    padding-left: 24px;
    position: relative;
    line-height: 1.7;
    font-size: 15px;
    color: #555;
}

.advanced-list li::before {
    content: '▸';
    position: absolute;
    left: 2px;
    top: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* ---------- 场景示例框 ---------- */
.scenario-box {
    background: linear-gradient(135deg, #e8f4fd 0%, #ffffff 100%);
    border: 1px solid #b8d8f0;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 30px 0 20px;
}

.scenario-box h3 {
    margin-top: 0;
    color: var(--dark-color);
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 12px;
}

.scenario-box p {
    color: #555;
    font-size: 14px;
    text-align: left;
    margin-bottom: 0;
}

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

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

    .guide-header h1 {
        font-size: 24px;
    }
    .guide-article h2 {
        font-size: 21px;
    }
    .guide-article p {
        text-align: left;
        font-size: 14px;
    }

    .tips-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    .demo-step {
        flex-direction: column;
        gap: 12px;
    }
    .step-visual {
        flex-direction: row;
        gap: 12px;
    }

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

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

.tip-card {
    animation: fadeInUp 0.4s ease backwards;
}
.tip-card:nth-child(1) { animation-delay: 0.05s; }
.tip-card:nth-child(2) { animation-delay: 0.1s; }
.tip-card:nth-child(3) { animation-delay: 0.15s; }
.tip-card:nth-child(4) { animation-delay: 0.2s; }
.tip-card:nth-child(5) { animation-delay: 0.25s; }
.tip-card:nth-child(6) { animation-delay: 0.3s; }
.tip-card:nth-child(7) { animation-delay: 0.35s; }
.tip-card:nth-child(8) { animation-delay: 0.4s; }

.demo-step {
    animation: fadeInUp 0.4s ease backwards;
}
.demo-step:nth-child(1) { animation-delay: 0.1s; }
.demo-step:nth-child(2) { animation-delay: 0.2s; }
.demo-step:nth-child(3) { animation-delay: 0.3s; }
.demo-step:nth-child(4) { animation-delay: 0.4s; }

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