/* Segreteria Web — effetti videogioco (pagina iniziale e portale) */
.sgw-arcade { position: fixed; inset: 0; z-index: 2147483000; display: grid; place-items: center; padding: 16px; background: rgba(7, 6, 24, .82); opacity: 0; transition: opacity .3s ease; font-family: "Press Start 2P", monospace; }
.sgw-arcade.is-on { opacity: 1; }
.sgw-arcade__fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; image-rendering: pixelated; }
.sgw-arcade__box { position: relative; text-align: center; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 18px; max-width: 560px; padding: 28px 22px; border: 4px solid #fff; background: #1b1144; box-shadow: 0 0 0 4px #1b1144, 0 0 0 8px #FFD75E, 0 20px 60px rgba(0,0,0,.6); transform: scale(.6); transition: transform .45s cubic-bezier(.2, 1.6, .4, 1); }
.sgw-arcade.is-on .sgw-arcade__box { transform: scale(1); }
.sgw-arcade__title { font-size: clamp(26px, 7vw, 46px); line-height: 1.2; color: #FFD75E; text-shadow: 4px 4px 0 #E5489E, 8px 8px 0 #1b1144; animation: sgwPulse 0.9s steps(2) infinite; }
.sgw-arcade__title--small { font-size: clamp(20px, 5vw, 34px); color: #C8FF4D; text-shadow: 4px 4px 0 #2F4A38; }
.sgw-arcade__sub { font-size: 12px; line-height: 1.8; color: #fff; }
.sgw-arcade__stage { display: flex; align-items: flex-end; gap: 14px; }
.sgw-arcade__princess { image-rendering: pixelated; width: 128px; height: auto; animation: sgwHop 0.6s steps(2) infinite; }
.sgw-arcade__bubble { position: relative; font-size: 10px; line-height: 1.9; color: #1b1144; background: #fff; padding: 12px 14px; border: 3px solid #1b1144; box-shadow: 4px 4px 0 #E5489E; margin-bottom: 70px; text-align: left; }
.sgw-arcade__bubble::after { content: ""; position: absolute; left: -12px; bottom: 10px; border: 6px solid transparent; border-right-color: #fff; }
.sgw-arcade__score { font-size: 11px; color: #3DE0FF; letter-spacing: .05em; }
.sgw-arcade__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.sgw-arcade__btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; font: 12px "Press Start 2P", monospace; color: #1b1144 !important; background: #FFD75E; border: 3px solid #fff; box-shadow: 4px 4px 0 #E5489E; text-decoration: none !important; cursor: pointer; }
.sgw-arcade__btn:hover, .sgw-arcade__btn:focus { background: #fff; color: #1b1144 !important; transform: translate(2px, 2px); box-shadow: 2px 2px 0 #E5489E; }
.sgw-arcade__btn--alt { background: #3DE0FF; }
@keyframes sgwPulse { 50% { transform: translateY(-3px); } }
@keyframes sgwHop { 50% { transform: translateY(-6px); } }

/* Pulsante "Area clienti" sulla pagina del gioco */
.sgw-portal-btn { position: fixed; right: 16px; bottom: 16px; z-index: 2147482000; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; font: 10px "Press Start 2P", monospace; color: #1b1144 !important; background: #FFD75E; border: 3px solid #fff; box-shadow: 4px 4px 0 #1b1144; text-decoration: none !important; }
.sgw-portal-btn:hover, .sgw-portal-btn:focus { background: #fff; transform: translate(2px, 2px); box-shadow: 2px 2px 0 #1b1144; }
.sgw-mm-portal .ic { filter: drop-shadow(0 0 6px #FFD75E); }

/* Login stile arcade */
.sgw-auth--arcade { position: relative; }
.sgw-stars { position: fixed; inset: 0; z-index: 0; pointer-events: none; background-image: radial-gradient(2px 2px at 20px 30px, #fff, transparent), radial-gradient(2px 2px at 140px 80px, #FFD75E, transparent), radial-gradient(2px 2px at 260px 160px, #3DE0FF, transparent), radial-gradient(2px 2px at 380px 50px, #fff, transparent), radial-gradient(2px 2px at 90px 220px, #FF7AD9, transparent); background-size: 420px 260px; opacity: .55; animation: sgwStars 40s linear infinite; }
@keyframes sgwStars { to { background-position: 420px 260px; } }
.sgw-auth--arcade .sgw-auth__card { position: relative; z-index: 1; border: 3px solid #fff; border-radius: 6px; box-shadow: 0 0 0 4px #1b1144, 0 0 0 7px #FFD75E, 0 30px 80px rgba(0,0,0,.6); }
.sgw-arcade-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.sgw-px { font: 10px/1.6 "Press Start 2P", monospace; color: #FFD75E; letter-spacing: .04em; }
.sgw-px--blink { color: #3DE0FF; animation: sgwBlink 1s steps(2) infinite; }
@keyframes sgwBlink { 50% { opacity: 0; } }
.sgw-app .sgw-login--arcade input[type="submit"] { font: 13px "Press Start 2P", monospace; color: #1b1144; background: #FFD75E; border: 3px solid #fff; border-radius: 4px; box-shadow: 4px 4px 0 #E5489E; }
.sgw-app .sgw-login--arcade input[type="submit"]:hover, .sgw-app .sgw-login--arcade input[type="submit"]:focus { background: #fff; color: #1b1144; transform: translate(2px, 2px); box-shadow: 2px 2px 0 #E5489E; }

@media (prefers-reduced-motion: reduce) {
  .sgw-arcade__title, .sgw-arcade__princess, .sgw-px--blink, .sgw-stars { animation: none; }
  .sgw-arcade__box { transition: none; transform: none; }
}
@media (max-width: 600px) {
  .sgw-arcade__stage { flex-direction: column; align-items: center; }
  .sgw-arcade__bubble { margin-bottom: 0; }
  .sgw-arcade__bubble::after { display: none; }
  .sgw-portal-btn { bottom: auto; top: 12px; right: 12px; }
}

/* Login dal gioco */
.sgw-arcade--login .sgw-arcade__box { gap: 14px; width: min(420px, 100%); }
.sgw-arcade__form { display: flex; flex-direction: column; gap: 12px; width: 100%; text-align: left; }
.sgw-arcade__form label { display: flex; flex-direction: column; gap: 6px; font-size: 9px; color: #3DE0FF; letter-spacing: .05em; }
.sgw-arcade__form input[type="text"], .sgw-arcade__form input[type="password"] { min-height: 46px; padding: 0 12px; font: 16px "Courier New", monospace; color: #fff; background: #07080C; border: 3px solid #fff; border-radius: 0; box-shadow: inset 3px 3px 0 #000; outline: none; width: 100%; box-sizing: border-box; margin: 0; }
.sgw-arcade__form input:focus { border-color: #FFD75E; }
.sgw-arcade__form .sgw-arcade__rem { flex-direction: row; align-items: center; gap: 10px; color: #fff; }
.sgw-arcade__rem input { width: 18px; height: 18px; accent-color: #FFD75E; margin: 0; }
.sgw-arcade__form .sgw-arcade__btn { justify-content: center; width: 100%; font-size: 13px; min-height: 54px; }
.sgw-arcade__links { font-size: 8px; line-height: 2; }
.sgw-arcade__links a { color: #fff !important; }
.sgw-blink { animation: sgwBlink 1s steps(2) infinite; color: #FFD75E; }
@keyframes sgwBlink { 50% { opacity: 0; } }
.sgw-hero8 canvas { image-rendering: pixelated; width: 80px; height: auto; display: block; animation: sgwHop .5s steps(2) infinite; }
.sgw-hero8.is-jump canvas { animation: sgwJump .6s ease-out forwards; }
@keyframes sgwJump { 40% { transform: translateY(-60px); } 100% { transform: translateY(-400px) scale(.4); opacity: 0; } }
.sgw-warp { position: fixed; inset: 0; z-index: 2147483600; pointer-events: none; background: #000; clip-path: circle(150% at 50% 50%); opacity: 0; display: grid; place-items: center; }
.sgw-warp.is-on { opacity: 1; animation: sgwIris 1.1s steps(12) forwards; }
@keyframes sgwIris { 0% { clip-path: circle(150% at 50% 50%); background: transparent; } 60% { clip-path: circle(4% at 50% 50%); background: #000; } 100% { clip-path: circle(150% at 50% 50%); background: #000; } }
.sgw-warp__txt { font: 20px/1.6 "Press Start 2P", monospace; color: #fff; text-align: center; opacity: 0; animation: sgwShow 1.1s steps(1) forwards; }
.sgw-warp__txt small { font-size: 10px; color: #FFD75E; }
@keyframes sgwShow { 75% { opacity: 1; } 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sgw-warp.is-on { animation: none; background: #000; } .sgw-hero8 canvas { animation: none; } }
