/* ===== 全局重置与变量 ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #273449;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
    --gradient-1: linear-gradient(135deg, #6366f1, #8b5cf6);
    --gradient-2: linear-gradient(135deg, #06b6d4, #6366f1);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

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

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== 头部导航 ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 16px 0;
    transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
    background: transparent;
}

.site-header.scrolled {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 var(--border-color);
    padding: 10px 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-icon {
    font-size: 1.8rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

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

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

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition);
}

.mobile-menu-btn:hover {
    color: var(--primary-light);
}

/* ===== Hero 区域 ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-bg-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

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

.shape-1 {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -200px;
    right: -200px;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    bottom: -100px;
    left: -100px;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-text {
    flex: 1;
    max-width: 640px;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.2rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
}

.gradient-text {
    background: var(--gradient-2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 540px;
}

.hero-search {
    position: relative;
    max-width: 480px;
    margin-bottom: 28px;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 16px 20px 16px 52px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 60px;
    font-size: 1rem;
    font-family: var(--font);
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

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

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

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

.tag {
    padding: 8px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 60px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    user-select: none;
}

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

.tag.active {
    background: var(--gradient-1);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.hero-visual {
    flex: 0 0 320px;
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    font-weight: 600;
    font-size: 0.95rem;
    animation: float 6s ease-in-out infinite;
    white-space: nowrap;
}

.floating-card i {
    font-size: 1.4rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.card-1 {
    top: 20px;
    left: 0;
    animation-delay: 0s;
}

.card-2 {
    top: 50%;
    right: -20px;
    transform: translateY(-50%);
    animation-delay: 1.5s;
}

.card-3 {
    bottom: 40px;
    left: 20px;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-16px); }
}

.card-2 {
    animation-name: float2;
}

@keyframes float2 {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(calc(-50% - 14px)) translateX(6px); }
}

/* ===== 工具集区域 ===== */
.tools-section {
    padding: 100px 0;
}

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

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.section-desc {
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto;
    font-size: 1.05rem;
}

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

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

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

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

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

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

.tool-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.tool-name {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.tool-category {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(99, 102, 241, 0.1);
    padding: 2px 12px;
    border-radius: 60px;
    display: inline-block;
}

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

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

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

.tool-rating span {
    color: var(--text-muted);
}

.tool-link {
    padding: 8px 20px;
    background: var(--gradient-1);
    color: #fff;
    border-radius: 60px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all var(--transition);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tool-link:hover {
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    transform: scale(1.02);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    grid-column: 1 / -1;
}

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

.empty-state p {
    font-size: 1.1rem;
}

/* ===== 特点区域 ===== */
.features-section {
    padding: 100px 0;
    background: rgba(30, 41, 59, 0.3);
}

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

.feature-card {
    text-align: center;
    padding: 40px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}

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

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--primary-light);
    transition: all var(--transition);
}

.feature-card:hover .feature-icon {
    background: var(--gradient-1);
    color: #fff;
    transform: scale(1.1);
}

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

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

/* ===== 关于区域 ===== */
.about-section {
    padding: 100px 0;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-text {
    flex: 1;
}

.about-text .section-title {
    text-align: left;
}

.about-text p {
    color: var(--text-secondary);
    font-size: 1.02rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 60px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font);
}

.btn-primary {
    background: var(--gradient-1);
    color: #fff;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.about-stats {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    min-width: 100px;
}

.stat-number {
    display: block;
    font-size: 2.6rem;
    font-weight: 800;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.2;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

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

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

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

.footer-brand i {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.footer-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color var(--transition);
}

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

.footer-links a i {
    font-size: 1.2rem;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .hero-visual {
        display: none;
    }
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    .about-text .section-title {
        text-align: center;
    }
    .about-stats {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-card);
        border-left: 1px solid var(--border-color);
        flex-direction: column;
        padding: 80px 32px 32px;
        gap: 20px;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    .main-nav.open {
        right: 0;
    }
    .mobile-menu-btn {
        display: block;
        z-index: 1001;
    }
    .hero {
        padding: 100px 0 60px;
        min-height: auto;
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .tools-grid {
        grid-template-columns: 1fr;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .about-stats {
        gap: 24px;
    }
    .stat-number {
        font-size: 2rem;
    }
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    .hero-title {
        font-size: 1.8rem;
    }
    .hero-subtitle {
        font-size: 0.95rem;
    }
    .search-input {
        padding: 14px 16px 14px 46px;
        font-size: 0.9rem;
    }
    .tool-card {
        padding: 20px 18px;
    }
    .section-header {
        margin-bottom: 36px;
    }
    .tools-section,
    .features-section,
    .about-section {
        padding: 60px 0;
    }
}