/* 发现工具弹窗样式 —— 独立文件，不影响模板自身样式 */

/* 兼容补丁：老浏览器（iOS < 15.4 / 旧 WebView）不支持 <dialog>，
   会把模板自带的「系统公告」「联系我们」当成普通块渲染，一直挂在页面上。 */
dialog:not([open]) {
  display: none !important;
}

/* 隐藏 NG 模板的分类大标题（「推荐平台」+ 上下装饰线）。
   顶部标签已经显示当前分类，这块是重复信息。
   想恢复：把下面这条规则删掉即可。 */
.ng-content > h2 {
  display: none !important;
}

/* ===== 卡片：去掉固定高度，高度跟着内容走，同一行自动等高 ===== */
.ng-card {
  min-height: 0 !important;
  align-content: start !important;
  padding: 14px !important;
  grid-template-columns: 66px minmax(0, 1fr) !important;
}
/* 图标再放大一点，并去掉内圈留白，让图片铺满整个圆 */
.ng-avatar {
  width: 66px !important;
  height: 66px !important;
  padding: 0 !important;
  object-fit: cover !important;
  border: 2px solid #1f6feb2e !important;
  background: #fff !important;
  overflow: hidden !important;
}
.ng-grid {
  gap: 12px !important;
  align-items: stretch !important;
}
.ng-meta h3 {
  font-size: 17px !important;
  line-height: 1.3 !important;
}
.ng-description {
  -webkit-line-clamp: 2 !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  margin-top: 3px;
}
.ng-go {
  min-height: 42px !important;
  margin-top: 10px !important;
  font-size: 13px !important;
}
.ng-card.has-badge {
  padding-top: 30px !important;
}

/* 角标：默认蓝色太淡，改成更醒目的橙红渐变，位置贴右上角 */
.ng-badge {
  top: 0 !important;
  right: 10px !important;
  padding: 3px 9px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .5px;
  border-radius: 0 0 9px 9px !important;
  background: linear-gradient(135deg, #ff7a3d, #ff3d6e) !important;
  box-shadow: 0 4px 10px rgba(255, 77, 109, .35) !important;
  color: #fff !important;
}

@keyframes nv-spin {
  to { transform: rotate(360deg); }
}

@keyframes nv-spin {
  to { transform: rotate(360deg); }
}

/* ===== 自建启动页：整屏纯白 + 罗盘 + 旋转弧 ===== */
html.nv-loading,
html.nv-loading body {
  background: #ffffff !important;
}
html.nv-loading .background,
html.nv-loading .ng-particles {
  display: none !important;
}
html.nv-loading .ng-page {
  background-image: none !important;
  background-color: #ffffff !important;
}
html.nv-loading #app {
  background: #ffffff !important;
}
@media (max-width: 768px) {
  .ng-card {
    padding: 12px !important;
    grid-template-columns: 58px minmax(0, 1fr) !important;
  }
  .ng-avatar {
    width: 58px !important;
    height: 58px !important;
  }
  .ng-go {
    min-height: 40px !important;
  }
}
@media (max-width: 420px) {
  .ng-card {
    padding: 11px !important;
    grid-template-columns: 54px minmax(0, 1fr) !important;
  }
  .ng-avatar {
    width: 54px !important;
    height: 54px !important;
  }
  .ng-meta h3 {
    font-size: 16px !important;
  }
  .ng-description {
    font-size: 12px !important;
  }
}

