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

:root {
    /* 主色调 */
    --primary: #667eea;
    --secondary: #764ba2;
    --accent: #f093fb;
    
    /* 文字颜色 */
    --text-dark: #1a1a2e;
    --text-gray: #666;
    --text-light: #999;
    
    /* 背景色 */
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark: #1a1a2e;
    
    /* 边框和阴影 */
    --border: #e5e7eb;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);
    
    /* 间距 */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 40px;
    --spacing-xl: 60px;
    
    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    /* 过渡 */
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.6;
}

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

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

/* ==================== 顶部导航 ==================== */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 24px;
    font-weight: 800;
}

.logo-icon {
    font-size: 28px;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(10deg); }
}

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

.nav {
    display: flex;
    gap: var(--spacing-md);
}

.nav-link {
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
}

/* ==================== 主横幅 ==================== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    padding: var(--spacing-xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -200px;
    right: -100px;
    animation: float 6s ease-in-out infinite;
}

.hero::after {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -150px;
    left: -100px;
    animation: float 8s ease-in-out infinite reverse;
}

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

.hero-title {
    font-size: 64px;
    font-weight: 900;
    margin-bottom: var(--spacing-sm);
    position: relative;
    z-index: 1;
}

.hero-title .gradient-text {
    color: white;
    -webkit-text-fill-color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-lg);
    position: relative;
    z-index: 1;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: white;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* ==================== 工具分类 ==================== */
.main {
    padding: var(--spacing-xl) 0;
}

.category-section {
    margin-bottom: var(--spacing-xl);
}

.category-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.category-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: var(--spacing-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.category-icon {
    font-size: 40px;
}

.category-desc {
    font-size: 18px;
    color: var(--text-gray);
}

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

/* ==================== 工具卡片 ==================== */
.tool-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

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

.tool-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: var(--spacing-sm);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.tool-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: var(--text-dark);
}

.tool-desc {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: var(--spacing-sm);
}

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.tag {
    background: rgba(102, 126, 234, 0.08);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.tool-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition);
}

.tool-link:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.tool-link .arrow {
    font-size: 20px;
    transition: var(--transition);
}

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

/* ==================== 页脚 ==================== */
.footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    padding: var(--spacing-lg) 0;
    text-align: center;
}

.footer-text {
    color: var(--text-gray);
    margin-bottom: var(--spacing-sm);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

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

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 40px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .nav {
        gap: var(--spacing-sm);
    }
    
    .nav-link {
        padding: 6px 12px;
        font-size: 14px;
    }
}

