/* 导航栏右侧内容样式 */
/* 向经理电竞：顶部通知弹窗层级、悬浮定位与导航栏样式。 */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}
/* Navbar Top Bar */
.top-bar {
    margin-left: 0;
    position: relative;
    z-index: 2147483000;
    overflow: visible !important;
}

/* 搜索容器 */
.search-container {
    flex: 1;
    max-width: 400px;
    min-width: 280px;
    margin-right: 24px;
}
.search-container .search-form {
    width: 100%;
}
.search-container .search-input-wrapper {
    position: relative;
    width: 100%;
    height: 40px;
    background: rgba(255, 255, 255, 1);
    border: 1px solid rgba(229, 230, 235, 1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.search-container .search-input-wrapper:hover {
    border-color: rgba(63, 140, 255, 0.3);
    box-shadow: 0 4px 12px rgba(63, 140, 255, 0.08);
}
.search-container .search-input-wrapper:focus-within {
    border-color: rgba(63, 140, 255, 1);
    box-shadow: 0 4px 16px rgba(63, 140, 255, 0.15);
}
.search-container .search-icon {
    color: rgba(109, 114, 120, 0.6);
    font-size: 16px;
    margin-right: 12px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}
.search-container .search-input-wrapper:focus-within .search-icon {
    color: rgba(63, 140, 255, 1);
}
.search-container .search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: rgba(109, 114, 120, 1);
    font-family: PingFangSC-Regular;
    line-height: 1.4;
}
.search-container .search-input::placeholder {
    color: rgba(109, 114, 120, 0.5);
    font-size: 14px;
}
/* 右侧用户信息区域 */
.user-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    height: 100%;
    position: relative;
    z-index: 2147483001;
    overflow: visible !important;
}
/* 通知铃铛 */
.notification-wrapper {
    position: relative;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 1);
    border: 1px solid rgba(229, 230, 235, 1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.notification-wrapper.show {
    z-index: 2147483600 !important;
}
.notification-wrapper:hover {
    border-color: rgba(63, 140, 255, 0.3);
    box-shadow: 0 4px 12px rgba(63, 140, 255, 0.15);
    transform: translateY(-1px);
}
.notification-wrapper .dropdown-toggle {
    position: relative;
    padding: 0.5rem 0.75rem;
}
.notification-wrapper .notification-icon {
    color: rgba(109, 114, 120, 0.8);
    font-size: 1.25rem;
    transition: all 0.3s ease;
}
.notification-wrapper:hover .notification-icon {
    color: rgba(63, 140, 255, 1);
    transform: scale(1.1);
}
/* 用户信息容器 */
.user-dropdown-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}
.user-info-toggle {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
    padding: 0.5rem 0.75rem;
}
.user-info-toggle:hover {
    text-decoration: none;
    color: inherit;
}
.user-info-toggle::after {
    display: none !important;
}
.user-info-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 8px;
    background: rgba(255, 255, 255, 1);
    /* border: 1px solid rgba(229, 230, 235, 1); */
    border-radius: 12px;
    padding: 6px 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 40px;
    width: auto;
    min-width: 120px;
    max-width: 180px;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); */
}
.user-info-container:hover {
    border-color: rgba(63, 140, 255, 0.3);
    box-shadow: 0 4px 12px rgba(63, 140, 255, 0.15);
    transform: translateY(-1px);
}
.user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    margin-right: 0.5rem;
    object-fit: cover;
    flex-shrink: 0;
}
.user-info-container .username {
    font-size: 14px;
    color: rgba(51, 51, 51, 0.85);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
    flex: 1;
    margin-right: 0.5rem;
}
.user-info-container .dropdown-arrow {
    font-size: 1rem;
    color: rgba(109, 114, 120, 0.6);
    margin-left: 4px;
    transition: transform 0.3s ease;
}
.user-info-container .dropdown.show .dropdown-arrow {
    transform: rotate(180deg);
}
/* 下拉菜单 - Scoped to Navbar */
.user-actions .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid rgba(229, 230, 235, 1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    min-width: 200px;
    padding: 8px 0;
    margin-top: 8px;
    z-index: 1060;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}