.nv-mask {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 99999;
  background: rgba(12, 26, 42, .55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.nv-mask.on { display: flex; }

.nv-dialog {
  position: relative;
  width: min(400px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 18px;
  padding: 24px 22px 20px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(9, 30, 55, .3);
  animation: nvIn .22s ease;
}
@keyframes nvIn { from { opacity: 0; transform: translateY(12px) scale(.97); } }

.nv-dialog h3 { margin: 0 0 6px; font-size: 17px; color: #16324a; }
.nv-dialog .nv-sub { font-size: 12px; color: #93a3b2; margin-bottom: 14px; }
.nv-close {
  position: absolute; top: 10px; right: 12px;
  border: 0; background: transparent; font-size: 20px;
  color: #9aa9b8; cursor: pointer; line-height: 1; padding: 4px 8px;
}

.nv-btn {
  display: inline-block;
  min-width: 132px;
  padding: 11px 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #4a9eff, #3b7ee0);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(58, 126, 224, .3);
  font-family: inherit;
  margin-top: 14px;
}
.nv-btn:disabled { background: #c9d6e2; box-shadow: none; cursor: not-allowed; }

/* ============ 爆率增加器 ============ */
.nv-stage { min-height: 130px; display: flex; align-items: center; justify-content: center; }
.nv-state { text-align: center; padding: 14px 0 4px; }
.nv-state-title { font-size: 16px; font-weight: 700; color: #16324a; letter-spacing: .5px; }
.nv-state-caption { font-size: 12px; color: #93a3b2; margin-top: 6px; }

.nv-terminal {
  height: 168px;
  overflow-y: auto;
  scrollbar-width: thin;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  text-align: left;
  background: #0e1c2b;
  color: #6ff0c0;
  border-radius: 10px;
  padding: 12px 14px;
  line-height: 1.9;
}
.nv-terminal div { opacity: 0; animation: nvLine .2s ease forwards; }
@keyframes nvLine { to { opacity: 1; } }
.nv-term-dot { color: #4ad8a4; }

.nv-progress {
  height: 4px; background: #e9eff6; border-radius: 999px;
  overflow: hidden; margin-top: 12px;
}
.nv-progress span {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, #4ad8a4, #4a9eff);
  transition: width .25s linear;
}

.nv-done { text-align: center; padding: 4px 0 2px; }
.nv-check {
  width: 40px;
  height: 40px;
  margin: 6px auto 12px;
  border-radius: 50%;
  background: #e6f8ee;
  color: #22b573;
  font-size: 20px;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}
.nv-done-label { font-size: 14px; color: #34434d; letter-spacing: .5px; }
.nv-pct-big {
  font-size: 54px;
  font-weight: 800;
  color: #2b6cf6;
  letter-spacing: -1px;
  line-height: 1.1;
  margin: 8px 0 2px;
}
.nv-pct-big small { font-size: 22px; font-weight: 700; margin-left: 2px; }
.nv-done-note { font-size: 13px; color: #8a99a8; margin-top: 2px; }

/* 头部：图标 + 标题左对齐 */
.nv-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 34px;
  margin-bottom: 12px;
  text-align: left;
}
.nv-head h3 { margin: 0; font-size: 16px; color: #16324a; font-weight: 700; }
.nv-head-ico {
  width: 26px; height: 26px;
  border-radius: 8px;
  background: #eef4ff;
  display: grid; place-items: center;
  font-size: 14px;
  flex: 0 0 26px;
}

/* 已完成按钮（整宽、浅绿） */
.nv-btn-done {
  display: block;
  width: 100%;
  min-width: 0;
  background: #e9f7ee !important;
  color: #2bb673 !important;
  box-shadow: none !important;
  font-weight: 600;
  margin-top: 16px;
}
.nv-foot-note {
  font-size: 12px;
  color: #a3b0bd;
  margin-top: 12px;
  text-align: center;
}

/* ============ 幸运抽奖（对齐 ng28.to） ============ */
.nv-wheel-state {
  margin: 4px 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: #087e87;
  letter-spacing: .5px;
}
.nv-fortune {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 0 auto 14px;
}
.nv-fortune-wheel {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 7px solid #fff;
  box-shadow: 0 8px 24px rgba(8, 126, 135, .12);
  overflow: hidden;
  background-color: #e8f4f8;  /* 老浏览器没有 conic-gradient 时的兜底底色 */
  background-image: conic-gradient(
    #daedf9 0deg, #daedf9 60deg,
    #e0f2ea 60deg, #e0f2ea 120deg,
    #fff0cb 120deg, #fff0cb 180deg,
    #fce1e6 180deg, #fce1e6 240deg,
    #eee4fb 240deg, #eee4fb 300deg,
    #c8efeb 300deg, #c8efeb 360deg
  );
}
.nv-fortune-wheel.spinning {
  transition: transform 5s cubic-bezier(.12, .7, .12, 1);
}
.nv-fortune-prize {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  text-align: center;
}
.nv-fortune-prize > span {
  display: block;
  width: 100%;
  padding-top: 12px;
  text-align: center;
  color: #244356;
}
.nv-fortune-prize strong {
  display: inline-block;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
  color: #244356;
}
.nv-fortune-pointer {
  position: absolute;
  top: 0;
  left: calc(50% - 11px);
  width: 22px;
  height: 31px;
  background: #e64964;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .2));
  z-index: 3;
}
.nv-fortune-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #087e87;
  border: 4px solid #fff;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 20px;
  box-shadow: 0 2px 10px rgba(21, 61, 57, .2);
  z-index: 2;
}
.nv-wheel-result { min-height: 46px; }
.nv-wheel-result p { margin: 0; display: flex; justify-content: center; }
.nv-wheel-result strong { color: #087e87; font-size: 24px; line-height: 1.3; }
.nv-wheel-result span { font-size: 12px; color: #8697a8; }

@media (max-width: 480px) {
  .nv-dialog { padding: 22px 16px 18px; border-radius: 16px; }
  .nv-fortune { width: 210px; height: 210px; }
  .nv-fortune-prize strong { font-size: 12px; }
}
