/* 外层：整条背景 */
.header-notice-bar{
    width: 100%;
    background: #e3cc7a; /* 米金色背景 */
    color: #3e3320;
    /* 关闭动画：高度平滑减少 */
    overflow: hidden;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

/* 滚动隐藏态：向上收起不占位，避免随 Header 固定一起悬浮 */
.header-notice-bar.hidden{
  height: 0 !important;
  opacity: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border: 0;
}

/* 内层：1200px 居中容器 */
.header-notice{
    margin: 0 auto;
    padding: 8px 40px 8px 40px;
    line-height: 1;
}
.header-notice .notice-content{
    flex: 1;
}
/* 左侧内容区域 */
.header-notice .notice-wrapper{
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0; /* 使省略生效 */
    position: relative; /* 为绝对定位子元素提供参考 */
    overflow: hidden; /* 隐藏动画中超出的部分 */
    margin-left: 10px;
}

/* 通知包装层 - 包含固定图标和滚动内容 */
.header-notice .notice-wrapper{
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px; /* 图标与内容的间距 */
}

.header-notice .notice-item{
    gap: 8px;
    flex: 1; /* 占据剩余空间 */
    cursor: pointer; /* 可点击 */
    background: #e3cc7a; /* 与外层背景色一致，遮挡背后元素 */
    padding: 0; /* 确保不影响布局 */
}

/* 固定的通知图标样式 */
.header-notice .icon-notice-fixed{
    width: 22px;
    height: auto;
    opacity: 0.9;
    flex-shrink: 0; /* 防止压缩 */
}

/* 保留原有样式以防兼容性问题 */
.header-notice .icon-notice{
    width: 18px;
    height: 18px;
    object-fit: contain;
    opacity: 0.9;
}

.header-notice .notice-item p{
    font-size: 14px;
    color: #030303;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60vw; /* 防止遮挡右侧操作区 */
    transition: color .2s ease, transform .2s ease, opacity .2s ease;
}



/* NEW 小红标（使用图片时控制尺寸与间距） */
.header-notice .icon-new{
    height: auto;
    width: 34px;
    margin-left: 6px;
    margin-right: 6px;
}

/* 阅读按钮 */
.header-notice .ready-more{
    background-color: #e2ca79;
	border: solid 1px #a8934e;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
    color: #030303;
    padding: 0 10px;
    height: 30px;
    background-color: #e2ca79;
    border-radius: 6px;
    border: solid 1px #a8934e;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-notice .ready-more:hover{
    background: rgba(255,255,255,0.38);
}

.header-notice .ready-more:active{
    transform: translateY(1px);
}

/* 右侧设置区域 */
.header-notice .notice-setting{
    gap: 8px;
    padding-left: 12px;
}

.header-notice .notice-change-page{
    display: flex;
    flex-direction: column; /* 纵向排列：同一列 */
    align-items: center;
    gap: 4px;
}

.header-notice .notice-change-page .iconfont,
.header-notice .icon-delete{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent; /* 按需：无背景色 */
    color: #3e3320;
    transition: color .2s ease, transform .2s ease, opacity .2s ease;
    cursor: pointer;
}
.header-notice .notice-change-page .icon-up,
.header-notice .notice-change-page .icon-down{
    font-size: 8px;
}
.header-notice  .icon-delete{
    color: #998641;
    font-size: 23px;
    margin-left: 10px;
}
.header-notice .notice-change-page .iconfont:hover,
.header-notice .icon-delete:hover{
    color: #2a2416;
}

.header-notice .notice-change-page .iconfont:active,
.header-notice .icon-delete:active{
    transform: translateY(1px);
}

/* 禁用态（没有上一页/下一页） */
.header-notice .iconfont.is-disabled{
    color: rgba(62,51,32,0.35);
    pointer-events: none;
}

/* 关闭动画触发态 */
.header-notice-bar.closing{
    height: 0 !important;
    opacity: 0;
    padding: 0;
}
.header{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    /* 覆盖全局 index.css 中 .header 的白色背景，避免与 hero 之间出现白边 */
    background: transparent;
    backdrop-filter: none;
}
.nav{
    background-color: #02223c;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
/* 初始透明与滚动后着色态（通过 JS 切换类名） */
.nav.nav-transparent{
    background-color: transparent;
    box-shadow: none;
}
.nav.nav-solid{
    background-color: #02223c;
}
.logo{
    padding: 0 40px;
}
.logo .logo-img {
    display: block;
    width: 184px;
    height: auto;
}
.logo p{
    font-size: 11px;
	line-height: 24px;
	color: #ffffff;
}
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) 0;
}



