/* ==========================================================================
   App detail pages (PopCut, Sudoku Play, QRBee).
   Loaded after style.css + yt.css. Each page picks its colours by body class.
   ========================================================================== */

body.ad-popcut { --a1: #6d5bff; --a2: #ff5ca8; --a3: #22d3ee; }
body.ad-sudoku { --a1: #3b6dff; --a2: #8b5cf6; --a3: #ffb020; }
body.ad-qrbee  { --a1: #0fb985; --a2: #0af5b0; --a3: #ffc72c; }
body.ad-qrbee { --yt-bg: #030807; --yt-bg-2: #07120f; --yt-panel: rgba(12,28,24,.66); --yt-line: rgba(10,245,176,.16); }

/* ---- Hero ---- */
.ad-logo-row { display: flex; align-items: center; gap: 14px; margin: 6px 0 22px; }
.ad-logo-row img { width: 58px; height: 58px; border-radius: 16px; box-shadow: 0 10px 28px rgba(0,0,0,.45); }
.ad-logo-row b { display: block; font-family: var(--yt-head); font-size: 1.15rem; color: #fff; line-height: 1.2; }
.ad-logo-row small { display: block; color: var(--yt-muted); font-size: .85rem; }

.ad-play { display: inline-flex; align-items: center; gap: 12px; padding: 12px 22px 12px 16px; border-radius: 16px; color: #fff; background: linear-gradient(110deg, var(--a1), var(--a2)); box-shadow: 0 14px 36px color-mix(in srgb, var(--a1) 45%, transparent); transition: transform .35s var(--yt-ease), box-shadow .35s; }
.ad-play:hover { transform: translateY(-3px); box-shadow: 0 20px 50px color-mix(in srgb, var(--a2) 50%, transparent); }
.ad-play img { width: 26px; height: 26px; }
.ad-play small { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.ad-play b { display: block; font-size: 1.1rem; line-height: 1.15; }
body.ad-qrbee .ad-play { color: #02130d; }

/* Three store screenshots fanned out next to the headline */
.ad-fan { position: relative; height: 560px; }
.ad-fan img { position: absolute; top: 50%; left: 50%; width: 236px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 26px; border: 1px solid rgba(255,255,255,.16); box-shadow: 0 40px 80px rgba(0,0,0,.55); }
.ad-fan img:nth-child(1) { transform: translate(-118%, -47%) rotate(-9deg) scale(.88); animation: ad-l 8s ease-in-out infinite; }
.ad-fan img:nth-child(3) { transform: translate(18%, -47%) rotate(9deg) scale(.88); animation: ad-r 9s ease-in-out infinite; }
.ad-fan img:nth-child(2) { z-index: 2; transform: translate(-50%, -50%); box-shadow: 0 50px 100px rgba(0,0,0,.6), 0 0 90px color-mix(in srgb, var(--a1) 45%, transparent); animation: ad-c 7s ease-in-out infinite; }
@keyframes ad-c { 50% { transform: translate(-50%, -53%); } }
@keyframes ad-l { 50% { transform: translate(-120%, -44%) rotate(-12deg) scale(.88); } }
@keyframes ad-r { 50% { transform: translate(20%, -50%) rotate(12deg) scale(.88); } }
.ad-fan .yt-chip-float { transform: none; animation: yt-bob 6s ease-in-out infinite; }
.ad-fan .yt-chip-float.a { top: 9%; left: 0; }
.ad-fan .yt-chip-float.b { bottom: 12%; right: 0; animation-delay: -2s; }
.ad-fan .yt-chip-float.c { bottom: 3%; left: 6%; animation-delay: -4s; }

/* ---- Screenshot strip ---- */
.ad-gallery { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px max(16px, calc((100vw - 1200px) / 2)) 26px; margin-top: 46px; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--a1) 60%, transparent) transparent; }
.ad-gallery img { flex: 0 0 auto; width: 240px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 22px; scroll-snap-align: center; border: 1px solid var(--yt-line); box-shadow: 0 24px 50px rgba(0,0,0,.45); transition: transform .5s var(--yt-ease); }
.ad-gallery img:hover { transform: translateY(-8px); }
.ad-gallery-hint { color: var(--yt-muted); font-size: .85rem; margin-top: 4px; }

/* ---- Spotlight split ---- */
.ad-spot-img { display: flex; justify-content: center; }
.ad-spot-img img { width: min(320px, 80%); aspect-ratio: 9 / 16; object-fit: cover; border-radius: 30px; border: 1px solid var(--yt-line); box-shadow: 0 40px 90px rgba(0,0,0,.55), 0 0 80px color-mix(in srgb, var(--a2) 30%, transparent); }

/* ---- Steps with three items ---- */
.yt-steps.s3 { grid-template-columns: repeat(3, 1fr); max-width: 900px; margin-left: auto; margin-right: auto; }

/* ---- Final CTA ---- */
.ad-qr { display: inline-flex; align-items: center; gap: 16px; margin-top: 34px; padding: 14px 20px 14px 14px; border-radius: 20px; text-align: left; background: var(--yt-panel); border: 1px solid var(--yt-line); }
.ad-qr img { width: 104px; height: 104px; padding: 6px; border-radius: 12px; background: #fff; }
.ad-qr b { display: block; color: #fff; font-family: var(--yt-head); }
.ad-qr span { color: var(--yt-muted); font-size: .88rem; line-height: 1.5; }
.ad-legal { margin-top: 26px; color: var(--yt-muted); font-size: .85rem; }
.ad-legal a { color: var(--a2); text-decoration: underline; }
.yt #faq { background: var(--yt-bg-2); }
.yt .faq-answer a { color: var(--a2); text-decoration: underline; }

/* ---- More apps strip ---- */
.ad-more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 40px; text-align: left; }
.ad-more a { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: var(--yt-panel); border: 1px solid var(--yt-line); transition: transform .4s var(--yt-ease), border-color .3s; }
.ad-more a:hover { transform: translateY(-4px); border-color: var(--a2); }
.ad-more img { width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0; }
.ad-more b { display: block; color: #fff; font-size: .95rem; }
.ad-more small { color: var(--yt-muted); font-size: .8rem; }

@media (max-width: 900px) {
  .ad-logo-row { justify-content: center; }
  .ad-fan { height: 500px; }
  .ad-more { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .ad-fan { height: 400px; }
  .ad-fan img { width: 168px; border-radius: 20px; }
  .ad-fan img:nth-child(1) { transform: translate(-112%, -46%) rotate(-8deg) scale(.84); animation: none; }
  .ad-fan img:nth-child(3) { transform: translate(12%, -46%) rotate(8deg) scale(.84); animation: none; }
  .ad-gallery img { width: 190px; }
  .yt-steps.s3 { grid-template-columns: 1fr; }
  .ad-play { flex: 1 1 100%; justify-content: center; }
  .ad-qr { display: none; }
  .ad-more { grid-template-columns: 1fr; }
}
