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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #273548;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
    --radius: 16px;
    --radius-sm: 10px;
}

html {
    scroll-behavior: smooth;
}

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

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s;
}

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

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

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

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

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    border-bottom-color: var(--border-color);
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

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

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

.logo i {
    color: var(--primary);
    font-size: 1.6rem;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-links a {
    color: var(--text-secondary);
    padding: 8px 18px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.15);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s;
}

/* ===== Hero 区域 ===== */
.hero {
    padding: 140px 0 80px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #0f172a 0%, #1a1a3e 50%, #0f172a 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle at 30% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 60px;
    position: relative;
    z-index: 1;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}

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

.hero-text > p {
    color: var(--text-secondary);
    font-size: 1.15rem;
    margin-bottom: 32px;
    max-width: 480px;
}

.hero-search {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 6px 6px 6px 20px;
    max-width: 520px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

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

.search-icon {
    color: var(--text-muted);
    font-size: 1rem;
}

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

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

.hero-search button {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-search button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.hero-tags {
    margin-top: 24px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.hero-tags span {
    font-weight: 500;
}

.hero-tags a {
    color: var(--text-secondary);
    background: rgba(99, 102, 241, 0.1);
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.hero-tags a:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
}

/* 浮动卡片 */
.hero-visual {
    flex: 0 0 320px;
    height: 320px;
    position: relative;
}

.floating-cards {
    position: relative;
    width: 100%;
    height: 100%;
}

.float-card {
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: float 6s ease-in-out infinite;
}

.float-card.card1 {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.float-card.card2 {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    top: 5%;
    right: 15%;
    animation-delay: 1s;
}

.float-card.card3 {
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    bottom: 20%;
    left: 5%;
    animation-delay: 2s;
}

.float-card.card4 {
    background: linear-gradient(135deg, #10b981, #34d399);
    bottom: 5%;
    right: 10%;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

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

.category-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.cat-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.cat-btn i {
    font-size: 0.9rem;
}

.cat-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--primary);
}

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

/* ===== 工具卡片网格 ===== */
.tools-section {
    padding: 30px 0 80px;
}

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

.tool-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.3s;
}

.tool-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.2);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.tool-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

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

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

.tool-tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
}

.tool-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.tool-rating {
    color: #f59e0b;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tool-rating span {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

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

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

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

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

.no-results p {
    font-size: 1.1rem;
}

/* ===== 特色区域 ===== */
.features {
    padding: 80px 0;
    background: linear-gradient(180deg, var(--bg-dark) 0%, #1a1a3e 100%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.15);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(6, 182, 212, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary);
    margin: 0 auto 20px;
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ===== 页脚 ===== */
.footer {
    background: #0a0f1a;
    padding: 48px 0 24px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    margin-bottom: 32px;
}

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

.footer-brand i {
    color: var(--primary);
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

.footer-social a:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== 回到顶部 ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .hero-text h1 {
        font-size: 2.5rem;
    }
    .hero-visual {
        flex-basis: 250px;
        height: 250px;
    }
    .float-card {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 4px;
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s;
    }
    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    .nav-links a {
        width: 80%;
        text-align: center;
        padding: 12px;
    }
    .hamburger {
        display: flex;
    }
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .hero {
        padding: 120px 0 60px;
    }
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    .hero-text h1 {
        font-size: 2rem;
    }
    .hero-text > p {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    .hero-search {
        max-width: 100%;
    }
    .hero-tags {
        justify-content: center;
    }
    .hero-visual {
        flex-basis: auto;
        width: 200px;
        height: 200px;
    }
    .float-card {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }

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

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

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

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.7rem;
    }
    .hero-search input {
        font-size: 0.9rem;
        padding: 10px 8px;
    }
    .cat-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    .tool-card {
        padding: 20px;
    }
    .container {
        padding: 0 16px;
    }
}