/**
 * Pagina di Opsy Road (anteprima): pubblicità in alto con cielo a strati che segue il puntatore, titolo che salta
 * lettera per lettera, numeri veri delle partite; poi il gioco (stile di shared/css/error-page.css), le regole e l'invito.
 * Mentre si gioca tutte le animazioni della pubblicità si fermano (classe im-err-playing messa dal gioco).
 */

.oz-body { background: #fff; }

/* ======================================================================
   PUBBLICITÀ IN ALTO
   ====================================================================== */
.oz-hero {
  --mx: 0; --my: 0;
  position: relative; isolation: isolate; overflow: hidden;
  margin-top: calc(-68px - env(safe-area-inset-top, 0px));
  padding: calc(68px + env(safe-area-inset-top, 0px) + clamp(2rem, 6vw, 4rem)) 0 clamp(9rem, 20vw, 13rem);
  text-align: center;
  background: linear-gradient(180deg, #d9ebff 0%, #eaf4ff 38%, #f8fbff 62%, #fff6e6 100%);
}
.oz-sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.oz-sun { position: absolute; right: 9%; top: 15%; width: clamp(70px, 10vw, 120px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #fff7d1 0 40%, #ffe38f 41% 58%, #ffe38f00 60%); translate: calc(var(--mx) * -4px) calc(var(--my) * -4px); }
.oz-sun::before { content: ""; position: absolute; inset: -40%; border-radius: 50%; background: repeating-conic-gradient(#ffd56a40 0 5deg, transparent 5deg 20deg); -webkit-mask-image: radial-gradient(circle, transparent 30%, #000 34%, transparent 70%); mask-image: radial-gradient(circle, transparent 30%, #000 34%, transparent 70%); animation: oz-spin 40s linear infinite; }
@keyframes oz-spin { to { transform: rotate(360deg); } }
.oz-cloud { position: absolute; top: var(--y); left: 0; width: 120px; height: 36px; border-radius: 40px; background: #fff; box-shadow: 28px -16px 0 6px #fff, 64px -6px 0 2px #fff; scale: var(--s); opacity: .92; animation: oz-cloud var(--t) linear var(--d) infinite; }
@keyframes oz-cloud { from { transform: translateX(110vw); } to { transform: translateX(-220px); } }
/* Colline e città: ogni strato si sposta di quanto è vicino (data-depth), seguendo il puntatore. */
.oz-hills, .oz-city { position: absolute; left: -5%; right: -5%; transition: translate .6s var(--tz-ease-out); }
.oz-hills--far { bottom: 70px; height: 26%; background: radial-gradient(60% 100% at 20% 100%, #cfe2ff 0 60%, transparent 61%), radial-gradient(50% 90% at 70% 100%, #d6e7ff 0 60%, transparent 61%), radial-gradient(40% 70% at 100% 100%, #cfe2ff 0 60%, transparent 61%); translate: calc(var(--mx) * -6px) 0; }
.oz-city { bottom: 70px; height: 24%; translate: calc(var(--mx) * -12px) 0; background:
  linear-gradient(#bcd3ff 0 0) 4% 100% / 6% 70% no-repeat,
  linear-gradient(#c8dbff 0 0) 11% 100% / 8% 95% no-repeat,
  linear-gradient(#bcd3ff 0 0) 20% 100% / 5% 55% no-repeat,
  linear-gradient(#c8dbff 0 0) 27% 100% / 7% 80% no-repeat,
  linear-gradient(#bcd3ff 0 0) 36% 100% / 5% 100% no-repeat,
  linear-gradient(#c8dbff 0 0) 63% 100% / 6% 75% no-repeat,
  linear-gradient(#bcd3ff 0 0) 71% 100% / 8% 92% no-repeat,
  linear-gradient(#c8dbff 0 0) 81% 100% / 6% 60% no-repeat,
  linear-gradient(#bcd3ff 0 0) 89% 100% / 7% 85% no-repeat,
  linear-gradient(#c8dbff 0 0) 97% 100% / 6% 65% no-repeat;
}
/* Finestre accese a caso nei palazzi. */
.oz-city::after { content: ""; position: absolute; inset: 20% 0 0; background-image: radial-gradient(#ffffffb3 1.5px, transparent 2px); background-size: 14px 16px; -webkit-mask-image: linear-gradient(90deg, #000 0 40%, transparent 40% 61%, #000 61%); mask-image: linear-gradient(90deg, #000 0 40%, transparent 40% 61%, #000 61%); opacity: .8; }
.oz-hills--near { bottom: 56px; height: 16%; background: radial-gradient(70% 100% at 10% 100%, #e3eeff 0 60%, transparent 61%), radial-gradient(60% 100% at 85% 100%, #e3eeff 0 60%, transparent 61%); translate: calc(var(--mx) * -20px) 0; }
.oz-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 70px; background: #dce4f1; box-shadow: inset 0 5px 0 #c8d4e8; }
.oz-ground::after { content: ""; position: absolute; left: 0; right: 0; top: 52%; height: 5px; background: repeating-linear-gradient(90deg, #fff 0 34px, transparent 34px 72px); animation: oz-dash .6s linear infinite; }
@keyframes oz-dash { to { background-position: -72px 0; } }
/* Coriandoli leggeri che cadono girando. */
.oz-confetti i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; background: var(--c); left: var(--x); animation: oz-fall var(--t) linear var(--d) infinite; opacity: .85; }
.oz-confetti i:nth-child(1) { --c: #0250ff; --x: 8%; --t: 9s; --d: -1s; }
.oz-confetti i:nth-child(2) { --c: #ffb020; --x: 22%; --t: 11s; --d: -6s; }
.oz-confetti i:nth-child(3) { --c: #3a8bff; --x: 35%; --t: 8s; --d: -3s; }
.oz-confetti i:nth-child(4) { --c: #ff8a1f; --x: 48%; --t: 12s; --d: -9s; }
.oz-confetti i:nth-child(5) { --c: #16a34a; --x: 61%; --t: 10s; --d: -2s; }
.oz-confetti i:nth-child(6) { --c: #0250ff; --x: 74%; --t: 9.5s; --d: -7s; }
.oz-confetti i:nth-child(7) { --c: #ffb020; --x: 86%; --t: 11.5s; --d: -4s; }
.oz-confetti i:nth-child(8) { --c: #89b0ff; --x: 95%; --t: 8.5s; --d: -5s; }
@keyframes oz-fall { from { transform: translateY(0) rotateX(0) rotateZ(0); } to { transform: translateY(110vh) rotateX(720deg) rotateZ(240deg); } }

.oz-hero__in { position: relative; }
.oz-title { margin: 0.4rem 0 0; font-size: clamp(3.6rem, 15vw, 7.6rem); font-weight: 850; line-height: 1.05; letter-spacing: -0.05em; }
/* Ogni lettera salta come la macchinina: si schiaccia, vola, atterra. Un'onda che passa da sinistra a destra. */
.oz-l { position: relative; display: inline-block; transform-origin: 50% 100%; background: linear-gradient(170deg, #0250ff 15%, #3a8bff 90%); -webkit-background-clip: text; background-clip: text; color: transparent; animation: oz-hop 3.4s cubic-bezier(.3, 0, .3, 1) calc(1s + var(--i) * 110ms) infinite, oz-in .8s var(--tz-ease-spring) calc(var(--i) * 70ms) backwards; }
.oz-l--sp { width: 0.25em; }
.oz-l::after { content: ""; position: absolute; left: 15%; right: 15%; bottom: -0.02em; height: 0.06em; border-radius: 50%; background: #01083b26; animation: oz-shadow 3.4s cubic-bezier(.3, 0, .3, 1) calc(1s + var(--i) * 110ms) infinite; }
@keyframes oz-hop {
  0%, 30%, 100% { transform: none; }
  4% { transform: scale(1.08, .86); }
  12% { transform: translateY(-0.28em) scale(.94, 1.08); }
  20% { transform: translateY(0) scale(1.1, .88); }
  25% { transform: scale(.98, 1.02); }
}
@keyframes oz-shadow { 0%, 30%, 100% { transform: none; opacity: 1; } 12% { transform: scaleX(.5); opacity: .4; } }
@keyframes oz-in { from { opacity: 0; transform: translateY(-1.2em) rotate(-12deg); } }
.oz-lead { max-width: 36rem; margin: 0.6rem auto 0; color: var(--im-color-text-muted); font-size: clamp(1rem, 1.8vw, 1.18rem); animation: tz-fade .9s ease .6s both; }
.oz-lead b { color: var(--im-color-navy); }
@keyframes tz-fade { from { opacity: 0; transform: translateY(10px); } }

.oz-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin: 1.6rem 0 0; padding: 0; list-style: none; }
.oz-stats li { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 0.6rem; align-items: center; min-width: 9.5rem; padding: 0.65rem 1rem; border-radius: 18px; background: #ffffffcc; box-shadow: inset 0 0 0 1px #ffffff, 0 10px 30px #0250ff1a; text-align: left; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: oz-pop .7s var(--tz-ease-spring) calc(.8s + var(--i) * .12s) both; }
.oz-stats i { grid-row: 1 / 3; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 12px; background: var(--tz-ice); color: var(--tz-blue); font-size: 1.1rem; }
.oz-stats span { color: var(--im-color-text-muted); font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.oz-stats b { color: var(--im-color-navy); font-size: 1.3rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.oz-stats small { grid-column: 2; color: var(--im-color-text-muted); font-size: 0.72rem; }
.oz-stats li:first-child i { background: #fff1c9; color: #d48a00; animation: oz-trophy 2.8s ease-in-out 2s infinite; }
@keyframes oz-trophy { 0%, 70%, 100% { transform: none; } 78% { transform: rotate(-14deg) scale(1.1); } 86% { transform: rotate(10deg) scale(1.1); } 93% { transform: rotate(-4deg); } }
@keyframes oz-pop { from { opacity: 0; transform: translateY(16px) scale(.9); } }
.oz-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem; margin-top: 1.6rem; animation: tz-fade .9s ease 1.1s both; }
.oz-play { min-width: 12rem; font-size: 1.08rem; }
.oz-play i { font-size: 1.3rem; }
@media (max-width: 480px) { .oz-actions .tz-btn { flex: 1 1 100%; } }
/* Su telefono i tre numeri stanno in fila, compatti: icona sopra, numero, etichetta. */
@media (max-width: 575.98px) {
  .oz-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.45rem; }
  .oz-stats li { grid-template-columns: minmax(0, 1fr); justify-items: center; row-gap: 0.15rem; min-width: 0; padding: 0.65rem 0.4rem; text-align: center; }
  .oz-stats i { grid-row: auto; width: 2rem; height: 2rem; font-size: 0.95rem; }
  .oz-stats b { order: 2; font-size: 1.15rem; }
  .oz-stats span { order: 3; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 0.7rem; }
  .oz-stats small { display: none; }
}

/* ======================================================================
   GIOCO (sopra la strada della pubblicità)
   ====================================================================== */
.oz-game-sec { position: relative; z-index: 2; margin-top: clamp(-7.5rem, -14vw, -5rem); }
.oz-game { --err-blue: #0250ff; --err-sky: #3aa0ff; --err-line: #dbe5fa; --err-soft: #eef4ff; max-width: 920px; }
.oz-game .im-err-game { margin-top: 0; box-shadow: 0 30px 70px #0a1f4426; }
.oz-noscript { padding: 1.2rem; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--tz-line); text-align: center; }
@media (min-width: 768px) { .oz-game .im-err-game__stage { height: 280px; } }
/* Mentre si gioca la pubblicità sta ferma: il telefono pensa solo al gioco. */
.im-err-playing .oz-hero *, .im-err-playing .oz-hero *::before, .im-err-playing .oz-hero *::after { animation-play-state: paused !important; }

/* ======================================================================
   REGOLE
   ====================================================================== */
.oz-rules { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 768px) { .oz-rules { grid-template-columns: repeat(3, 1fr); } }
.oz-rules li { padding: 1.2rem; border-radius: 22px; background: #fff; box-shadow: 0 0 0 1px var(--tz-line), 0 16px 40px #01083b0d; transition-delay: calc(var(--i) * .12s); }
.oz-rules h3 { margin-top: 1rem; color: var(--im-color-navy); font-size: 1.15rem; font-weight: 800; }
.oz-rules p { margin-top: 0.35rem; color: var(--im-color-text-muted); }
.oz-rule__art { position: relative; display: grid; place-items: center; height: 130px; border-radius: 16px; background: linear-gradient(180deg, #eef5ff, #f8fbff); overflow: hidden; }
/* Tasto «spazio» che si abbassa a ritmo e il dito che tocca. */
.oz-key { display: grid; place-items: center; width: 150px; height: 46px; border-radius: 12px; background: #fff; border: 1px solid #c9d6f2; box-shadow: 0 6px 0 #9fb4e3; color: var(--im-color-navy); font-weight: 750; animation: oz-press 1.4s ease-in-out infinite; }
@keyframes oz-press { 0%, 40%, 100% { transform: none; box-shadow: 0 6px 0 #9fb4e3; } 50%, 62% { transform: translateY(5px); box-shadow: 0 1px 0 #9fb4e3; } }
.oz-tap { position: absolute; right: 22%; bottom: 18%; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--tz-blue); animation: oz-tap 1.4s ease-out infinite; }
@keyframes oz-tap { 0%, 44% { opacity: 0; transform: scale(.4); } 52% { opacity: 1; } 100% { opacity: 0; transform: scale(2.4); } }
/* Chiave‑moneta che gira e il «+25» che sale. */
.oz-coin { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3c4, #ffc53d 60%, #f5a300); color: #7a4b00; font-size: 1.7rem; box-shadow: 0 10px 22px #ff9f0a55; animation: oz-coin 1.8s linear infinite; }
@keyframes oz-coin { from { transform: perspective(240px) rotateY(0); } to { transform: perspective(240px) rotateY(360deg); } }
.oz-art-keys b { position: absolute; top: 50%; left: 62%; color: #d48a00; font-size: 1.2rem; font-weight: 850; animation: oz-plus 1.8s ease-out infinite; }
@keyframes oz-plus { 0% { opacity: 0; transform: translateY(10px) scale(.6); } 25% { opacity: 1; transform: translateY(-10px) scale(1.1); } 80%, 100% { opacity: 0; transform: translateY(-40px); } }
/* Cielo che cambia: giorno, pioggia, nebbia, notte (sempre in tinte chiare). */
.oz-art-sky { animation: oz-sky 8s linear infinite; }
.oz-art-sky i { position: absolute; font-size: 3rem; opacity: 0; animation: oz-weather 8s ease-in-out infinite; }
.oz-art-sky i:nth-child(1) { color: #f5a300; }
.oz-art-sky i:nth-child(2) { color: #3a8bff; animation-delay: 2s; }
.oz-art-sky i:nth-child(3) { color: #7d8aa6; animation-delay: 4s; }
.oz-art-sky i:nth-child(4) { color: #6b5bd6; animation-delay: 6s; }
@keyframes oz-weather { 0% { opacity: 0; transform: translateY(16px) scale(.7); } 6%, 22% { opacity: 1; transform: none; } 28%, 100% { opacity: 0; transform: translateY(-16px) scale(.8); } }
@keyframes oz-sky { 0%, 100% { background: #fff6e0; } 25% { background: #e6f1ff; } 50% { background: #eef1f6; } 75% { background: #efeaff; } }

/* ======================================================================
   INVITO A INTERMEDIAUTO
   ====================================================================== */
.oz-cta__card { display: grid; gap: 1.2rem; align-items: center; max-width: 1000px; margin-inline: auto; padding: clamp(1.3rem, 3vw, 2rem); border-radius: 26px; background: #fff; box-shadow: 0 0 0 1px var(--tz-line), 0 24px 60px #01083b12; }
@media (min-width: 900px) { .oz-cta__card { grid-template-columns: auto 1fr auto; } }
.oz-cta__ic { display: grid; place-items: center; width: 3.6rem; height: 3.6rem; border-radius: 18px; background: var(--tz-ice); color: var(--tz-blue); font-size: 1.6rem; }
.oz-cta__t h2 { color: var(--im-color-navy); font-size: clamp(1.3rem, 2.6vw, 1.7rem); font-weight: 800; letter-spacing: -0.03em; }
.oz-cta__t p { margin-top: 0.35rem; color: var(--im-color-text-muted); }
.oz-cta__a { display: flex; flex-wrap: wrap; gap: 0.6rem; }
@media (max-width: 480px) { .oz-cta__a .tz-btn { flex: 1 1 100%; } }