.user-actions .dropdown.show .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#notification-center.show > .dropdown-menu.dropdown-menu-lg.dropdown-menu-right {
    z-index: 2147483647 !important;
    position: absolute !important;
}

.notification-floating-menu.dropdown-menu.dropdown-menu-lg.dropdown-menu-right {
    position: fixed !important;
    z-index: 2147483647 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    display: none !important;
    transform: none !important;
}

.notification-floating-menu.dropdown-menu.dropdown-menu-lg.dropdown-menu-right.show {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    transform: none !important;
}

/* 修复下拉菜单箭头 */
.notification-wrapper .dropdown-toggle::after {
    display: none !important;
}

/* Arco Pro 风格 Tabs */
.notification-header {
    border-bottom: 1px solid #f0f0f0;
    padding: 0 8px;
}
.notification-header .nav-tabs {
    border-bottom: none;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between; /* 均匀分布 */
    width: 100%;
}
.notification-header .nav-item {
    margin-bottom: 0;
    flex: 1; /* 平分宽度 */
    text-align: center;
}
.notification-header .nav-link {
    border: none;
    color: #4e5969;
    padding: 10px 4px; /* 减小内边距 */
    font-size: 14px;
    position: relative;
    background: transparent !important;
    transition: color 0.3s;
    white-space: nowrap; /* 不换行 */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.notification-header .nav-link:hover {
    color: #165dff;
}
.notification-header .nav-link.active {
    color: #165dff;
    font-weight: 500;
}
.notification-header .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 2px;
    background-color: #165dff;
}

/* 消息列表样式 */
.msg-list .list-group-item {
    padding: 12px 16px;
    border: none;
    border-bottom: 1px solid #f2f3f5;
    transition: all 0.2s;
    display: block; /* 确保是块级元素 */
}
.msg-list .list-group-item:last-child {
    border-bottom: none;
}
.msg-list .list-group-item:hover {
    background-color: #f7f8fa;
}

/* 消息项头部：标题和时间 */
.msg-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
    width: 100%;
}
.msg-item-title {
    font-size: 14px;
    color: #1d2129;
    line-height: 1.5;
    flex: 1;
    min-width: 0; /* 关键属性：允许flex子项收缩 */
    margin-right: 8px;
    /* 标题单行显示 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%; /* 使用100%配合min-width:0自动计算 */
}

#msgModalContent {
    text-align: left;
}
.msg-item-title.unread {
    font-weight: 500;
}
/* 未读红点样式优化：2px圆角，高度小点 */
.msg-item-title.unread::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #f53f3f;
    border-radius: 2px; /* 圆角2px */
    margin-right: 6px;
    vertical-align: middle;
    margin-top: -2px;
}
.msg-item-time {
    font-size: 12px;
    color: #86909c;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 消息项底部：分类和查看详情 */
.msg-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2px; /* 往上靠近 */
}
.msg-item-type {
    font-size: 12px;
    color: #86909c;
    background: #f2f3f5;
    padding: 1px 6px;
    border-radius: 2px;
}
.msg-item-action {
    font-size: 12px;
    color: #165dff;
    opacity: 0;
    transition: opacity 0.2s;
}
.msg-list .list-group-item:hover .msg-item-action {
    opacity: 1;
}

/* Modal Scroll Fix: Removed unused messageModal styles */

#msgModalContent img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 10px auto;
    border-radius: 4px;
}
#msgModalContent p {
    margin-bottom: 10px;
    word-break: break-all;
}