.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-xl);
}
.nav-menu {
    display: flex;
    align-items: center;
    padding-left: 30px;
}
.nav-item .nav-link {
    font-size: 16px;
    color: #eaeaea;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: #fff;
    background-color: rgba(25, 118, 210, 0.1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--main-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

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

.nav-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding-right: 40px;
}
.nav-item-active .nav-link{
    color: var(--main-color);
}
.nav-item-active .nav-link::after {
    width: 100%;
}
.nav-right-btn .btn{
    background-color: #07375e;
    
}
.btn-register{
    color: #e2ca79;
    margin-right: 10px;
}
.server-box{
    margin-left: 40px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.server-box:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.server-box:hover p {
    color: #e2ca79;
}

.server-box:hover .server-img {
    filter: brightness(0) saturate(100%) invert(88%) sepia(25%) saturate(800%) hue-rotate(350deg) brightness(85%) contrast(95%);
}

.server-box p{
    font-size: 15px;
    color: #fff;
    margin-left: 10px;
    margin: 0 0 0 10px;
    transition: color 0.3s ease;
}
.server-box .server-img{
    width: 31px;
    height: auto;
    transition: filter 0.3s ease;
}

/* 语言切换器样式 */
.lang-wrap {
    position: relative;
    z-index: 2;
    margin-left: 20px;
}

.lang-wrap .show-lang {
    color: #71899d;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    min-width: 124px;
    padding: 20px 20px 20px 0;
}

.lang-wrap .show-lang::after {
    content: '▼';
    position: absolute;
    right: 0;
    font-size: 10px;
    color: #71899d;
    transition: transform 0.3s ease;
}

.lang-wrap.open .show-lang::after,
.lang-wrap .show-lang:hover::after {
    transform: rotate(180deg);
}

.lang-wrap .show-lang img {
    margin-left: 10px;
    width: 24px;
    height: auto;
    object-fit: cover;
}

.lang-wrap img {
    margin-right: 10px;
    width: 24px;
    height: auto;
    object-fit: cover;
}

.lang-wrap .lang-sel {
    background: rgba(57, 100, 136, 0.95);
    border-radius: 4px;
    color: #c3e0f7;
    padding: 10px 14px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    /* 轻微重叠，避免 hover 从触发器到下拉的瞬间失焦 */
    margin-top: -4px;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 150px;
    list-style: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    /* 仅做透明度过渡，避免下拉位移造成中间空隙被鼠标穿透 */
    transition: opacity 0.2s ease;
    transform: translateY(0);
}

.lang-wrap .lang-sel a {
    display: flex;
    align-items: center;
    color: #bbdffc;
    text-decoration: none;
}

.lang-wrap .lang-sel .change-lang {
    padding: 10px 0;
    margin: 0;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}


.lang-wrap .lang-sel a:hover {
    color: #fff;
}

.lang-wrap.open .lang-sel,
.lang-wrap .show-lang:hover + .lang-sel,
.lang-wrap .lang-sel:hover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.lang-wrap .current-lang {
    color: #fff;
    font-size: 14px;
}

/* 内容切换动画：为 p 元素添加/移除类名实现 */
.notice-slide-out-up{ animation: noticeSlideOutUp .18s ease both; }
.notice-slide-in-down{ animation: noticeSlideInDown .18s ease both; }
.notice-slide-out-down{ animation: noticeSlideOutDown .18s ease both; }
.notice-slide-in-up{ animation: noticeSlideInUp .18s ease both; }

@keyframes noticeSlideOutUp{
  from{ opacity:1; transform: translateY(0); }
  to{ opacity:0; transform: translateY(-60%); }
}
@keyframes noticeSlideInDown{
  from{ opacity:0; transform: translateY(-60%); }
  to{ opacity:1; transform: translateY(0); }
}
@keyframes noticeSlideOutDown{
  from{ opacity:1; transform: translateY(0); }
  to{ opacity:0; transform: translateY(60%); }
}
@keyframes noticeSlideInUp{
  from{ opacity:0; transform: translateY(60%); }
  to{ opacity:1; transform: translateY(0); }
}

/* 小屏适配：文本长度缩短、隐藏部分装饰 */
@media (max-width: 768px) {
    .header-notice{ padding: 6px 10px; }
    .header-notice .notice-item p{
        max-width: 48vw;
        font-size: 13px;
    }
    .header-notice .ready-more{
        display: none; /* 移动端保留核心信息 */
    }
}

