/*
  进站延迟弹窗样式（Entry Modal）
  使用说明：
  1) 在模板 head 中引入本 CSS（已由系统自动插入到 news/common/header.html）。
  2) 在模板底部引入 JS（已由系统自动插入到 news/common/footer.html）。
  3) 弹窗的文案、延迟时间、是否只在当前会话显示一次等，在 entry-modal.js 中的 config 配置项修改。
*/

:root {
  --em-bg: #ffffff;
  --em-text: #333;
  --em-primary: #4f46e5; /* 靛蓝 */
  --em-primary-2: #22d3ee; /* 青色 */
}

.entry-modal-overlay {
  position: fixed;
  inset: 0;
  display: none; /* 初始隐藏 */
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  backdrop-filter: saturate(120%) blur(2px);
  z-index: 9999;
}

.entry-modal-overlay.show {
  display: flex;
  animation: em-fade-in 220ms ease-out both;
}

@keyframes em-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.entry-modal {
  position: relative;
  width: calc(100% - 40px);
  max-width: 560px;
  border-radius: 20px;
  background: rgba(255,255,255,0.96); /* 白色半透明 */
  color: var(--em-text);
  box-shadow: 0 12px 30px rgba(0,0,0,0.20);
  overflow: hidden;
  transform: scale(0.96);
  opacity: 0;
  animation: em-pop 240ms cubic-bezier(.22,.61,.36,1) 80ms both;
}

@keyframes em-pop {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.entry-modal__gradient {
  height: 6px;
  background: linear-gradient(90deg, var(--em-primary), var(--em-primary-2));
}

.entry-modal__content {
  padding: 18px 22px 20px;
}

.entry-modal__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.entry-modal__icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(79,70,229,.12), rgba(34,211,238,.12));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.entry-modal__icon img { width: 100%; height: 100%; object-fit: cover; }

.entry-modal__title {
  font-size: 18px;
  font-weight: 700;
}

.entry-modal__desc {
  margin-top: 8px;
  line-height: 1.7;
  color: #555;
}

.entry-modal__actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
}

.em-btn {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.08);
  background: #f8fafc;
  color: #334155;
  font-weight: 600;
  cursor: pointer;
}

.em-btn--primary {
  background: linear-gradient(135deg, var(--em-primary), var(--em-primary-2));
  color: #fff;
  border: none;
}

.entry-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777;
  cursor: pointer;
  transition: background 0.2s ease;
}

.entry-modal__close:hover { background: rgba(0,0,0,0.06); }

@media (max-width: 480px) {
  .entry-modal__title { font-size: 16px; }
  .entry-modal__desc { font-size: 14px; }
}