/* ============================================================
   KRONOS ZHOU · 页面级提示框样式
   路径：shared/page-notice.css
   ------------------------------------------------------------
   被"进页面先弹提示"的页面引用（当前：几何冲刺关卡库 / 随机航班 /
   手机型号配置参数数据库），和 shared/page-notice.js 是一对。
   变量全部取自 main-page.css，并都给了兜底值，
   万一哪天在没引 main-page.css 的页面里也不会变成裸样式。
   ============================================================ */

/* ============================================================
   遮罩 + 面板
   z-index 比站内所有浮层都高（详情抽屉 1400 / 抽屉 1200 / 登录门 900），
   因为它是"进门第一道"的东西，不能被别的浮层盖住。
   ============================================================ */
.page-notice-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  background: rgba(6, 8, 12, 0.74);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: page-notice-fade 0.24s ease both;
}

.page-notice-panel {
  position: relative;
  width: min(30rem, 100%);
  max-height: 88vh;
  overflow-y: auto;
  padding: 2.2rem 2rem 1.7rem;
  text-align: center;
  border-radius: var(--radius-lg, 1.8rem);
  border: 1px solid var(--border-medium, rgba(255, 255, 255, 0.12));
  background:
    radial-gradient(120% 90% at 15% 0%, rgba(91, 141, 239, 0.13), transparent 55%),
    linear-gradient(160deg, rgba(30, 36, 48, 0.98), rgba(22, 26, 34, 0.98));
  box-shadow: var(--shadow-panel, 0 20px 40px -12px rgba(0, 0, 0, 0.7)),
              0 40px 90px -30px rgba(0, 0, 0, 0.85);
  animation: page-notice-rise 0.3s cubic-bezier(0.2, 0.9, 0.4, 1) both;
}

/* 顶部一条很细的高光，像玻璃边缘 */
.page-notice-panel::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  pointer-events: none;
}

/* ============================================================
   图标（装饰，aria-hidden）
   ============================================================ */
.page-notice-icon {
  width: 3.1rem;
  height: 3.1rem;
  margin: 0 auto 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  line-height: 1;
  border-radius: 50%;
  border: 1px solid var(--border-medium, rgba(255, 255, 255, 0.12));
  background: var(--accent-soft, rgba(91, 141, 239, 0.15));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ============================================================
   正文
   ============================================================ */
.page-notice-text {
  margin: 0 auto;
  max-width: 26rem;
  font-size: 1rem;
  line-height: 1.95;
  letter-spacing: 0.01em;
  color: var(--text-primary, #eef2f8);
}

/* ============================================================
   底部按钮
   ============================================================ */
.page-notice-actions {
  margin-top: 1.8rem;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.page-notice-btn {
  min-width: 7.5rem;
  padding: 0.66rem 1.6rem;
  border-radius: var(--radius-sm, 1rem);
  border: 1px solid var(--border-medium, rgba(255, 255, 255, 0.12));
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary, #9aa8bc);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color var(--transition, 0.28s ease), background var(--transition, 0.28s ease),
              border-color var(--transition, 0.28s ease), filter var(--transition, 0.28s ease),
              box-shadow var(--transition, 0.28s ease), transform var(--transition, 0.28s ease);
}

/* 次按钮：返回 / 进入里不是主的那个 */
.page-notice-btn:hover,
.page-notice-btn:focus-visible {
  color: var(--text-primary, #eef2f8);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

/* 主按钮 */
.page-notice-btn-primary {
  border-color: var(--accent, #5b8def);
  background: var(--accent, #5b8def);
  color: #fff;
}

.page-notice-btn-primary:hover,
.page-notice-btn-primary:focus-visible {
  color: #fff;
  background: var(--accent, #5b8def);
  border-color: var(--accent, #5b8def);
  filter: brightness(1.1);
  box-shadow: 0 10px 24px -12px var(--accent-glow, rgba(91, 141, 239, 0.35));
  transform: translateY(-1px);
}

.page-notice-btn:active {
  transform: translateY(0) scale(0.98);
}

/* 键盘焦点：两种情况都要看得见 */
.page-notice-btn:focus-visible {
  outline: 2px solid var(--accent, #5b8def);
  outline-offset: 2px;
}

/* 弹窗开着时锁住页面滚动 */
body.page-notice-open {
  overflow: hidden;
}

/* ============================================================
   动画
   ============================================================ */
@keyframes page-notice-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes page-notice-rise {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .page-notice-overlay,
  .page-notice-panel {
    animation: none;
  }
}

/* ============================================================
   窄屏：按钮撑满、上下排
   ============================================================ */
@media (max-width: 560px) {
  .page-notice-panel {
    padding: 1.8rem 1.25rem 1.45rem;
    border-radius: var(--radius-md, 1.4rem);
  }

  .page-notice-text {
    font-size: 0.94rem;
  }

  .page-notice-actions {
    flex-direction: column;
    gap: 0.6rem;
  }

  .page-notice-btn {
    width: 100%;
  }
}
