.header {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.8rem 5%;
}

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

.logo {
    display: flex;
    align-items: center;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: #2a5daa;
    border-radius: 50%;
    position: relative;
    margin-right: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 8px rgba(42, 93, 170, 0.3);
}

.logo-text {
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(45deg, #2a5daa, #4a86e8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 1px;
}

.logo-subtext {
    font-size: 0.9rem;
    color: #2a5daa;
    margin-top: -4px;
    letter-spacing: 3px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: #2a5daa;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #2a5daa;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Responsive styles */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    
    .logo-subtext {
        font-size: 0.8rem;
    }
}

/* 新增用户相关样式 */
.user-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;

    .loading-spinner {
        width: 24px;
        height: 24px;
        border: 3px solid rgba(42, 93, 170, 0.3);
        border-radius: 50%;
        border-top-color: #2a5daa;
        animation: spin 1s linear infinite;
    }

    @keyframes spin {
        to { transform: rotate(360deg); }
    }

    .btn {
        padding: 0.5rem 1rem;
        border-radius: 4px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s ease;
        
        &-login {
            background: transparent;
            border: 1px solid #2a5daa;
            color: #2a5daa;
            
            &:hover {
                background: #2a5daa;
                color: white;
            }
        }
        
        &-signup {
            background: #2a5daa;
            border: 1px solid #2a5daa;
            color: white;
            
            &:hover {
                background: #1d4a8a;
            }
        }
    }

    .user-profile {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        cursor: pointer;
        padding: 0.5rem;
        border-radius: 4px;
        transition: background 0.3s;
        
        &:hover {
            background: rgba(42, 93, 170, 0.1);
        }
        
        .avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: linear-gradient(135deg, #2a5daa, #4a86e8);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 1rem;
            
            img {
                width: 100%;
                height: 100%;
                border-radius: 50%;
                object-fit: cover;
            }
        }
        
        .username {
            font-weight: 500;
            color: #333;
        }
    }
    
    .dropdown-menu {
        position: absolute;
        top: 100%;
        right: 0;
        background: white;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        border-radius: 8px;
        overflow: hidden;
        z-index: 1001;
        min-width: 180px;
        animation: fadeIn 0.3s ease;
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .dropdown-item {
            display: flex;
            align-items: center;
            padding: 0.75rem 1.5rem;
            text-decoration: none;
            color: #333;
            transition: all 0.2s;
            gap: 0.75rem;
            
            &:hover {
                background: #f5f9ff;
                color: #2a5daa;
            }
            
            i {
                width: 20px;
                text-align: center;
            }
        }
    }
}

/* 模态框样式 */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(3px);
}

.auth-modal {
    background: white;
    border-radius: 16px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    
    .close-btn {
        position: absolute;
        top: 15px;
        right: 15px;
        background: none;
        border: none;
        font-size: 1.2rem;
        color: #888;
        cursor: pointer;
        transition: color 0.3s;
        z-index: 10;
        
        &:hover {
            color: #2a5daa;
        }
    }
    
    .auth-tabs {
        display: flex;
        background: #f8f9fa;
        border-bottom: 1px solid #eee;
        
        .tab {
            flex: 1;
            text-align: center;
            padding: 1.2rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s;
            color: #666;
            
            &.active {
                color: #2a5daa;
                border-bottom: 3px solid #2a5daa;
                background: white;
            }
            
            &:hover:not(.active) {
                background: #f0f4ff;
            }
        }
    }
    
    .auth-form {
        padding: 2rem;
        
        .form-group {
            position: relative;
            margin-bottom: 1.2rem;
            
            i {
                position: absolute;
                left: 15px;
                top: 50%;
                transform: translateY(-50%);
                color: #888;
            }
            
            input {
                width: 100%;
                padding: 0.8rem 1rem 0.8rem 40px;
                border: 1px solid #ddd;
                border-radius: 8px;
                font-size: 1rem;
                transition: border-color 0.3s;
                
                &:focus {
                    border-color: #2a5daa;
                    box-shadow: 0 0 0 3px rgba(42, 93, 170, 0.2);
                    outline: none;
                }
            }
        }
        
        .remember-forgot {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
            font-size: 0.9rem;
            
            label {
                display: flex;
                align-items: center;
                gap: 0.5rem;
            }
            
            a {
                color: #2a5daa;
                text-decoration: none;
                
                &:hover {
                    text-decoration: underline;
                }
            }
        }
        
        .terms {
            margin: 1rem 0 1.5rem;
            font-size: 0.9rem;
            
            a {
                color: #2a5daa;
                text-decoration: none;
                
                &:hover {
                    text-decoration: underline;
                }
            }
        }
        
        .btn-primary {
            width: 100%;
            padding: 0.9rem;
            background: #2a5daa;
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 500;
            cursor: pointer;
            transition: background 0.3s;
            
            &:hover {
                background: #1d4a8a;
            }
            
            &:disabled {
                background: #9bb6e0;
                cursor: not-allowed;
            }
        }
        
        .social-login {
            text-align: center;
            margin-top: 1.5rem;
            padding-top: 1.5rem;
            border-top: 1px solid #eee;
            
            p {
                margin-bottom: 1rem;
                color: #666;
                font-size: 0.9rem;
            }
            
            .social-icons {
                display: flex;
                justify-content: center;
                gap: 1rem;
                
                .social-btn {
                    width: 45px;
                    height: 45px;
                    border-radius: 50%;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    font-size: 1.2rem;
                    color: white;
                    border: none;
                    cursor: pointer;
                    transition: transform 0.3s;
                    
                    &:hover {
                        transform: translateY(-3px);
                    }
                    
                    &.wechat {
                        background: #09bb07;
                    }
                    
                    &.qq {
                        background: #12b7f5;
                    }
                    
                    &.weibo {
                        background: #e6162d;
                    }
                }
            }
        }
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .user-section {
        .btn {
            padding: 0.4rem 0.8rem;
            font-size: 0.9rem;
        }
        
        .user-profile {
            .username {
                display: none;
            }
        }
    }
    
    .auth-modal {
        width: 90%;
    }
}



.error-tip {
  position: absolute;
  bottom: -20px;
  left: 0;
  color: #e74c3c;
  font-size: 0.8rem;
  margin-top: 4px;
}

.error-message {
  color: #e74c3c;
  margin-top: 10px;
  font-size: 0.9rem;
  text-align: center;
  background: rgba(231, 76, 60, 0.1);
  padding: 8px;
  border-radius: 4px;
}