/* Play cover (desktop "Click To Play" + mobile "Tap To Play") and mobile scroll helpers. */
.yg-touch-cover {
  position: absolute; z-index: 5; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  border: 0; margin: 0; padding: 20px; width: auto; cursor: pointer;
  background: radial-gradient(120% 90% at 50% 40%, rgba(40, 20, 90, .35), rgba(12, 6, 30, .72));
  color: #fff; font: inherit; text-align: center;
  touch-action: pan-y; -webkit-tap-highlight-color: transparent;
  border-radius: inherit;
  transition: opacity .2s ease, transform .2s ease;
}
.yg-touch-cover[hidden] { display: none !important; }
.yg-touch-cover-play {
  position: relative;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 86px !important;
  height: 86px !important;
  flex: 0 0 86px !important;
  box-sizing: border-box !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 26px !important;
  background: radial-gradient(100% 100% at 30% 20%, rgba(168, 85, 247, 0.45) 0%, rgba(79, 30, 180, 0.88) 55%, rgba(12, 6, 32, 0.96) 100%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.45) !important;
  box-shadow: 0 0 0 5px rgba(168, 85, 247, 0.22), 0 16px 40px rgba(0, 0, 0, 0.6), inset 0 2px 2px rgba(255, 255, 255, 0.7), inset 0 -3px 8px rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease !important;
}
.yg-touch-cover-play::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 90% 60% at 50% 12%, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0.05) 55%, transparent 75%);
  pointer-events: none;
}
.yg-touch-cover:hover .yg-touch-cover-play {
  transform: scale(1.08) translateY(-2px);
  border-color: rgba(255, 255, 255, 0.75) !important;
  box-shadow: 0 0 0 7px rgba(168, 85, 247, 0.38), 0 0 35px rgba(168, 85, 247, 0.6), 0 20px 48px rgba(0, 0, 0, 0.7), inset 0 2px 3px rgba(255, 255, 255, 0.9) !important;
}
.yg-touch-cover:active .yg-touch-cover-play {
  transform: scale(0.96) !important;
}
.yg-touch-cover-play svg {
  position: relative;
  z-index: 2;
  display: block !important;
  width: 38px !important;
  height: 38px !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
  transition: transform 0.2s ease;
}
.yg-touch-cover:hover .yg-touch-cover-play svg {
  transform: scale(1.06);
}
.yg-touch-cover-title { font-size: 20px; font-weight: 900; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); max-width: 90%; }
.yg-touch-cover-hint {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 999px;
  padding: 6px 18px;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.yg-touch-cover:hover .yg-touch-cover-hint {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.14));
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 10px 28px rgba(155, 114, 255, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transform: translateY(-1px);
}
.yg-touch-more[hidden] { display: none !important; }
.game-iframe-container:fullscreen .yg-touch-cover, .game-iframe-container:fullscreen .yg-touch-rail,
.game-iframe-container:-webkit-full-screen .yg-touch-cover, .game-iframe-container:-webkit-full-screen .yg-touch-rail,
.game-iframe-container.yg-pseudo-fs .yg-touch-cover, .game-iframe-container.yg-pseudo-fs .yg-touch-rail { display: none !important; }

