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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #06b6d4;
    --accent: #8b5cf6;
    --bg: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #1f1f3a;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dark: #1e293b;
    --border: #2d2d4a;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 8px 32px rgba(99, 102, 241, 0.15);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1200px;
}

html {
    scroll-behavior: smooth;
}

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

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

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

a:hover {
    color: var(--secondary);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ===== 导航栏 ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 15, 26, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(15, 15, 26, 0.95);
    border-bottom-color: var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
}

.logo i {
    font-size: 1.6rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo span {
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-list {
    display: flex;
    gap: 32px;
}

.nav-list a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 4px 0;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: var(--transition);
    border-radius: 2px;
}

.nav-list a:hover,
.nav-list a.active {
    color: var(--text);
}

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ===== 英雄区 ===== */
.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 0 80px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.08) 0%, transparent 40%);
}

.hero-content {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 36px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.hero-search {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 6px 6px 6px 20px;
    max-width: 520px;
    margin: 0 auto 28px;
    transition: var(--transition);
}

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

.hero-search i {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-right: 12px;
}

.hero-search input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 1rem;
    padding: 12px 0;
}

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

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.tag {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--primary-light);
    cursor: pointer;
    transition: var(--transition);
}

.tag:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

/* 背景装饰 */
.hero-bg-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
}

.shape1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
    animation: float 20s ease-in-out infinite;
}

.shape2 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    bottom: -50px;
    left: -50px;
    animation: float 25s ease-in-out infinite reverse;
}

.shape3 {
    width: 200px;
    height: 200px;
    background: var(--accent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float 15s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* ===== 分类筛选 ===== */
.categories {
    padding: 60px 0 20px;
}

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

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 10px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--text);
    background: rgba(99, 102, 241, 0.1);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

/* ===== 工具网格 ===== */
.tools {
    padding: 20px 0 80px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

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

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.tool-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
}

.tool-card-header .tool-info {
    flex: 1;
    min-width: 0;
}

.tool-card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-category {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--secondary);
    background: rgba(6, 182, 212, 0.1);
    padding: 2px 12px;
    border-radius: 50px;
}

.tool-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tool-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.tool-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
    color: #fff;
}

.tool-link i {
    font-size: 0.8rem;
    transition: var(--transition);
}

.tool-link:hover i {
    transform: translateX(4px);
}

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tool-tag {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 10px;
    border-radius: 50px;
}

.no-results {
    display: none;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-results.show {
    display: block;
}

/* ===== 关于 ===== */
.about {
    padding: 80px 0;
    background: rgba(99, 102, 241, 0.03);
}

.about-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 28px;
    text-align: center;
    transition: var(--transition);
}

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

.about-card i {
    font-size: 2.4rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.about-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.about-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== 页脚 ===== */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    font-weight: 600;
}

.footer-brand i {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* ===== 响应式 ===== */
@media (max-width: 992px) {
    .about-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }

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

    .nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(15, 15, 26, 0.98);
        backdrop-filter: blur(20px);
        padding: 20px 24px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-120%);
        opacity: 0;
        transition: var(--transition);
        pointer-events: none;
    }

    .nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-list {
        flex-direction: column;
        gap: 16px;
    }

    .menu-toggle {
        display: block;
    }

    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }

    .about-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

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

    .tool-card {
        padding: 20px;
    }
}