/* 全站进入公告 — 分层玻璃质感弹窗 */

#globalAnnouncementDialog.sga-dialog {
  border: none;
  background: transparent;
  padding: 0;
  margin: auto;
  width: min(760px, calc(100vw - 24px));
  max-width: 100%;
  color: #e8edf5;
  box-shadow: none;
  overflow: visible;
}

#globalAnnouncementDialog.sga-dialog::backdrop {
  background:
    radial-gradient(ellipse 90% 70% at 50% 0%, rgba(52, 112, 220, 0.22), transparent 58%),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(88, 56, 180, 0.12), transparent 55%),
    rgba(3, 6, 14, 0.82);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  animation: sgaBackdropIn 0.42s ease;
}

#globalAnnouncementDialog.sga-dialog.sga-dialog--open .sga-shell {
  animation: sgaShellIn 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes sgaBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes sgaShellIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.sga-shell {
  position: relative;
  isolation: isolate;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(148, 188, 255, 0.22);
  background:
    linear-gradient(168deg, rgba(18, 32, 62, 0.96) 0%, rgba(10, 16, 32, 0.98) 42%, rgba(6, 10, 20, 0.99) 100%);
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(100, 160, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sga-shell__glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(48px);
  opacity: 0.55;
  z-index: 0;
}

.sga-shell__glow--a {
  width: 280px;
  height: 280px;
  top: -120px;
  left: -80px;
  background: rgba(61, 139, 253, 0.35);
}

.sga-shell__glow--b {
  width: 220px;
  height: 220px;
  top: -60px;
  right: -40px;
  background: rgba(120, 88, 255, 0.22);
}

.sga-shell__accent {
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 2;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #3d8bfd 18%,
    #5ce1e6 48%,
    #a78bfa 72%,
    transparent 100%
  );
  opacity: 0.95;
  pointer-events: none;
}

.sga-hero {
  position: relative;
  z-index: 1;
  padding: 16px 48px 14px 22px;
  border-bottom: 1px solid rgba(120, 170, 240, 0.08);
}

.sga-kicker {
  display: inline-block;
  max-width: calc(100% - 8px);
  padding: 2px 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(158, 190, 230, 0.82);
  background: none;
  border: none;
  box-shadow: none;
}

.sga-kicker[hidden] {
  display: none;
}

.sga-title {
  margin: 6px 0 0;
  font-size: clamp(13px, 0.82rem + 0.45vw, 17px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: rgba(248, 252, 255, 0.96);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sga-title[hidden] {
  display: none;
}

.sga-dismiss {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(160, 178, 204, 0.75);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.sga-dismiss:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(230, 240, 255, 0.95);
}

.sga-content {
  position: relative;
  z-index: 1;
  padding: 20px 24px 8px;
}

.sga-body-panel {
  max-height: min(56vh, 460px);
  overflow: auto;
  padding: 20px 22px;
  border-radius: 16px;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 32px rgba(0, 0, 0, 0.22);
  scrollbar-width: thin;
  scrollbar-color: rgba(120, 170, 230, 0.45) transparent;
}

.sga-body-panel::-webkit-scrollbar {
  width: 6px;
}

.sga-body-panel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(120, 170, 230, 0.45);
}

.sga-body {
  font-size: 14.5px;
  line-height: 1.78;
  color: rgba(214, 226, 242, 0.94);
}

.sga-body p {
  margin: 0 0 0.85em;
}

.sga-body p:last-child {
  margin-bottom: 0;
}

.sga-section-title {
  margin: 1.15em 0 0.65em;
  padding-bottom: 8px;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.04em;
  color: rgba(158, 203, 255, 0.96);
  border-bottom: 1px solid rgba(120, 170, 230, 0.16);
}

.sga-section-title:first-child {
  margin-top: 0;
}

.sga-list {
  list-style: none;
  margin: 0 0 0.5em;
  padding: 0;
  display: grid;
  gap: 8px;
}

.sga-list-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.68;
  color: rgba(220, 232, 248, 0.94);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.sga-list-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(120, 170, 240, 0.14);
}

.sga-body strong {
  color: rgba(255, 248, 230, 0.98);
  font-weight: 720;
}

.sga-body a {
  color: #7ec4ff;
  text-decoration: none;
  border-bottom: 1px solid rgba(126, 196, 255, 0.32);
  transition: color 0.16s ease, border-color 0.16s ease;
}

.sga-body a:hover {
  color: #b8dcff;
  border-bottom-color: rgba(184, 220, 255, 0.55);
}

.sga-body-rich img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(140, 180, 255, 0.28);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.sga-meta {
  color: rgba(150, 168, 192, 0.82);
  font-size: 13px;
  text-align: center;
  padding: 12px 0;
}

.sga-link {
  margin: 12px 0 0;
  padding: 0;
}

.sga-link a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #8ec8ff;
  text-decoration: none;
  background: rgba(61, 139, 253, 0.1);
  border: 1px solid rgba(110, 184, 255, 0.22);
  transition: background 0.18s ease, color 0.18s ease;
}

.sga-link a::after {
  content: "→";
  font-size: 14px;
  opacity: 0.85;
}

.sga-link a:hover {
  color: #c8e4ff;
  background: rgba(61, 139, 253, 0.16);
}

.sga-foot {
  position: relative;
  z-index: 1;
  padding: 16px 24px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgba(120, 170, 240, 0.1);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.18));
}

.sga-confirm {
  min-width: 200px;
  padding: 13px 32px;
  border: 1px solid rgba(140, 190, 255, 0.35);
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #f4f9ff;
  cursor: pointer;
  background: linear-gradient(135deg, #2f6fd4 0%, #1e4a9e 52%, #1a3d85 100%);
  box-shadow:
    0 12px 32px rgba(30, 74, 158, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease,
    border-color 0.18s ease;
}

.sga-confirm:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
  border-color: rgba(160, 210, 255, 0.48);
  box-shadow:
    0 16px 40px rgba(30, 74, 158, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.sga-confirm:active {
  transform: translateY(0);
}

@media (max-width: 560px) {
  .sga-hero {
    padding: 14px 44px 12px 18px;
  }

  .sga-content {
    padding: 16px 18px 6px;
  }

  .sga-body-panel {
    padding: 16px 16px;
    max-height: min(52vh, 400px);
  }

  .sga-foot {
    padding: 14px 18px 22px;
  }

  .sga-confirm {
    width: 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #globalAnnouncementDialog.sga-dialog::backdrop,
  #globalAnnouncementDialog.sga-dialog.sga-dialog--open .sga-shell {
    animation: none;
  }

  .sga-confirm:hover {
    transform: none;
  }
}
