/* Shared v2 game player (create2 preview + game-frame) */
*{box-sizing:border-box}
:root{
  --blue:#2563eb;
  --green:#16a34a;
  --orange:#f59e0b;
  --red:#ef4444;
  --dark:#0f172a;
  --muted:#64748b;
}
body.v2-game-body{
  margin:0;
  font-family:"Arimo",Arial,sans-serif;
  background:#fff;
  color:var(--dark);
  text-align:center;
}
.v2-game-wrap{
  max-width:1100px;
  margin:0 auto;
  padding:8px;
}
.game-shell{
  position:relative;
  overflow:hidden;
  max-width:1100px;
  margin:0 auto;
  background:linear-gradient(180deg,#f3f9ff 0%,#eaf5ff 100%);
  border-radius:28px;
  border:3px solid #ffffff;
  outline:1px solid #dbeafe;
  padding:12px 14px 18px;
  box-shadow:0 14px 35px rgba(15,23,42,.08), inset 0 1px 0 rgba(255,255,255,.95);
}
.game-title-row{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin:0 auto 12px;
  color:#0f172a;
  background:#fff;
  border:2px solid #dbeafe;
  border-radius:24px;
  padding:10px 14px;
}
.game-title-icon{
  width:44px;height:44px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  font-size:24px;color:#fff;
  background:linear-gradient(145deg,#38bdf8,#0284c7);
  box-shadow:0 5px 0 #0369a1;
}
.game-title-main{font-size:25px;font-weight:900;line-height:1.1;font-family:"Arimo",Arial,sans-serif}
.game-top{
  display:flex;flex-direction:row;flex-wrap:nowrap;
  justify-content:center;align-items:center;
  gap:12px 18px;margin:0 0 12px;padding:10px 14px;
  background:#fff;border:2px solid #dbeafe;border-radius:24px;
  overflow:visible;
}
.game-hud{
  display:flex;align-items:center;justify-content:center;gap:18px;flex-wrap:nowrap;
  width:auto;flex:0 1 auto;
  flex-shrink:0;
  padding-top:0;
  font-family:"Arimo",Arial,sans-serif;
}
.hud-bubble{display:flex;flex-direction:row;align-items:center;gap:8px;color:#111827;padding:4px 6px;font-family:"Arimo",Arial,sans-serif}
.hud-circle{
  width:38px;height:38px;border-radius:50%;color:#fff;
  display:block;
  font-family:"Arimo",Arial,sans-serif;
  font-size:16px;font-weight:900;line-height:38px;
  text-align:center;
  position:relative;overflow:hidden;
  text-shadow:0 2px 0 rgba(0,0,0,.10);
}
.hud-circle:before{
  content:"";
  display:block;
  position:absolute;
  top:7px;right:8px;
  left:auto;
  width:16px;height:7px;
  border-radius:999px;
  background:rgba(255,255,255,.38);
  transform:rotate(-20deg);
  pointer-events:none;
  z-index:1;
}
.hud-stage .hud-circle{
  background:linear-gradient(145deg,#fbbf24,#f59e0b);
  box-shadow:0 4px 0 #b45309,0 7px 13px rgba(245,158,11,.20);
}
.hud-found .hud-circle{
  background:linear-gradient(145deg,#22c55e,#16a34a);
  box-shadow:0 4px 0 #15803d,0 7px 13px rgba(22,163,74,.18);
}
.hud-attempts .hud-circle{
  background:linear-gradient(145deg,#38bdf8,#0ea5e9);
  box-shadow:0 4px 0 #0284c7,0 7px 13px rgba(14,165,233,.18);
}
.hud-label{font-size:24px;font-weight:500;white-space:nowrap;font-family:"Arimo",Arial,sans-serif}
.game-actions{
  display:flex;justify-content:center;align-items:center;gap:9px;flex-wrap:nowrap;
  width:auto;flex:0 1 auto;
}
.game-top .v2-ad-actions-stack{
  position:relative;
  display:flex;flex-direction:column;align-items:center;
  flex:0 0 auto;
  padding-top:0;
}
.game-top .v2-ad-buttons-row{
  display:flex;flex-direction:row;align-items:center;justify-content:center;
  gap:9px;flex-wrap:nowrap;
}
.game-top .v2-ad-btn-note{
  display:block;
  font-size:10px;
  line-height:1.15;
  font-weight:700;
  color:#64748b;
  margin:0;
  text-align:center;
  white-space:nowrap;
}
.game-top .v2-ad-btn-note-shared{
  position:absolute;
  bottom:calc(100% + 0px);
  left:50%;
  top:auto;
  transform:translateX(calc(-50% + 8px));
  max-width:none;
  pointer-events:none;
}
.game-top .v2-ad-btn-note-mobile{
  display:none;
}
.game-actions button{
  border:0;border-radius:999px;min-height:38px;padding:8px 15px;
  font-size:16px;font-weight:800;cursor:pointer;font-family:inherit;color:#fff;
  background:linear-gradient(135deg,#fbbf24,#f59e0b);
  box-shadow:0 4px 0 #b45309;
}
.game-actions button.secondary{
  background:linear-gradient(135deg,#64748b,#475569);
  box-shadow:0 4px 0 #334155;
}
.game-actions button.green{
  background:linear-gradient(135deg,#22c55e,#16a34a);
  box-shadow:0 4px 0 #15803d;
}
.images-board{
  width:100%;display:flex;justify-content:center;align-items:flex-start;
  gap:14px;flex-wrap:nowrap;margin-top:12px;direction:ltr;
}
.images-board.images-board-paired{
  gap:0;
}
.image-side{
  position:relative;
  display:inline-block;
  vertical-align:top;
  background:linear-gradient(135deg,#dbeafe,#eff6ff);
  border-radius:20px;overflow:hidden;
  border:4px solid #fff;outline:1px solid rgba(148,163,184,.28);
  max-width:48%;min-height:0;
  box-shadow:0 10px 25px rgba(15,23,42,.13);
}
.images-board-paired .image-side[data-side="left"]{
  border-top-right-radius:0;
  border-bottom-right-radius:0;
  border-right:3px solid #ff9800;
}
.images-board-paired .image-side[data-side="right"]{
  border-top-left-radius:0;
  border-bottom-left-radius:0;
}
.image-fit{
  position:relative;
  display:inline-block;
  line-height:0;
  max-width:100%;
  vertical-align:top;
  overflow:visible;
}
.image-fit img{
  display:block;
  width:100%;
  height:auto;
  max-width:100%;
  max-height:620px;
  object-fit:contain;
  pointer-events:none;
}
.image-side.single{max-width:96%;cursor:pointer}
.image-side.game-side{cursor:pointer}
.mark{
  position:absolute;border:3px solid #13a35f;background:rgba(19,163,95,.17);
  border-radius:50%;transform:translate(-50%,-50%);z-index:18;
  display:flex;align-items:center;justify-content:center;
  color:#083b23;font-weight:900;font-size:16px;pointer-events:none;
  text-shadow:0 1px 0 rgba(255,255,255,.95);
  box-shadow:0 0 0 3px rgba(255,255,255,.68),0 8px 16px rgba(15,23,42,.16);
  box-sizing:content-box;
  aspect-ratio:1;
  min-width:0;min-height:0;
  padding:0;line-height:1;
  overflow:visible;
}
.found-mark{border-color:#00c853;background:rgba(0,200,83,.20);animation:v2pop .35s ease}
.hint-mark{border-color:#ff9800;background:rgba(255,152,0,.20);animation:v2pulse 1s ease-in-out infinite;z-index:25}
@keyframes v2pop{0%{transform:translate(-50%,-50%) scale(.4)}70%{transform:translate(-50%,-50%) scale(1.18)}100%{transform:translate(-50%,-50%) scale(1)}}
@keyframes v2pulse{0%,100%{box-shadow:0 0 0 0 rgba(255,152,0,.55)}50%{box-shadow:0 0 0 18px rgba(255,152,0,0)}}
.miss-pop{
  position:absolute;width:30px;height:30px;border-radius:50%;
  border:3px solid var(--red);color:var(--red);background:rgba(255,255,255,.85);
  display:flex;align-items:center;justify-content:center;font-weight:900;
  transform:translate(-50%,-50%);z-index:40;animation:v2miss .55s ease forwards;pointer-events:none;
}
@keyframes v2miss{0%{transform:translate(-50%,-50%) scale(.7);opacity:0}35%{transform:translate(-50%,-50%) scale(1.15);opacity:1}100%{transform:translate(-50%,-50%) scale(.9);opacity:0}}
.confetti-piece{
  position:fixed;width:10px;height:16px;top:-20px;z-index:9999;pointer-events:none;
  animation:v2fall 1.8s linear forwards;
}
@keyframes v2fall{to{transform:translateY(110vh) rotate(720deg);opacity:.1}}
.level-complete-overlay{
  position:fixed;inset:0;z-index:2000;
  display:flex;align-items:center;justify-content:center;
  padding:20px 16px;
  background:rgba(15,23,42,.38);
  backdrop-filter:blur(9px);
  -webkit-backdrop-filter:blur(9px);
}
.level-complete-card{
  position:relative;
  background:#fff;
  border-radius:28px;
  padding:34px 22px 22px;
  max-width:390px;
  width:100%;
  box-shadow:0 22px 55px rgba(15,23,42,.22);
  text-align:center;
}
.level-complete-icon{
  width:74px;height:74px;
  margin:-58px auto 12px;
  border-radius:50%;
  background:linear-gradient(145deg,#4ade80,#16a34a);
  color:#fff;
  display:flex;align-items:center;justify-content:center;
  font-size:38px;font-weight:900;line-height:1;
  box-shadow:0 10px 28px rgba(22,163,74,.38);
}
.level-complete-title{
  margin:0 0 6px;
  font-size:26px;
  font-weight:900;
  color:#0f172a;
  line-height:1.25;
}
.level-complete-sub{
  margin:0 0 18px;
  font-size:20px;
  font-weight:800;
  color:#0f172a;
  line-height:1.3;
}
.level-complete-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.final-end-overlay .end-actions{
  max-width:none;
  margin:0;
  gap:10px;
}
.final-end-overlay .v2-ad-btn-wrap{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
  width:100%;
}
.final-end-title-win{color:#14a866}
.final-end-title-fail{color:#ef4444}
.final-end-icon-fail{
  background:linear-gradient(145deg,#f87171,#ef4444);
  box-shadow:0 10px 28px rgba(239,68,68,.38);
}
.lvl-btn{
  display:block;width:100%;
  text-decoration:none;border:0;border-radius:14px;
  padding:14px 16px;
  font-size:18px;font-weight:900;
  color:#fff;cursor:pointer;
  font-family:inherit;
  text-align:center;
  box-shadow:0 4px 0 rgba(15,23,42,.12);
  transition:transform .12s ease, box-shadow .12s ease;
}
.lvl-btn:hover{transform:translateY(-1px)}
.lvl-btn:active{transform:translateY(1px);box-shadow:none}
.lvl-btn-green{background:linear-gradient(180deg,#22c55e,#16a34a)}
.lvl-btn-blue{background:linear-gradient(180deg,#3b82f6,#2563eb)}
.lvl-btn-orange{background:linear-gradient(180deg,#fbbf24,#f59e0b)}

.v2-ad-notice{
  position:fixed;inset:0;z-index:3000;
  display:flex;align-items:flex-start;justify-content:center;
  padding-top:18px;
  background:rgba(15,23,42,.45);
  color:#fff;font-size:15px;font-weight:700;
  pointer-events:none;
}
.v2-ad-btn-wrap{display:flex;flex-direction:column;align-items:center;gap:2px;flex:0 0 auto}
.v2-ad-btn-note{font-size:11px;line-height:1.2;color:#64748b;font-weight:700;max-width:140px;text-align:center}
.v2-ad-btn-sub{font-size:12px;line-height:1.2;color:#64748b;margin-top:2px}
.v2-ad-btn-wrap-fail .v2-ad-btn-note,.v2-ad-btn-wrap-fail .v2-ad-btn-sub{color:#475569}
/* Mobile game shell — aligned with find2/maker2.html @media (max-width:820px) */
@media(max-width:820px){
  .v2-game-wrap{max-width:none;width:100%;padding:0}
  .game-shell{
    max-width:none;
    width:100%;
    border-radius:0;
    border-left:0;
    border-right:0;
    outline:0;
    padding:7px 3px 10px;
    box-shadow:none;
  }
  .game-title-row{
    margin:0 4px 6px;
    padding:6px 8px;
    border-radius:16px;
  }
  .game-title-main{font-size:20px}
  .game-title-icon{width:32px;height:32px;font-size:18px;box-shadow:0 3px 0 #0369a1,0 6px 12px rgba(2,132,199,.18)}
  .game-top{
    gap:6px;
    flex-direction:column;
    padding:7px 5px;
    margin:0 4px 7px;
    border-radius:16px;
  }
  .game-hud{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:5px;
    width:100%;
  }
  .hud-bubble{
    flex-direction:column;
    gap:3px;
    padding:3px 1px;
    min-width:0;
  }
  .hud-label{
    font-size:14px;
    font-weight:800;
    line-height:1.1;
    color:#111827;
  }
  .hud-circle{
    width:32px;
    height:32px;
    font-size:14px;
    line-height:32px;
  }
  .hud-found{
    display:grid;
    grid-template-columns:auto auto auto;
    grid-template-rows:auto auto;
    column-gap:4px;
    row-gap:3px;
    align-items:center;
    justify-content:center;
  }
  .hud-found .hud-label:first-child{
    grid-column:1 / 4;
    grid-row:1;
  }
  .hud-found .hud-label:nth-child(3){
    grid-column:2;
    grid-row:2;
    font-size:12px;
  }
  .hud-found .hud-circle:nth-child(2){
    grid-column:1;
    grid-row:2;
  }
  .hud-found .hud-circle:nth-child(4){
    grid-column:3;
    grid-row:2;
  }
  .hud-circle:before{display:none}
  .hud-stage .hud-circle,
  .hud-found .hud-circle,
  .hud-attempts .hud-circle{
    box-shadow:0 3px 0 rgba(0,0,0,.14)!important;
  }
  .game-actions{
    display:block;
    width:100%;
    flex:1 1 100%;
  }
  .game-top .v2-ad-actions-stack{
    width:100%;
    padding-top:0;
  }
  .game-top .v2-ad-btn-note-shared{
    display:none;
  }
  .game-top .v2-ad-btn-note-mobile{
    display:block;
    width:100%;
    text-align:center;
    font-size:11px;
    line-height:1.2;
    color:#64748b;
    font-weight:700;
    margin-top:4px;
  }
  .game-top .v2-ad-buttons-row{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    width:100%;
  }
  .game-actions button,
  .game-top .v2-ad-buttons-row button{
    width:100%;
    min-height:36px;
    font-size:14px;
    font-weight:800;
    padding:8px 10px;
    border-radius:999px;
    box-shadow:0 3px 0 rgba(0,0,0,.16);
  }
  .mark{border-width:2px;font-size:13px}
  .game-shell .images-board{
    margin-top:6px;
    padding:2px;
    border-radius:10px;
    border-left:0;
    border-right:0;
    gap:3px;
    width:100%;
  }
  .images-board.images-board-paired{gap:0}
  .game-shell .image-side{
    border-width:1px;
    border-radius:7px;
    max-width:50%;
    box-shadow:none;
  }
  .game-shell .image-side.single{max-width:100%}
  .game-shell .image-side img,
  .game-shell .image-fit img{max-height:none}
  .image-label{display:none}
  body:not(.find-reward-ad-active) .google-center-div,
  body:not(.find-reward-ad-active) .google-auto-placed{display:none!important;height:0!important;overflow:hidden!important;margin:0!important;padding:0!important}
}
