/* 简约现代顶部导航栏样式 */
.minimal-header {
    position: relative;
    width: 100%;
    background: #ffffff url('./images/20251110.jpg') no-repeat center center;
    background-size: cover;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 16px;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Logo和标题区域样式 */
.header-brand {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #f8f9fa;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;
    margin-left: 15px;
}

.logo-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    position: relative;
    transition: all 0.3s ease;
}

.logo-wrapper::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: transparent;
    border-radius: 16px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.logo-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.logo-wrapper:hover::before {
    opacity: 1;
}

.logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
    position: relative;
    top: 8px;
}

.logo-wrapper:hover .logo {
    transform: scale(1.1);
}

.title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.site-title {
    color: #2c3e50;
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.5px;
}

.site-subtitle {
    color: #6c757d;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* 用户操作区域样式 */
.user-section {
    display: flex;
    align-items: center;
}

.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.6);
}

.user-menu:hover {
    background: rgba(255, 255, 255, 0.7);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.user-avatar i {
    font-size: 16px;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.username {
    color: #2c3e50;
    font-weight: 500;
    font-size: 14px;
}

.user-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.user-badge.admin {
    background: #dc3545;
    color: white;
}

/* 通用下拉菜单样式 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1001;
    border: 1px solid #e9ecef;
    backdrop-filter: blur(5px);
}

/* 用户菜单下拉样式 */
.user-menu .dropdown-menu {
    right: 0;
    width: 180px;
}

.user-menu:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f8f9fa;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.6);
    color: #007bff;
}

.menu-item i {
    width: 16px;
    text-align: center;
    color: #6c757d;
}

.menu-item.logout {
    color: #dc3545;
}

.menu-item.logout:hover {
    background: #fff5f5;
}

.auth-section {
    display: flex;
    gap: 8px;
}

.auth-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.auth-btn.login {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.auth-btn.login:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.auth-btn.register {
    background: transparent;
    color: #007bff;
    border-color: #007bff;
}

.auth-btn.register:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* 主导航菜单样式 */
.main-nav {
    padding: 12px 0 4px 0;
}

.nav-wrapper {
    display: flex;
    justify-content: center;
}

.nav-items {
    display: flex;
    gap: 0;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    padding: 4px;
}

/* 导航项包装器 - 用于包含主菜单项和二级菜单 */
.nav-item-wrapper {
    position: relative;
}

/* 主导航项样式 */
.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    color: #6c757d;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    min-width: fit-content;
    background: rgba(255, 255, 255, 0.5);
}

.nav-item:hover {
    color: #007bff;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-item.active {
    color: #007bff;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-item i {
    font-size: 16px;
}

/* 下拉箭头图标样式 */
.dropdown-icon {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.nav-item.has-dropdown:hover .dropdown-icon,
.nav-item.has-dropdown.open .dropdown-icon {
    transform: rotate(180deg);
}

/* 导航菜单的二级菜单样式 */
.nav-item-wrapper .dropdown-menu {
    left: 0;
    margin-top: 4px;
    min-width: 180px;
    white-space: nowrap;
}

.nav-item-wrapper:hover .dropdown-menu,
.nav-item-wrapper.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 二级菜单项样式 */
.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f8f9fa;
    font-size: 14px;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.6);
    color: #007bff;
}

.dropdown-item.active {
    background: #f8f9fa;
    color: #007bff;
}

/* 公告栏样式 */
.announcement-section {
    margin: -18px 16px 4px 16px;
    overflow: hidden;
}

.announcement-wrapper {
    display: flex;
    align-items: center;
    padding: 2px 16px;
    background: transparent;
    border-radius: 6px;
}

.announcement-icon {
    margin-right: -30px;
    color: #6c757d;
}

.announcement-icon i {
    font-size: 12px;
}

.announcement-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 16px;
}

.announcement-scroll {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    animation: scrollAnnouncements 25s linear infinite;
}

@keyframes scrollAnnouncements {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.announcement-item {
    white-space: nowrap;
    color: #495057;
    font-size: 13px;
    font-weight: 400;
    padding-right: 40px;
}

/* 响应式设计 */
/* 二级菜单响应式优化 */
@media (max-width: 768px) {
    /* 导航项包装器在移动设备上的样式 */
    .nav-item-wrapper {
        position: relative;
        width: 100%;
    }
    
    /* 移动设备上的二级菜单样式 */
    .nav-item-wrapper .dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        border-radius: 4px;
        margin-top: 4px;
        z-index: 1050;
        background-color: #333333;
        border: 1px solid #444444;
    }
    
    /* 移动设备上的二级菜单项样式 */
    .nav-item-wrapper .dropdown-menu .dropdown-item {
        padding: 12px 16px;
        border-bottom: 1px solid #444444;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .nav-item-wrapper .dropdown-menu .dropdown-item:last-child {
        border-bottom: none;
    }
    
    /* 移动设备上下拉箭头位置调整 */
    .dropdown-icon {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 12px;
    }
    
    /* 确保移动设备上的导航项有足够的点击区域 */
    .nav-item {
        position: relative;
        padding-right: 30px;
    }
    
    /* 移动设备上的菜单布局调整 */
    .main-nav {
        flex-wrap: wrap;
    }
    
    .nav-items {
        width: 100%;
    }
    
    /* 防止移动设备上的菜单溢出 */
    .nav-item-wrapper {
        overflow: visible;
    }
    
    /* 修复移动设备上的显示问题 */
    .mobile .nav-item-wrapper .dropdown-menu {
        position: static;
        margin-left: 0;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 12px;
    }
    
    .site-title {
        font-size: 18px;
    }
    
    .nav-item {
        min-width: 80px;
        padding: 8px 10px;
    }
    
    .nav-item i {
        font-size: 14px;
    }
}