/* ===== 全局样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #06b6d4;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #f9fafb;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --gradient-start: #4f46e5;
    --gradient-end: #06b6d4;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 导航栏 ===== */
.navbar {
    background: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ===== 欢迎横幅 ===== */
.hero {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px 60px;
    color: white;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.btn-primary {
    display: inline-block;
    background: white;
    color: var(--primary-color);
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ===== 教程部分 ===== */
.tutorials {
    padding: 80px 0;
}

.tutorial-category {
    margin-top: 50px;
}

.category-header {
    margin-bottom: 24px;
}

.category-header h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--text-color);
}

.category-header p {
    color: var(--text-light);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 2px;
}

/* ===== 卡片样式 ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.card-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(6, 182, 212, 0.1));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.card p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.card-link {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s ease;
}

.card:hover .card-link {
    gap: 10px;
}

.card-placeholder {
    opacity: 0.7;
    cursor: default;
}

.card-placeholder:hover {
    transform: none;
    border-color: var(--border-color);
}

/* ===== 特色部分 ===== */
.features {
    background: var(--card-bg);
    padding: 80px 0;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    text-align: center;
}

.feature-item {
    padding: 30px;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 1.5rem;
}

.feature-item h4 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.feature-item p {
    color: var(--text-light);
}

/* ===== 页脚 ===== */
.footer {
    background: var(--text-color);
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-links {
    display: flex;
    gap: 20px;
    list-style: none;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.icp-info {
    margin-top: 10px;
}

.icp-info a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s ease;
}

.icp-info a:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* ===== 教程页面样式 ===== */
.tutorial-page {
    padding-top: 80px;
}

.tutorial-header {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    padding: 60px 20px;
    text-align: center;
}

.tutorial-header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.tutorial-header p {
    opacity: 0.9;
}

.tutorial-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px;
}

.tutorial-section {
    margin-bottom: 50px;
}

.tutorial-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-color);
    padding-left: 15px;
    border-left: 4px solid var(--primary-color);
}

.tutorial-section p {
    margin-bottom: 15px;
    color: var(--text-color);
}

.tutorial-section ul, .tutorial-section ol {
    margin-left: 25px;
    margin-bottom: 20px;
}

.tutorial-section li {
    margin-bottom: 10px;
    color: var(--text-color);
}

/* 下载卡片 */
.download-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.download-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.download-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.download-card h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.download-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

.download-btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: var(--primary-hover);
}

/* 步骤卡片 */
.step-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.step-content p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* 警告框 */
.warning-box {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.warning-box h4 {
    color: #b45309;
    margin-bottom: 10px;
}

.warning-box ul {
    color: #92400e;
}

/* 信息框 */
.info-box {
    background: #dbeafe;
    border: 1px solid #3b82f6;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.info-box h4 {
    color: #1e40af;
    margin-bottom: 10px;
}

.info-box p {
    color: #1e3a8a;
}

/* 返回按钮 */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 30px;
    transition: gap 0.3s ease;
}

.back-link:hover {
    gap: 12px;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-hover);
    transform: translateY(-3px);
}

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

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--card-bg);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

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

    .tutorial-header h1 {
        font-size: 1.5rem;
    }

    .step-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