@media (pointer: coarse), (max-width: 820px) {
  html:not(#ygt1):not(#ygt2) body .game-iframe-container.yg-touch-ready {
    position: relative !important;
    height: auto !important;
    aspect-ratio: auto !important;
    padding: 0 28px 0 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  html:not(#ygt1):not(#ygt2) body .game-iframe-container.yg-touch-ready > iframe {
    position: relative !important;
    inset: auto !important;
    display: block;
    width: 100% !important;
    height: min(550px, 72svh) !important;
    max-height: 72vh !important;
  }
  @supports (height: 1svh) {
    html:not(#ygt1):not(#ygt2) body .game-iframe-container.yg-touch-ready > iframe { max-height: 72svh !important; }
  }

  /* Slim scroll rail on the right, outside the iframe */
  .yg-touch-rail {
    position: absolute; z-index: 4; top: 0; right: 0; bottom: 0; width: 28px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(180deg, rgba(138, 92, 240, .10), rgba(138, 92, 240, .22), rgba(138, 92, 240, .10));
    border-radius: 0 inherit inherit 0;
    touch-action: pan-y; color: #6a3fd6;
  }
  .yg-touch-rail span {
    display: grid; place-items: center; width: 20px; height: 56px; border-radius: 10px;
    background: rgba(255, 255, 255, .85); box-shadow: 0 4px 12px rgba(60, 30, 130, .2);
    font: 900 14px/1 system-ui, sans-serif;
  }
  .yg-touch-more {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin: 8px auto 4px; min-height: 40px; padding: 0 16px;
    border: 1px solid #ddd2f5; border-radius: 999px; background: #fff; color: #5b36c4;
    font-weight: 800; font-size: 13px; cursor: pointer;
  }
  html.yg-dark .yg-touch-rail span { background: rgba(37, 31, 64, .9); color: #c9b5ff; }
  html.yg-dark .yg-touch-more { background: #251f40; border-color: #3a3360; color: #c9b5ff; }

  /* Fullscreen: back to the full game, no cover, no rail */
  html:not(#ygt1):not(#ygt2):not(#ygt3) body .game-iframe-container.yg-touch-ready:fullscreen { padding: 0 !important; height: 100% !important; }
  html:not(#ygt1):not(#ygt2):not(#ygt3) body .game-iframe-container.yg-touch-ready:-webkit-full-screen { padding: 0 !important; height: 100% !important; }
  html:not(#ygt1):not(#ygt2):not(#ygt3) body .game-iframe-container.yg-touch-ready.yg-pseudo-fs { padding: 0 !important; height: 100% !important; }
  html:not(#ygt1):not(#ygt2):not(#ygt3) body .game-iframe-container.yg-touch-ready:fullscreen > iframe { height: 100% !important; max-height: none !important; }
  html:not(#ygt1):not(#ygt2):not(#ygt3) body .game-iframe-container.yg-touch-ready:-webkit-full-screen > iframe { height: 100% !important; max-height: none !important; }
  html:not(#ygt1):not(#ygt2):not(#ygt3) body .game-iframe-container.yg-touch-ready.yg-pseudo-fs > iframe { height: 100% !important; max-height: none !important; }
}
@media (pointer: coarse) and (prefers-reduced-motion: reduce), (max-width: 820px) and (prefers-reduced-motion: reduce) {
  .yg-touch-cover { transition: none; }
}

/* Phones: the game box stays poster-sized (16:9); the game itself is played full screen */
html:not(#ygt1):not(#ygt2):not(#ygt3) body .game-iframe-container.yg-mobile-small:not(:fullscreen):not(.yg-pseudo-fs){aspect-ratio:16/9!important;height:auto!important;min-height:0!important;max-height:none!important;padding:0!important;overflow:hidden!important;border-radius:20px!important}
html:not(#ygt1):not(#ygt2):not(#ygt3) body .game-iframe-container.yg-mobile-small:not(:fullscreen):not(.yg-pseudo-fs)>iframe{width:100%!important;height:100%!important;min-height:0!important;max-height:none!important}
html:not(#ygt1):not(#ygt2):not(#ygt3) body .game-iframe-container.yg-mobile-small>.yg-touch-rail{display:none!important}
html:not(#ygt1):not(#ygt2):not(#ygt3) body .game-iframe-container.yg-mobile-small>.yg-touch-cover{inset:0!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:12px!important;padding:12px!important}
html:not(#ygt1):not(#ygt2):not(#ygt3) body .game-iframe-container.yg-mobile-small>.yg-touch-cover .yg-touch-cover-title{display:none!important}
html:not(#ygt1):not(#ygt2):not(#ygt3) body .game-iframe-container.yg-not-started>iframe{display:none!important}
html:not(#ygt1):not(#ygt2):not(#ygt3) body .game-iframe-container.yg-not-started>.yg-touch-cover{background-size:cover!important;background-position:center!important;background-repeat:no-repeat!important}

/* Premium frame + Play button (phones) */
html:not(#ygt1):not(#ygt2):not(#ygt3) body .game-iframe-container.yg-mobile-small:not(:fullscreen):not(.yg-pseudo-fs){border:2px solid transparent!important;border-radius:22px!important;background:linear-gradient(#140d2b,#140d2b) padding-box,linear-gradient(135deg,#b48bff,#6d4ee6 40%,#3fb8ff 75%,#ffd36e) border-box!important;box-shadow:0 18px 40px rgba(60,30,150,.32),0 0 0 6px rgba(139,108,246,.10)!important}
html:not(#ygt1):not(#ygt2):not(#ygt3) body .game-iframe-container.yg-mobile-small>.yg-touch-cover{border-radius:20px!important}
html:not(#ygt1):not(#ygt2):not(#ygt3) body .game-iframe-container.yg-mobile-small>.yg-touch-cover .yg-touch-cover-hint{padding:8px 18px!important;border-radius:999px!important;border:1px solid rgba(255,255,255,.35)!important;background:linear-gradient(135deg,rgba(30,16,70,.82),rgba(80,45,180,.72))!important;color:#fff!important;font:800 14px/1 'DM Sans',system-ui,sans-serif!important;letter-spacing:.04em!important;box-shadow:0 8px 20px rgba(20,8,60,.4),inset 0 1px 0 rgba(255,255,255,.25)!important;backdrop-filter:none}
html:not(#ygt1):not(#ygt2):not(#ygt3) body .game-iframe-container.yg-mobile-small>.yg-touch-cover:active .yg-touch-cover-play{transform:scale(.94)}
@media (prefers-reduced-motion:reduce){html:not(#ygt1):not(#ygt2):not(#ygt3) body .game-iframe-container.yg-mobile-small>.yg-touch-cover .yg-touch-cover-play{animation:none}}
