:root {
    --primary-color: #1677ff;
    --primary-light: #e6f4ff;
    --secondary-color: #2c3e50;
    --background-color: #f5f8fa;
    --text-color: #2c3e50;
    --border-radius: 12px;
    --spacing: 1rem;
    --header-height: 64px;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

.header {
    background-color: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    padding: 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
}

.nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo img {
    width: 36px;
    height: 36px;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: rotate(-10deg);
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0;
    font-weight: 600;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    font-size: 1rem;
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.nav-links a:hover::after {
    transform: scaleX(1);
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    min-width: 220px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: var(--border-radius);
    padding: 0.5rem;
    z-index: 1000;
    margin-top: 0.5rem;
}

.dropdown-content::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background-color: white;
    box-shadow: -2px -2px 4px rgba(0,0,0,0.05);
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.2s ease;
}

.dropdown-content li {
    list-style: none;
}

.dropdown-content a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    transition: var(--transition);
    border-radius: 8px;
}

.dropdown-content a:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.dropdown-content a::after {
    display: none;
}

/* 按钮基础样式 */
.btn {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 6px;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

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

.btn.secondary {
    background-color: #6c757d;
}

.btn.secondary:hover {
    opacity: 0.9;
}

.btn.small {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px) translateX(-50%);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateX(-50%);
    }
}

.main {
    max-width: 1200px;
    margin: 80px auto 0;
    padding: 2rem var(--spacing);
}

.hero {
    text-align: center;
    padding: 3rem 0;
}

.hero h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
}

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

.footer {
    text-align: center;
    padding: 2rem;
    background-color: white;
    margin-top: 4rem;
}

@media (max-width: 768px) {
    .nav {
        padding: 0 1rem;
    }
    
    .logo h1 {
        font-size: 1.25rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .nav-links a {
        font-size: 0.95rem;
    }
}
