/* Ad gate modal, H5 news page, rewarded prompt, interstitial. */

/* ---------------------------------------------------------------- modal */

.modalLayer {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, .74);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.modalLayer.show { display: flex; }

.modal {
  width: min(430px, 96vw);
  background: #17171d;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, .6);
  animation: modalIn .18s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.modal h3 { margin-bottom: 10px; font-size: 19px; }
.modal p { color: #c7c7cf; line-height: 1.6; margin: 0; font-size: 14px; }
.modalActions { display: flex; gap: 10px; margin-top: 20px; }
.modalActions .btn { flex: 1; }

/* Google-styled rewarded variant — matches the visual language of a real
   rewarded ad dialog so the flow reads correctly during review. */
.modal.googleRewardModal {
  width: min(420px, 92vw);
  background: #fff;
  color: #202124;
  border: 1px solid #dadce0;
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .28);
}
.googleRewardModal .googleAdHead {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 10px;
}
.googleRewardModal .googleMark {
  font: 600 18px Arial, sans-serif;
  letter-spacing: -.4px;
  color: #5f6368;
}
.googleRewardModal .googleAdLabel {
  font-size: 11px;
  color: #80868b;
  border: 1px solid #dadce0;
  border-radius: 3px;
  padding: 2px 5px;
}
.googleRewardModal .googleAdBody { padding: 4px 20px 8px; }
.googleRewardModal h3 { font: 500 20px/1.35 Arial, sans-serif; margin-bottom: 10px; color: #202124; }
.googleRewardModal p { font: 14px/1.55 Arial, sans-serif; color: #5f6368; }
.googleRewardModal .googleAdFoot { padding: 10px 20px 18px; }
.googleRewardModal .modalActions { justify-content: flex-end; gap: 8px; margin-top: 14px; }
.googleRewardModal .btn {
  flex: 0 0 auto;
  min-width: 86px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #1a73e8;
  font: 500 14px Arial, sans-serif;
  padding: 10px 14px;
}
.googleRewardModal .btn:hover { background: #f1f3f4; }
.googleRewardModal .btn.primary { background: #1a73e8; color: #fff; }
.googleRewardModal .btn.primary:hover { background: #1765cc; }
.rewardHint {
  display: block;
  font: 12px/1.45 Arial, sans-serif;
  color: #80868b;
  margin-top: 10px;
}

/* ---------------------------------------------------------------- H5 news */

.newsPage {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: #f6f6f3;
  color: #191919;
  display: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.newsPage.show { display: block; }

.newsTop {
  height: 58px;
  background: #fff;
  border-bottom: 1px solid #ddd;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 2;
}
.newsTop b { font-size: 17px; }
.newsBack {
  border: 1px solid #ddd;
  background: #eee;
  color: #111;
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
}
.newsBack:hover { background: #e2e2e2; }

.newsContent { max-width: 820px; margin: 0 auto; padding: 36px 20px 120px; }
.newsContent .kicker { color: #777; font-size: 13px; }
.newsContent h1 { font-size: clamp(28px, 5vw, 42px); line-height: 1.1; margin: 10px 0 22px; }
.newsContent p { font: 17px/1.8 Georgia, "Times New Roman", serif; color: #333; margin: 0 0 18px; }

/* In-article placeholder slot. This is where a display ad would render once a
   network is wired up; kept visible in mock mode so the layout is realistic. */
.newsAdSlot {
  margin: 26px 0;
  padding: 22px;
  border: 1px dashed #c9c9c9;
  border-radius: 10px;
  background: #fff;
  text-align: center;
  color: #999;
  font-size: 13px;
  min-height: 110px;
  display: grid;
  place-items: center;
}

/* ---------------------------------------------------------------- prompt */

.webAdPrompt {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(460px, 92vw);
  background: #fff;
  color: #111;
  border: 1px solid #ddd;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 18px 65px rgba(0, 0, 0, .3);
  display: none;
  z-index: 160;
}
.webAdPrompt.show { display: block; animation: modalIn .18s ease-out; }
.webAdPrompt b { display: block; margin-bottom: 8px; font-size: 16px; }
.webAdPrompt .promptText { font-size: 14px; color: #444; line-height: 1.5; }
.webAdPrompt .promptClose {
  position: absolute;
  right: 12px; top: 10px;
  width: 34px; height: 34px;
  border: 0;
  border-radius: 50%;
  background: #eee;
  color: #444;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.webAdPrompt .promptClose:hover { background: #e0e0e0; }
.webAdPrompt .watchBtn {
  margin-top: 16px;
  width: 100%;
  padding: 13px;
  border: 0;
  border-radius: 12px;
  background: #1565c0;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
}
.webAdPrompt .watchBtn:hover { background: #114f9b; }

/* ---------------------------------------------------------------- interstitial */

.interstitial {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: #111;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.interstitial.show { display: flex; }

.adCreative {
  width: min(720px, 94vw);
  height: min(520px, 82vh);
  border-radius: 26px;
  background: linear-gradient(135deg, #e7efff, #fff 50%, #ffd8e3);
  color: #161616;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}
.adCreative h2 { font-size: clamp(26px, 4vw, 36px); margin-bottom: 10px; }
.adCreative p { margin: 0; color: #555; }
.adBrand { position: absolute; left: 18px; top: 18px; font-size: 12px; color: #666; }
.countdown {
  position: absolute;
  right: 18px; top: 18px;
  background: rgba(0, 0, 0, .72);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.closeAd {
  position: absolute;
  right: 18px; bottom: 18px;
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  background: #222;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.closeAd:hover { background: #000; }

/* Where a real IMA/GPT creative would mount. */
.adSlotMount {
  position: absolute;
  inset: 0;
  display: none;
}
.adSlotMount.active { display: block; }

/* ---------------------------------------------------------------- ad slots

   Operator-configured display slots.

   Deliberately bare: a real creative fills the box and brings its own styling,
   so wrapping it in the dashed "unsold inventory" placeholder the development
   version used would put a visible empty box on every page.

   Spacing is applied only when there is something inside. A slot with nothing
   configured stays in the DOM at zero height rather than being hidden with
   `display: none`, because AdSense and GPT both measure their container when
   they render — hiding it produces a zero-sized ad or none at all. */
.adSlot:not(:empty) { margin: 22px 0; }
.adSlot:not(:empty) > ins,
.adSlot:not(:empty) > iframe { max-width: 100%; }