/* 通知文章弹窗：参考官方公告视觉，独立于其他 Layui 弹窗。 */
.layui-layer.notification-article-layer {
    --notice-blue: #3479f6;
    --notice-navy: #102957;
    --notice-muted: #6f82a7;
    --notice-line: #dce6f5;
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, .92) !important;
    border-radius: 26px !important;
    background:
        radial-gradient(circle at 68% 5%, rgba(82, 140, 255, .10), transparent 32%),
        linear-gradient(145deg, #f7fbff 0%, #ffffff 42%, #f5f9ff 100%) !important;
    box-shadow: 0 28px 80px rgba(21, 42, 84, .28), 0 3px 12px rgba(37, 88, 170, .12) !important;
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
.layui-layer.notification-article-layer::before {
    content: '';
    position: absolute;
    top: -76px;
    right: 82px;
    width: 280px;
    height: 230px;
    opacity: .42;
    pointer-events: none;
    background: linear-gradient(145deg, transparent 39%, rgba(58, 119, 245, .09) 40% 41%, transparent 42%),
                linear-gradient(35deg, transparent 49%, rgba(58, 119, 245, .07) 50% 51%, transparent 52%);
    transform: rotate(8deg);
}
.layui-layer.notification-article-layer .layui-layer-content {
    height: 100% !important;
    overflow: hidden !important;
    border-radius: inherit;
    background: transparent !important;
}
.notification-article {
    position: relative;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 48px 38px 38px;
    color: var(--notice-navy);
}
.notification-article__header {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    padding-right: 132px;
}
.notification-article__heading {
    display: flex;
    flex-direction: column;
    row-gap: 0;
    min-width: 0;
    padding-top: 0;
}
.notification-article__heading h2 {
    display: block;
    margin: 0 0 -3px !important;
    padding: 0 !important;
    color: #0b2554;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: .01em;
    overflow-wrap: anywhere;
}
.notification-article__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 0 !important;
    color: var(--notice-muted);
    font-size: 15px;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    transform: translateY(-1px);
}
.notification-article__meta span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    line-height: 1.15;
}
.notification-article__meta i { font-size: 17px; }
.notification-article__meta b {
    width: 1px;
    height: 20px;
    background: #c5d1e5;
}
.notification-article__meta .notification-article__type {
    padding: 4px 12px;
    border-radius: 16px;
    background: #e7f0ff;
    color: #2b70ed;
    font-size: 14px;
    line-height: 1.1;
    font-weight: 600;
}
.notification-article__controls {
    position: absolute;
    top: -17px;
    right: -10px;
    display: flex;
    gap: 12px;
}
.notification-article__controls button {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid #d8e3f3;
    border-radius: 11px;
    outline: 0;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 4px 10px rgba(44, 78, 132, .05);
    color: #536684;
    cursor: pointer;
    transition: border-color .18s, color .18s, transform .18s, box-shadow .18s;
}
.notification-article__controls button:hover {
    border-color: #9dbcf4;
    color: #246df0;
    box-shadow: 0 7px 16px rgba(44, 104, 220, .13);
    transform: translateY(-1px);
}
.notification-article__controls button:last-child:hover {
    border-color: #f1b4b4;
    color: #e5484d;
}
.notification-article__controls i { font-size: 18px; }
.notification-article__divider {
    position: relative;
    z-index: 2;
    height: 1px;
    flex: 0 0 1px;
    margin: 14px 0 22px;
    background: linear-gradient(90deg, #d8e3f3 0%, #d8e3f3 92%, transparent);
}
.notification-article__scroll {
    position: relative;
    z-index: 2;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 15px;
    scrollbar-width: thin;
    scrollbar-color: #6fa0ff transparent;
}
.notification-article__scroll::-webkit-scrollbar { width: 6px; }
.notification-article__scroll::-webkit-scrollbar-track { background: transparent; }
.notification-article__scroll::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background: linear-gradient(#78a7ff, #4e87f6);
}
.notification-article__paper {
    position: relative;
    min-height: 100%;
    box-sizing: border-box;
    padding: 24px 25px 28px 60px;
    border: 1px solid rgba(224, 233, 246, .72);
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(243, 247, 253, .92), rgba(255, 255, 255, .6));
}
.notification-article__quote {
    position: absolute;
    top: 13px;
    left: 25px;
    color: #2f78f4;
    font-family: Georgia, serif;
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}
.notification-article__content {
    color: #24385e;
    font-size: 15px;
    line-height: 1.88;
    overflow-wrap: anywhere;
}
.notification-article__content > :first-child { margin-top: 0 !important; }
.notification-article__content > :last-child { margin-bottom: 0 !important; }
.notification-article__content p { margin: 0 0 17px; }
.notification-article__content h1,
.notification-article__content h2,
.notification-article__content h3,
.notification-article__content h4 {
    position: relative;
    margin: 23px 0 9px;
    color: #173362;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
}
.notification-article__content h1::before,
.notification-article__content h2::before,
.notification-article__content h3::before,
.notification-article__content h4::before {
    content: '◆';
    margin-right: 10px;
    color: #3479f6;
    font-size: 13px;
}
.notification-article__content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(28, 62, 116, .12);
}
.notification-article__content a { color: #246df0; }
.notification-article__wave {
    position: absolute;
    z-index: 1;
    right: -65px;
    bottom: -42px;
    width: 365px;
    height: 125px;
    border-radius: 50% 0 0;
    border-top: 1px solid rgba(72, 133, 246, .28);
    background: linear-gradient(155deg, rgba(134, 176, 255, 0) 25%, rgba(121, 169, 255, .20));
    transform: rotate(-7deg);
    pointer-events: none;
}
.notification-article__wave::before,
.notification-article__wave::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}
.notification-article__wave::before {
    right: 61px;
    top: 19px;
    width: 34px;
    height: 34px;
    background: radial-gradient(circle at 35% 30%, #e9f2ff, #8db7ff 55%, rgba(111, 158, 247, .25) 72%);
    box-shadow: 0 9px 18px rgba(66, 121, 224, .2);
}
.notification-article__wave::after {
    inset: 13px 20px auto auto;
    width: 290px;
    height: 90px;
    border-top: 1px solid rgba(76, 135, 245, .19);
}

body.dark-mode .layui-layer.notification-article-layer,
body.dark-mode .layui-layer.notification-article-layer .layui-layer-content {
    background: radial-gradient(circle at 68% 5%, rgba(82, 140, 255, .13), transparent 32%),
                linear-gradient(145deg, #20283a, #252d40 60%, #1e273a) !important;
}
body.dark-mode .notification-article__paper { background: rgba(19, 27, 43, .58); border-color: #36435b; }
body.dark-mode .notification-article__heading h2,
body.dark-mode .notification-article__content,
body.dark-mode .notification-article__content h1,
body.dark-mode .notification-article__content h2,
body.dark-mode .notification-article__content h3,
body.dark-mode .notification-article__content h4 { color: #e6edfa; }

@media (max-width: 640px) {
    .notification-article { padding: 26px 18px 22px; }
    .notification-article__header { padding-right: 104px; }
    .notification-article__heading { padding-top: 0; }
    .notification-article__heading h2 { max-height: 42px; margin: 0 0 -2px !important; font-size: 19px; line-height: 1.08; overflow: hidden; }
    .notification-article__meta { gap: 8px; margin-top: 0 !important; font-size: 12px; line-height: 1.12; transform: translateY(-1px); }
    .notification-article__meta b { height: 16px; }
    .notification-article__meta .notification-article__type { padding: 3px 8px; font-size: 12px; line-height: 1.08; }
    .notification-article__controls { top: -12px; right: -5px; gap: 6px; }
    .notification-article__controls button { width: 32px; height: 32px; border-radius: 8px; }
    .notification-article__controls button:first-child { display: none; }
    .notification-article__divider { margin: 10px 0 14px; }
    .notification-article__scroll { padding-right: 7px; }
    .notification-article__paper { padding: 20px 16px 24px 42px; }
    .notification-article__quote { left: 15px; font-size: 38px; }
    .notification-article__content { font-size: 14px; line-height: 1.75; }
}
