/**
 * 主导航栏样式
 */

/* ==========================================================================
   导航栏基础样式
   ========================================================================== */

.main-navigation-wrapper {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.navigation-container {
    width: 100%;
    max-width: none;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    height: 70px;
}

/* ==========================================================================
   左侧：Logo + 网站名 + 主菜单
   ========================================================================== */

.nav-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

/* Logo和网站名 */
.site-branding {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-logo img {
    height: 40px;
    width: auto;
}

.site-title-wrapper {
    display: flex;
    flex-direction: column;
}

.site-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.site-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-title a:hover {
    color: #3498db;
}

.site-description {
    margin: 0;
    font-size: 12px;
    color: #666;
    line-height: 1;
}

/* 主菜单 */
.primary-menu-wrapper {
    display: flex;
    align-items: center;
}

.primary-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.primary-menu .menu-item {
    position: relative;
}

.primary-menu .menu-item > a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 20px 18px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.primary-menu .menu-item:hover > a,
.primary-menu .menu-item.current-menu-item > a,
.primary-menu .menu-item.current-menu-parent > a {
    color: #3498db;
    border-bottom-color: #3498db;
    background-color: rgba(52, 152, 219, 0.05);
}

/* 当前页面的父级菜单项保持激活状态 */
.primary-menu .menu-item.current-menu-parent > a {
    font-weight: 600;
}

/* 子菜单中的当前页面项 */
.sub-menu .menu-item.current-menu-item a {
    background-color: #3498db !important;
    color: white !important;
    font-weight: 600;
    padding-left: 20px !important;
}

.sub-menu .menu-item.current-menu-item a:hover {
    background-color: #2980b9 !important;
    color: white !important;
}

/* 子菜单中当前项的图标 */
.sub-menu .menu-item.current-menu-item i {
    color: white !important;
}

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

.dropdown-arrow {
    font-size: 10px;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.menu-item:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* 二级菜单 */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.menu-item-has-children:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu .menu-item {
    width: 100%;
}

.sub-menu .menu-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none !important;
}

.sub-menu .menu-item:hover a {
    background-color: #f8f9fa;
    color: #3498db;
    padding-left: 24px;
}

.sub-menu .menu-item i {
    font-size: 14px;
    color: #666;
}

/* ==========================================================================
   右侧：搜索 + 通知 + 头像
   ========================================================================== */

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* 搜索框 */
.search-wrapper {
    position: relative;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-field {
    width: 280px;
    height: 38px;
    padding: 0 45px 0 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.search-field:focus {
    outline: none;
    border-color: #3498db;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-submit {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    background: #3498db;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.search-submit:hover {
    background: #2980b9;
}

.search-submit i {
    font-size: 12px;
}

/* 消息通知 */
.notifications-wrapper {
    position: relative;
}

.notifications-toggle {
    position: relative;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.notifications-toggle:hover {
    background: #f8f9fa;
}

.notifications-toggle i {
    font-size: 18px;
    color: #666;
}

.notification-count {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #e74c3c;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    line-height: 1.2;
}

.notifications-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    margin-top: 10px;
}

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

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.notifications-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.mark-all-read {
    color: #3498db;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
}

.mark-all-read:hover {
    text-decoration: underline;
}

.notifications-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f8f9fa;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: rgba(52, 152, 219, 0.05);
    border-left: 3px solid #3498db;
}

.notification-content h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 600;
}

.notification-content p {
    margin: 0 0 5px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.notification-content time {
    font-size: 12px;
    color: #999;
}

.notifications-footer {
    padding: 15px 20px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
}

.view-all {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.view-all:hover {
    text-decoration: underline;
}

/* 用户菜单 */
.user-menu-wrapper {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: none;
    background: transparent;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.user-menu-toggle:hover {
    background: #f8f9fa;
}

.user-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 260px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    /* 始终占位以支持过渡 */
    display: block;
    /* 初始隐藏状态（通过过渡控制） */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    pointer-events: none;
    /* 仅对不依赖display的属性做过渡 */
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1001;
    margin-top: 10px;
}

.user-menu-wrapper.open .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}




.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.user-avatar-large img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.user-details h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
}

.user-details p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.user-menu {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.user-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.user-menu li:hover a {
    background: #f8f9fa;
    color: #3498db;
}

.user-menu li i {
    font-size: 16px;
    color: #666;
    width: 16px;
}

.user-menu .divider {
    height: 1px;
    background: #f0f0f0;
    margin: 8px 0;
}

/* 未登录状态的按钮 */
.auth-buttons {
    display: flex;
    gap: 10px;
}

.login-btn,
.register-btn {
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-btn {
    color: #3498db;
    border: 1px solid #3498db;
    background: transparent;
}

.login-btn:hover {
    background: #3498db;
    color: white;
}

.register-btn {
    background: #3498db;
    color: white;
    border: 1px solid #3498db;
}

.register-btn:hover {
    background: #2980b9;
    border-color: #2980b9;
}

/* ==========================================================================
   移动端样式
   ========================================================================== */

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    gap: 4px;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: #333;
    transition: all 0.3s ease;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-menu-overlay.active .mobile-menu {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.mobile-menu-close {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 20px 0;
}

.mobile-menu-list li {
    margin-bottom: 5px;
}

.mobile-menu-list a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.mobile-menu-list a:hover {
    background: #f8f9fa;
    color: #3498db;
}

/* 移动端菜单选中状态 */
.mobile-menu-list .current-menu-item > a {
    background: #3498db;
    color: white;
    font-weight: 600;
}

.mobile-menu-list .current-menu-parent > a.submenu-toggle {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    font-weight: 600;
}

.mobile-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
    display: none;
}

.mobile-submenu a {
    padding-left: 40px;
    font-size: 14px;
}

/* 移动端子菜单选中状态 */
.mobile-submenu .current-menu-item > a {
    background: #3498db;
    color: white;
    font-weight: 600;
    padding-left: 44px;
}

.mobile-submenu .current-menu-item > a:hover {
    background: #2980b9;
    color: white;
}

.mobile-auth {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 10px;
}

.mobile-login-btn,
.mobile-register-btn {
    flex: 1;
    padding: 12px;
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-login-btn {
    color: #3498db;
    border: 1px solid #3498db;
    background: transparent;
}

.mobile-register-btn {
    background: #3498db;
    color: white;
    border: 1px solid #3498db;
}

/* ==========================================================================
   响应式设计
   ========================================================================== */

@media (max-width: 1024px) {
    .search-field {
        width: 200px;
    }
    
    .user-name {
        display: none;
    }
    
    .nav-left {
        gap: 20px;
    }
    
    .primary-menu .menu-item > a {
        padding: 20px 12px;
        font-size: 13px;
    }
    
    .navigation-container {
        padding: 0 30px;
    }
}

@media (max-width: 768px) {
    .navigation-container {
        padding: 0 20px;
        height: 60px;
    }
    
    .primary-menu-wrapper,
    .search-wrapper,
    .notifications-wrapper,
    .auth-buttons {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .site-title {
        font-size: 18px;
    }
    
    .site-description {
        font-size: 11px;
    }
    
    .site-logo img {
        height: 32px;
    }
}

@media (max-width: 480px) {
    .navigation-container {
        padding: 0 15px;
    }
    
    .site-branding {
        gap: 8px;
    }
    
    .site-title {
        font-size: 16px;
    }
    
    .mobile-menu {
        width: 280px;
    }
}

/* ==========================================================================
   简约风格图标（SVG图标）
   ========================================================================== */

.icon-home::before { 
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.icon-resources::before { 
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.icon-submission::before { 
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.icon-about::before { 
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.icon-journal::before { 
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.icon-media::before { 
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.icon-newspaper::before { 
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.icon-upload::before { 
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.icon-edit::before { 
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.icon-status::before { 
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.icon-search::before { 
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.icon-bell::before { 
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.icon-user::before { 
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.icon-document::before { 
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.icon-heart::before { 
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.icon-settings::before { 
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 12a3 3 0 11-6 0 3 3 0 016 0z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.icon-logout::before { 
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* 隐藏屏幕阅读器文本 */
.screen-reader-text {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ==========================================================================
   手机端顶栏（phone/header-phone.php）
   布局：左侧 logo+站名，右侧 消息通知 + 菜单
   ========================================================================== */

.phone-topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.phone-topbar .topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 14px;
}

.phone-topbar .site-name {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.phone-topbar .site-logo {
    display: inline-flex;
    align-items: center;
}

.phone-topbar .site-logo img {
    height: 28px;
    width: auto;
}

.phone-topbar .site-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.phone-topbar .topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 通知按钮（复用桌面端icon-bell） */
.phone-topbar .nav-notify-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.phone-topbar .nav-notify-btn:hover {
    background: #f8f9fa;
}

.phone-topbar .nav-notify-btn .icon-bell::before {
    width: 18px;
    height: 18px;
}

.phone-topbar .notify-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #e74c3c;
    color: #fff;
    font-size: 10px;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    font-weight: 700;
}

/* 菜单按钮 */
.phone-topbar .topbar-action#phoneMenuToggle {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 18px;
    font-size: 18px;
    color: #333;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.phone-topbar .topbar-action#phoneMenuToggle:hover {
    background: #f8f9fa;
}

/* 在较小屏幕下微调 */
@media (max-width: 360px) {
    .phone-topbar .site-title {
        font-size: 15px;
    }
    .phone-topbar .topbar-inner {
        padding: 0 10px;
        height: 52px;
    }
}