/* 公告弹窗：独立公共样式 */
body.modal-open {
  overflow: hidden;
}

.announcement-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  background:
    radial-gradient(circle at 50% 18%, #17274a 0%, #0f1b35 34%, #09101f 72%),
    #09101f;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.announcement-modal.is-visible {
  opacity: 1;
  visibility: visible;
}

.announcement-content {
  position: relative;
  isolation: isolate;
  display: flex;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: clamp(2rem, 7vw, 5rem) clamp(1.25rem, 6vw, 4rem);
  overflow-y: auto;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 12% 12%, #1b2c50 0%, #14213d 34%, #0d162b 74%),
    #0d162b;
}

.announcement-content::before,
.announcement-content::after {
  content: '';
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(2px);
}

.announcement-content::before {
  top: -18%;
  left: -10%;
  width: min(42vw, 520px);
  aspect-ratio: 1;
  background: radial-gradient(circle, #452c75 0%, #1a2850 42%, #101a32 73%);
  opacity: 0.62;
}

.announcement-content::after {
  right: -8%;
  bottom: -20%;
  width: min(36vw, 460px);
  aspect-ratio: 1;
  background: radial-gradient(circle, #673149 0%, #2b2345 46%, #10182e 76%);
  opacity: 0.5;
}

.announcement-panel {
  position: relative;
  width: min(100%, 720px);
  padding: clamp(2rem, 5vw, 3.35rem) clamp(1.25rem, 5vw, 3.5rem) clamp(1.4rem, 4vw, 2.6rem);
  overflow: hidden;
  border: 1px solid #344465;
  border-radius: clamp(20px, 3vw, 30px);
  background: linear-gradient(155deg, #182747 0%, #121e38 48%, #0f192f 100%);
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.46),
    0 10px 30px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 #415274,
    inset 0 -1px 0 #0b1326;
  text-align: center;
}

.announcement-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  width: 80%;
  height: 4px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, #7e4d9f 0%, #f05c79 48%, #f2a65a 100%);
  box-shadow: 0 0 22px rgba(233, 69, 96, 0.46);
}

.announcement-panel::after {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid #243657;
  border-radius: clamp(14px, 2.3vw, 22px);
  pointer-events: none;
}

.announcement-panel > * {
  position: relative;
  z-index: 1;
}

.announcement-icon {
  display: grid;
  place-items: center;
  width: clamp(62px, 10vw, 82px);
  height: clamp(62px, 10vw, 82px);
  margin: 0 auto 1rem;
  border: 1px solid #4b5f82;
  border-radius: 24px;
  background: linear-gradient(145deg, #273b63 0%, #192946 100%);
  box-shadow: 0 15px 34px rgba(0, 0, 0, 0.34), inset 0 1px 0 #5b6f91;
  font-size: clamp(2rem, 6vw, 2.85rem);
  transform: rotate(-2deg);
}

.announcement-label {
  display: inline-flex;
  width: auto;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0 auto 0.85rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid #663e67;
  border-radius: 999px;
  background: #251c3c;
  color: #f3aec0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.announcement-label::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f05c79;
  box-shadow: 0 0 10px #f05c79;
}

.announcement-title {
  margin: 0 0 1.1rem;
  color: #fff;
  font-size: clamp(1.55rem, 4vw, 2.15rem);
  letter-spacing: 0.04em;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.28);
}

.announcement-description {
  margin: 0 0 1.45rem;
  padding: clamp(1rem, 3vw, 1.35rem) clamp(1rem, 3vw, 1.4rem);
  border: 1px solid #2f4162;
  border-radius: 16px;
  background: linear-gradient(145deg, #15233f 0%, #111c33 100%);
  color: #c9d2e2;
  font-size: clamp(0.98rem, 2.5vw, 1.08rem);
  line-height: 1.9;
  text-align: left;
  box-shadow: inset 0 1px 0 #354665;
}

.announcement-btn {
  display: inline-flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  border: 1px solid #f47a91;
  border-radius: 15px;
  background: linear-gradient(135deg, #e94560 0%, #a64080 52%, #5d3c93 100%);
  color: #fff;
  font-size: 1.03rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  box-shadow: 0 14px 30px rgba(233, 69, 96, 0.28), inset 0 1px 0 #ff9bad;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.announcement-btn::after {
  content: '→';
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  color: #b23d75;
  font-size: 0.95rem;
  line-height: 1;
  transition: transform 0.25s ease;
}

.announcement-btn:hover,
.announcement-btn:focus-visible {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(233, 69, 96, 0.36), inset 0 1px 0 #ffb0bd;
  outline: none;
}

.announcement-btn:hover::after,
.announcement-btn:focus-visible::after {
  transform: translateX(4px);
}

.announcement-page-close {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  z-index: 2010;
  display: flex;
  width: 32px;
  height: 32px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(255, 255, 255, 0.28);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  opacity: 0.72;
}

.announcement-page-close:hover,
.announcement-page-close:focus-visible {
  color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.055);
  opacity: 1;
  outline: none;
}

@media (max-width: 600px) {
  .announcement-content {
    padding: max(3.4rem, env(safe-area-inset-top)) 0.85rem max(1.3rem, env(safe-area-inset-bottom));
  }

  .announcement-panel {
    padding: 1.75rem 1rem 1.15rem;
    border-radius: 20px;
  }

  .announcement-panel::after {
    inset: 8px;
    border-radius: 14px;
  }

  .announcement-icon {
    border-radius: 19px;
  }

  .announcement-description {
    padding: 0.95rem;
    border-radius: 13px;
    line-height: 1.78;
  }

  .announcement-btn {
    min-height: 50px;
    border-radius: 13px;
  }
}

@media (max-height: 620px) and (orientation: landscape) {
  .announcement-content {
    justify-content: flex-start;
    padding-top: 2.4rem;
    padding-bottom: 1.2rem;
  }

  .announcement-panel {
    padding-top: 1.55rem;
  }

  .announcement-icon {
    width: 54px;
    height: 54px;
    margin-bottom: 0.65rem;
    border-radius: 17px;
    font-size: 1.9rem;
  }

  .announcement-title {
    margin-bottom: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .announcement-modal,
  .announcement-btn,
  .announcement-btn::after {
    transition-duration: 0.01ms !important;
  }
}
