/* ========== 全局重置与基础 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.25s ease;
}

html {
    scroll-behavior: smooth;
}

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

#app {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

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

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ========== 标题层级 ========== */
h1 {
    font-weight: 700;
    font-size: 2.5rem;
    line-height: 1.2;
}

h2 {
    font-weight: 600;
    font-size: 1.75rem;
    line-height: 1.3;
}

h3 {
    font-weight: 600;
    font-size: 1.2rem;
    line-height: 1.4;
}

p {
    font-weight: 400;
    font-size: 1rem;
    color: var(--text-secondary);
}

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 4px;
    margin-top: 6px;
}

/* ========== 头部导航 ========== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow-sm);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.7rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.2rem;
}

.logo-link:hover {
    color: var(--text-primary);
}

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

.logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0.2rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
    border-radius: 2px;
}

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

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    padding: 0.3rem;
    line-height: 1;
}

.mobile-menu {
    display: none;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.5rem;
    flex-direction: column;
    gap: 0.3rem;
}

.mobile-menu a {
    display: block;
    padding: 0.6rem 0;
    color: var(--text-secondary);
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu a:last-child {
    border-bottom: none;
}

.mobile-menu a.active {
    color: var(--primary);
}

/* ========== Hero 区域 ========== */
.hero {
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 50%, #ecfeff 100%);
    padding: 4rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(99,102,241,0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(139,92,246,0.06) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.hero-logo {
    width: 200px;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.hero-slogan {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 500;
}

.search-box {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background: #fff;
    border-radius: 50px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.search-box:focus-within {
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
    border-color: var(--primary);
}

.search-input {
    flex: 1;
    border: none;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    outline: none;
    background: transparent;
    color: var(--text-primary);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

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

/* ========== 分类筛选 ========== */
.categories {
    padding: 2rem 0 0.5rem;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.tag {
    padding: 0.5rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: 50px;
    background: #fff;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.tag:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f0f0ff;
}

.tag.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ========== 工具卡片网格 ========== */
.tools-grid {
    padding: 1rem 0 3rem;
}

.tool-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.2rem;
}

.tool-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    cursor: default;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.tool-card-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.tool-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: #f0f0ff;
    flex-shrink: 0;
}

.tool-icon svg {
    width: 24px;
    height: 24px;
}

.tool-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.tool-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary);
    background: #eef2ff;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    margin-bottom: 0.6rem;
}

.tool-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    flex: 1;
    line-height: 1.5;
}

.tool-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    align-self: flex-start;
}

.tool-link:hover {
    gap: 0.6rem;
    color: var(--primary-dark);
}

.no-results {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem 0;
    font-size: 1.1rem;
}

/* ========== 关于页 ========== */
.page-hero {
    background: linear-gradient(135deg, #eef2ff, #f5f3ff);
    padding: 3rem 1.5rem;
    text-align: center;
}

.page-hero h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.about-story, .about-mission, .about-team {
    padding: 3rem 1.5rem;
}

.about-story p {
    margin-bottom: 1rem;
    line-height: 1.8;
    max-width: 800px;
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.mission-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
    text-align: center;
}

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

.mission-icon {
    margin-bottom: 1rem;
}

.mission-card h3 {
    margin-bottom: 0.5rem;
}

.mission-card p {
    font-size: 0.9rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.team-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

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

.team-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 0.8rem;
}

.team-card h3 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.team-role {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ========== 联系页 ========== */
.contact-section {
    padding: 3rem 1.5rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.contact-info h2, .contact-form-wrapper h2 {
    margin-bottom: 1.2rem;
}

.info-item {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.info-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 0.3rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.form-group label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.7rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: var(--transition);
    font-family: inherit;
    background: #fff;
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99,102,241,0.3);
}

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

.form-success {
    text-align: center;
    padding: 2rem;
    color: #16a34a;
}

.form-success svg {
    margin-bottom: 1rem;
}

/* ========== 页脚 ========== */
.footer {
    background: #1e293b;
    color: #cbd5e1;
    padding: 2rem 1.5rem 1.5rem;
    margin-top: auto;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.footer-logo {
    width: 140px;
    margin-bottom: 0.5rem;
}

.footer-desc {
    font-size: 0.9rem;
    color: #94a3b8;
    max-width: 300px;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: #94a3b8;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: #fff;
}

.footer-copy {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.5rem;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.4rem; }

    .nav-links {
        display: none;
    }

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

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

    .hero-title {
        font-size: 2rem;
    }

    .hero-slogan {
        font-size: 1rem;
    }

    .search-input {
        padding: 0.7rem 1rem;
    }

    .search-btn {
        padding: 0.7rem 1.2rem;
    }

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

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

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

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

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

@media (max-width: 480px) {
    .hero {
        padding: 2.5rem 1rem;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .hero-logo {
        width: 150px;
    }

    .container {
        padding: 0 1rem;
    }

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

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

.tool-card {
    animation: fadeInUp 0.4s ease forwards;
}

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