/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f0f2f5;
}

a {
    text-decoration: none;
    color: #1890ff;
}

a:hover {
    color: #40a9ff;
}

/* 通用容器 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #bfbfbf;
}

.input-with-icon input {
    padding-left: 35px;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    transition: all 0.3s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #40a9ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 10px 16px;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 4px;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-primary {
    color: #fff;
    background-color: #1890ff;
    border-color: #1890ff;
}

.btn-primary:hover {
    background-color: #40a9ff;
    border-color: #40a9ff;
}

.btn-block {
    display: block;
    width: 100%;
}

/* 卡片样式 */
.card {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

.card-header {
    padding: 16px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.card-body {
    padding: 24px;
}

/* 图标 */
.icon-user:before {
    content: "👤";
}

.icon-lock:before {
    content: "🔒";
}

.icon-mail:before {
    content: "✉️";
}

.icon-phone:before {
    content: "📱";
}

/* 辅助类 */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

/* 修复header样式 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.logo a {
    font-size: 24px;
    font-weight: bold;
    color: #3f87f5;
    text-decoration: none;
}

.nav {
    display: flex;
    align-items: center;
}

/* 导航菜单样式 */
.nav-menu {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
}

.nav-item {
    position: relative;
    white-space: nowrap;
}

.nav-link {
    display: inline-block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: #3f87f5;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list li {
    margin: 0 15px;
    position: relative;
}

.nav-list li a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    padding: 8px 0;
    display: block;
    transition: color 0.3s;
}

.nav-list li a:hover {
    color: #3f87f5;
}

.nav-list li.active a {
    color: #3f87f5;
    font-weight: 500;
}

.nav-list li.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #3f87f5;
}

/* 页脚菜单样式 */
.footer-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-nav-list li {
    margin-right: 15px;
}

.footer-nav-list li:last-child {
    margin-right: 0;
}

.footer-nav-list a {
    color: #fff;
    opacity: 0.8;
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-nav-list a:hover {
    opacity: 1;
}

/* 用户信息和下拉菜单 */
.user-info {
    display: flex;
    align-items: center;
}

.username {
    margin-right: 10px;
    font-size: 14px;
    color: #333;
}

.dropdown {
    position: relative;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-menu {
    position: absolute;
    top: 45px;
    right: 0;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 10px 0;
    min-width: 120px;
    display: none;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 8px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
}

.dropdown-menu a:hover {
    background-color: #f5f5f5;
    color: #3f87f5;
}

/* 为了修复header下方内容被遮挡的问题 */
.main {
    padding-top: 80px; /* 根据header高度调整 */
}

/* 响应式调整 */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .nav-list, .footer-nav-list {
        flex-direction: column;
    }
    
    .nav-list li, .footer-nav-list li {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        padding-left: 15px;
    }
}