/* 优化头部样式 */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #2c3e50;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header .logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.header .logo:hover {
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-1px);
}

.header .logo::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.header .logo:hover::after {
    left: 100%;
}

.header .logo i {
    font-size: 2.2rem;
    color: #667eea;
    text-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    display: inline-block;
}

.header .logo i:hover {
    transform: rotate(15deg) scale(1.1);
    color: #764ba2;
    text-shadow: 0 4px 15px rgba(118, 75, 162, 0.4);
    animation: toolsShake 0.6s ease-in-out;
}

@keyframes toolsShake {
    0%, 100% { transform: rotate(15deg) scale(1.1); }
    25% { transform: rotate(20deg) scale(1.15); }
    50% { transform: rotate(10deg) scale(1.05); }
    75% { transform: rotate(18deg) scale(1.12); }
}

.header .logo i::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    z-index: -1;
}

.header .logo i:hover::before {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(118, 75, 162, 0.15) 0%, transparent 70%);
}

.header .logo h1 {
    font-size: 1.6rem;
    margin: 0;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
    position: relative;
}

.header .logo:hover h1 {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translateX(3px);
}

.header-nav {
    display: flex;
    gap: 0.5rem;
}

.header-nav a {
    color: #2c3e50;
    text-decoration: none;
    padding: 0.75rem 1.2rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.header-nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: left 0.3s ease;
    z-index: -1;
}

.header-nav a:hover::before,
.header-nav a.active::before {
    left: 0;
}

.header-nav a:hover,
.header-nav a.active {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

@media (max-width: 768px) {
    .header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0.75rem;
    }
    
    .header .logo h1 {
        font-size: 1.3rem;
    }
}