/* ====================================================================
   BCCEXX Games — Quiz reward ad + shimmer
   Loaded only by quiz pages, which run with the site chrome
   (topbar / sidebar / breadcrumb / mobile nav) commented out.
   ==================================================================== */

/* ── Chrome-off layout ──
   .main normally sits in grid column 2 next to the sidebar and reserves
   room for the bottom mobile nav. With that markup commented out, the
   shell collapses to a single full-width column. */
.app-shell { grid-template-columns: 1fr; }
.main { grid-column: 1; padding-bottom: 0; }
@media (max-width: 900px) {
  .main { padding-bottom: 0; }
}
/* Tighter gutters for the in-app view — the topbar and breadcrumb that
   used to sit above the content are commented out on these pages. */
.content {
  padding-top: 10px;
  padding-left: 10px;
  padding-right: 10px;
}

/* Ads must render unclipped: the base .ad-slot rule in style.css rounds
   the container to 16px with overflow:hidden, which slices the corners
   off the AdSense iframe. Square it off here (quiz pages only). */
.ad-slot {
  border-radius: 0;
  overflow: visible;
  margin: 10px 0;
}

/* ── Shimmer ── */
@keyframes qr-shimmer { 100% { transform: translateX(100%); } }

.shimmer {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.09), transparent);
  animation: qr-shimmer 1.3s infinite;
}

/* Ad slots shimmer until AdSense reports the unit filled. */
.ad-slot.is-loading {
  position: relative;
  overflow: hidden;
  min-height: 100px;
  background: var(--surface-2);
  border-radius: 0;
}
.ad-slot.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.09), transparent);
  animation: qr-shimmer 1.3s infinite;
}
.ad-slot.is-empty { display: none; }

/* ── Reward modal ── */
.qr-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  z-index: 120;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.qr-modal.active { display: flex; }

.qr-card {
  background: linear-gradient(160deg, #4b3a9e, #3b2d7d);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-2xl);
  padding: 30px 24px 24px;
  text-align: center;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  animation: qr-pop 0.28s var(--ease);
}
@keyframes qr-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}

.qr-icon { font-size: 2.6rem; color: #fbbf24; margin-bottom: 14px; line-height: 1; }

/* Wrong-answer variant: red disc instead of the gold coin stack. */
.qr-icon--wrong {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(239,68,68,0.16);
  color: #f87171;
  font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
}
.qr-card--wrong .qr-title { color: #fff; }
.qr-title { font-weight: 800; font-size: 1.35rem; color: #fbbf24; margin-bottom: 6px; }
.qr-sub { color: #e6e2ff; font-size: 0.95rem; margin-bottom: 22px; }
.qr-sub strong { color: #fbbf24; font-weight: 800; }

.qr-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 15px 18px;
  border: none;
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  transition: filter var(--t-fast), transform var(--t-fast);
}
.qr-btn + .qr-btn { margin-top: 10px; }
.qr-btn:not(:disabled):hover { filter: brightness(1.08); }
.qr-btn:not(:disabled):active { transform: scale(0.985); }
.qr-btn:disabled { cursor: default; opacity: 0.75; }

.qr-btn--reward {
  background: linear-gradient(180deg, #f0a020, #e08910);
  color: #fff;
  box-shadow: 0 4px 14px rgba(224,137,16,0.35);
}
.qr-btn--claim {
  background: rgba(255,255,255,0.14);
  color: #fff;
}

.qr-2x {
  background: #e5484d;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: 0.3px;
}

/* Loading state — the button body becomes a shimmer skeleton
   while the rewarded ad is being fetched. */
.qr-btn--reward.is-loading {
  background: rgba(255,255,255,0.10);
  box-shadow: none;
  pointer-events: none;
  padding: 0;
  height: 52px;
  overflow: hidden;
  position: relative;
}
.qr-btn--reward.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.16), transparent);
  animation: qr-shimmer 1.1s infinite;
}

.qr-note {
  margin-top: 14px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.62);
  min-height: 1em;
}

@media (max-width: 640px) {
  .qr-card { padding: 26px 18px 20px; }
  .qr-title { font-size: 1.2rem; }
  .qr-btn { font-size: 0.92rem; padding: 14px 14px; }
}
