/* ============================================================
 * 全局通告：弹窗 / 顶部横幅（面向所有访客）
 * ============================================================ */

.es-global-notice { font-family: inherit; }

/* ---------- 弹窗 ---------- */
.es-global-notice--popup {
	position: fixed; inset: 0; z-index: 9999;
	display: flex; align-items: center; justify-content: center; padding: 20px;
}
.es-global-notice--popup[hidden] { display: none; }
.es-global-notice--popup .es-gn__mask { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); }
.es-global-notice--popup .es-gn__box {
	position: relative; z-index: 1; width: 100%; max-width: 520px; max-height: 82vh; overflow: auto;
	background: #fff; border-radius: 14px; padding: 26px 24px 22px; box-shadow: 0 18px 48px rgba(15, 23, 42, .28);
}
.es-global-notice--popup .es-gn__close {
	position: absolute; top: 8px; right: 12px; border: 0; background: transparent; font-size: 24px; line-height: 1; color: #94a3b8; cursor: pointer;
}
.es-global-notice--popup .es-gn__close:hover { color: #334155; }
.es-global-notice--popup .es-gn__title { margin: 0 0 14px; font-size: 18px; font-weight: 800; color: #0f172a; padding-right: 24px; }
.es-global-notice--popup .es-gn__body { font-size: 14px; line-height: 1.75; color: #334155; }
.es-global-notice--popup .es-gn__body p { margin: 0 0 10px; }
.es-global-notice--popup .es-gn__body img { max-width: 100%; height: auto; border-radius: 8px; display: block; margin: 10px 0; }
.es-global-notice--popup .es-gn__body a { color: #2563eb; }

/* ---------- 顶部横幅（历史样式：多条通告改为「首页上下滚动条」后，前台已不再输出） ---------- */
.es-global-notice--bar {
	position: relative; z-index: 120; width: 100%;
	background: linear-gradient(90deg, #4338ca, #6366f1); color: #fff;
	box-shadow: 0 4px 16px rgba(67, 56, 202, .25);
}
.es-global-notice--bar[hidden] { display: none; }
.es-global-notice--bar .es-gn__bar-inner {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	max-width: 1180px; margin: 0 auto; padding: 10px 18px;
}
.es-global-notice--bar .es-gn__bar-text { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; font-size: 14px; line-height: 1.6; }
.es-global-notice--bar .es-gn__bar-title { font-weight: 800; white-space: nowrap; }
.es-global-notice--bar .es-gn__body { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.es-global-notice--bar .es-gn__body img { max-height: 26px; width: auto; vertical-align: middle; border-radius: 4px; margin: 0 4px; }
.es-global-notice--bar .es-gn__body p { display: inline; margin: 0; }
.es-global-notice--bar .es-gn__bar-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.es-global-notice--bar .es-gn__close {
	border: 0; background: rgba(255, 255, 255, .22); color: #fff; width: 30px; height: 30px; border-radius: 8px; font-size: 20px; line-height: 1; cursor: pointer; flex: 0 0 auto;
}
.es-global-notice--bar .es-gn__close:hover { background: rgba(255, 255, 255, .34); }

/* ---------- 跳转按钮 ---------- */
.es-gn__btn {
	display: inline-block; margin-top: 16px; padding: 10px 22px; border-radius: 10px; background: #2563eb; color: #fff;
	font-size: 14px; font-weight: 700; text-decoration: none; text-align: center;
}
.es-gn__btn:hover { background: #1d4ed8; color: #fff; }
.es-global-notice--bar .es-gn__btn { margin-top: 0; background: #fff; color: #4338ca; padding: 7px 16px; }
.es-global-notice--bar .es-gn__btn:hover { background: #eef2ff; color: #3730a3; }

/* ---------- 弹窗内多按钮 ---------- */
.es-gn__btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.es-gn__btns .es-gn__btn { margin-top: 0; }

/* ============================================================
 * 首页精选推荐上方常驻通告（含不停闪烁的铃铛）
 * 整条即链接：有跳转链接时渲染为 <a>，点击直接前往；
 * 无链接时退化为 <div>。小铃铛与文字始终同一行。
 * 外观：**无描边、无阴影，底色极淡半透明**（1.8.51 起，站长最终选定「方案 C」）——
 * 叠 28% 白（页面底色 #f7f8fc），几乎与背景同色，只留一丝极轻的分区感，
 * 让左侧强调条有落点、又不至于像独立卡片那样突兀。
 * 悬停反馈（仅当整条渲染为 <a> 时生效）把底色再提亮一档，不位移 / 不加阴影。
 * ============================================================ */
.es-home-notice {
	display: flex; align-items: center; gap: 12px;
	max-width: 1180px; margin: 0 auto 22px; padding: 11px 14px 11px 18px;
	background: rgba(255, 255, 255, .28);
	border: 0; border-radius: 16px;
	box-shadow: none;
	position: relative; overflow: hidden;
	transition: background-color .2s ease;
}
/* 左侧竖向渐变强调条 */
.es-home-notice::before {
	content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
	background: linear-gradient(180deg, #fb7185, #e11d48 55%, #be123c);
}
/* 整条即链接：去掉下划线、继承文字色，给出指针与悬停反馈 */
a.es-home-notice { text-decoration: none; color: inherit; cursor: pointer; }
a.es-home-notice:hover {
	background: rgba(255, 255, 255, .5);
}

/* 铃铛徽标 */
.es-home-notice__bell {
	flex: 0 0 auto; position: relative; display: inline-flex; align-items: center; justify-content: center;
	width: 38px; height: 38px; border-radius: 12px; font-size: 18px; line-height: 1; color: #be123c;
	background: linear-gradient(135deg, #fff1f2, #ffe0c9);
	transform-origin: top center;
	animation: es-bell-shake 2.2s ease-in-out infinite, es-bell-glow 2.4s ease-in-out infinite;
}
.es-home-notice__bell .es-bell-dot {
	position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%;
	background: #ef4444; box-shadow: 0 0 0 2px #fff; animation: es-bell-blink 1s steps(1, end) infinite;
}
@keyframes es-bell-shake {
	0%, 62%, 100% { transform: rotate(0deg); }
	68% { transform: rotate(12deg); }
	74% { transform: rotate(-9deg); }
	80% { transform: rotate(6deg); }
	86% { transform: rotate(-3deg); }
}
@keyframes es-bell-glow {
	0%, 100% { box-shadow: inset 0 0 0 1px rgba(225, 29, 72, .10), 0 0 0 0 rgba(225, 29, 72, .30); }
	50% { box-shadow: inset 0 0 0 1px rgba(225, 29, 72, .10), 0 0 14px 3px rgba(225, 29, 72, .28); }
}
@keyframes es-bell-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: .15; } }
@media (prefers-reduced-motion: reduce) {
	.es-home-notice__bell, .es-home-notice__bell .es-bell-dot { animation: none; }
}

.es-home-notice__content {
	display: flex; align-items: center; justify-content: space-between; gap: 16px; flex: 1 1 auto; min-width: 0;
}
.es-home-notice__text { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; }
.es-home-notice__title { font-size: 13.5px; font-weight: 800; color: #be123c; white-space: nowrap; letter-spacing: .2px; }
.es-home-notice__sep { flex: 0 0 auto; width: 1px; height: 13px; background: #f4c3cd; }
.es-home-notice__body { font-size: 12.5px; color: #64748b; line-height: 1.6; min-width: 0; white-space: nowrap; }

/* 单行 + 超长跑马灯（仅溢出才滚动） */
.es-home-notice__marquee {
	display: flex; flex-wrap: nowrap; align-items: center;
	flex: 1 1 auto; min-width: 0; overflow: hidden;
}
.es-home-notice__track {
	display: flex; align-items: center; gap: 10px;
	white-space: nowrap; flex: 0 0 auto; padding-right: 3rem;
}
.es-home-notice__marquee.is-marquee .es-home-notice__track {
	animation: es-home-marquee 18s linear infinite;
}
.es-home-notice__marquee.is-marquee:hover .es-home-notice__track {
	animation-play-state: paused;
}
@keyframes es-home-marquee {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
	.es-home-notice__marquee.is-marquee .es-home-notice__track { animation: none; }
}
.es-home-notice__body img { max-height: 22px; width: auto; vertical-align: middle; border-radius: 4px; margin: 0 4px; }
.es-home-notice__body p, .es-home-notice__body div { display: inline; margin: 0; }

/* ---------- 多条通告：垂直轮播（上下滚动） ---------- */
/* 容器高度固定为一行，内部 track 由脚本 translateY 逐条上移，滚完回到第一条。 */
.es-home-notice__vscroll {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	height: var(--es-gn-row, 24px);
	overflow: hidden;
}
.es-home-notice__vtrack { will-change: transform; }
.es-home-notice__vitem {
	display: block;
	height: var(--es-gn-row, 24px);
	line-height: var(--es-gn-row, 24px);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
/* vitem 是块级上下文，分隔条要显式内联化才与文字同一排 */
.es-home-notice__vitem .es-home-notice__sep { display: inline-block; vertical-align: middle; }
.es-home-notice__vitem .es-home-notice__body { white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
	/* 用户偏好减少动效时：脚本仍会切换，但去掉过渡，避免大面积位移动画 */
	.es-home-notice__vtrack { transition: none !important; }
}

@media (max-width: 600px) {
	/* 小铃铛与文字强制同一行：不换行，溢出交给跑马灯 / 垂直轮播内部处理 */
	.es-home-notice { flex-wrap: nowrap; padding: 11px 14px 11px 18px; --es-gn-row: 22px; }
	.es-home-notice__bell { width: 32px; height: 32px; border-radius: 10px; font-size: 15px; flex: 0 0 auto; }
	.es-home-notice__content { flex-wrap: nowrap; min-width: 0; }
	.es-home-notice__title { font-size: 13px; }
}
