/* Jeko's House: sito del gioco. Colori e stile presi dal gioco (viola, rosa neon, oro, pixel art). */
:root {
  --bg: #0b0613; --bg2: #140a24; --panel: #22143d; --panel2: #2c1a4f; --edge: #9e6bea;
  --pink: #ff4fb3; --pink-soft: #ff9ad6; --gold: #ffd94d; --text: #f6f0ff; --dim: #b7abcf;
  --good: #80ff99; --bad: #ff7a7a; --shadow: 0 6px 0 #000a;
  --neon-font: "Ink Free", "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  --ui-font: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; color: var(--text); font: 17px/1.55 var(--ui-font); background-color: var(--bg);
  /* il muro di mattoni del bar, molto scuro, su tutta la pagina */
  background-image: linear-gradient(#0b0613ee, #0b0613f2), url("/img/wallside.png");
  background-size: auto, 64px 64px; image-rendering: pixelated; overflow-x: hidden;
}
img { image-rendering: pixelated; max-width: 100%; -webkit-user-drag: none; }
/* niente selezione del testo con il mouse (tranne nei campi da compilare) */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea { -webkit-user-select: text; user-select: text; }
a { color: var(--pink-soft); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; }
p { margin: 0 0 1em; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; }

/* ---------- barra in alto ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 64px; display: flex; align-items: center; gap: 18px;
  padding: 0 16px; background: #0b0613d9; backdrop-filter: blur(6px); border-bottom: 2px solid #9e6bea55;
}
.logo { font: 700 28px var(--neon-font); color: #ffe6f6; text-decoration: none; text-shadow: 0 0 6px var(--pink), 0 0 16px var(--pink); white-space: nowrap; }
.topbar nav { display: flex; gap: 4px; margin-left: auto; }
.topbar nav a { color: var(--dim); text-decoration: none; font-weight: 600; padding: 8px 10px; border-radius: 4px; }
.topbar nav a:hover, .topbar nav a.on { color: #fff; background: #ffffff12; }
.icon-btn { background: var(--panel); border: 2px solid var(--edge); color: #fff; font: 600 15px var(--ui-font); padding: 7px 12px; cursor: pointer; white-space: nowrap; }
.icon-btn[aria-pressed="true"] { border-color: var(--pink); box-shadow: 0 0 10px #ff4fb399; }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .menu-btn { display: inline-block; margin-left: auto; }
  .topbar nav { position: fixed; top: 64px; left: 0; right: 0; flex-direction: column; background: #0b0613f7; padding: 8px 16px 16px; border-bottom: 2px solid var(--edge); display: none; }
  .topbar nav.open { display: flex; }
  .topbar nav a { padding: 12px 8px; font-size: 18px; }
  .topbar .music { margin-left: 0; }
}
@media (max-width: 520px) {
  .topbar { gap: 8px; }
  .logo { font-size: 23px; }
  .icon-btn .lbl { display: none; }
  .icon-btn { font-size: 18px; padding: 6px 12px; }
}

/* ---------- bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: #6a3fd0; color: #fff; text-decoration: none;
  border: 3px solid var(--pink); padding: 13px 26px; font: 700 18px var(--ui-font); cursor: pointer; box-shadow: var(--shadow);
  transition: transform .12s, background .12s; position: relative;
}
.btn:hover { background: #8a5cf0; transform: translateY(-2px); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #000a; }
.btn.big { font-size: 21px; padding: 16px 30px; }
.btn.ghost { background: #0b0613b3; border-color: var(--edge); }
.btn.ghost:hover { background: #22143d; }
.btn.gold { background: #b8860b; border-color: var(--gold); }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn img { width: 28px; height: auto; }

/* ---------- copertina: il bar vero del gioco ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; overflow: hidden; padding-top: 64px; }
.hero-bg {
  position: absolute; inset: -4%; background: url("/img/foto_sala.png") center 30% / cover no-repeat; image-rendering: pixelated;
  animation: drift 40s ease-in-out infinite alternate; filter: saturate(1.1);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(ellipse at 50% 38%, #0b061340 0%, #0b0613b0 55%, #0b0613f2 100%), linear-gradient(#0b061399, transparent 30%, transparent 60%, #0b0613 100%);
}
@keyframes drift { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.1) translate(-1.5%, 1%); } }
.hero-inner { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 16px 150px; }
.sign {
  display: inline-block; padding: 14px 42px 22px; border: 4px solid var(--pink); background: #07030cd9;
  box-shadow: 0 0 12px var(--pink), inset 0 0 12px #ff4fb366, 0 0 60px #ff4fb355; margin-bottom: 26px;
}
.neon {
  font: 400 clamp(54px, 11vw, 124px)/1 var(--neon-font); color: #fff2fb; margin: 0; letter-spacing: 1px;
  text-shadow: 0 0 4px #fff, 0 0 10px var(--pink), 0 0 22px var(--pink), 0 0 46px var(--pink);
  animation: flicker 7s infinite;
}
@keyframes flicker {
  0%, 18%, 21%, 23%, 60%, 62%, 100% { opacity: 1; }
  19%, 22%, 61% { opacity: .55; text-shadow: 0 0 2px #fff, 0 0 6px var(--pink); }
}
.tagline { font-size: clamp(18px, 2.4vw, 24px); max-width: 720px; color: #fff; text-shadow: 0 2px 6px #000; margin-bottom: 26px; }
.tagline b { color: var(--gold); }
.cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.badges { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.badge { background: #0b0613cc; border: 2px solid #9e6bea88; padding: 4px 12px; font-size: 14px; font-weight: 600; color: var(--dim); }

/* marciapiede in basso con i personaggi che passeggiano (cliccabili) */
.street { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 128px; background: url("/img/floor.png") 0 0 / 48px 48px; border-top: 4px solid #2a1b14; }
.street::before { content: ""; position: absolute; inset: 0; background: linear-gradient(#0b061355, #0b0613cc); }
.walker { position: absolute; bottom: 14px; width: 64px; height: 96px; background-size: 200% 100%; background-repeat: no-repeat; image-rendering: pixelated; cursor: pointer; z-index: 2; filter: drop-shadow(0 4px 0 #0008); }
.walker.step { background-position: 100% 0; }
.bubble {
  position: absolute; bottom: 108px; left: 50%; transform: translateX(-50%); background: #fff; color: #1b1030; font: 700 14px var(--ui-font);
  padding: 7px 11px; white-space: nowrap; border: 3px solid #1b1030; box-shadow: 0 3px 0 #0006; pointer-events: none; animation: pop .18s ease-out;
}
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -10px; margin-left: -6px; border: 6px solid transparent; border-top-color: #1b1030; }
.bubble.vito { background: #1b1030; color: var(--gold); border-color: var(--gold); }
.bubble.vito::after { border-top-color: var(--gold); }
@keyframes pop { from { transform: translateX(-50%) scale(.6); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
.scroll-hint { position: absolute; z-index: 4; bottom: 136px; left: 50%; transform: translateX(-50%); color: var(--dim); font-size: 13px; text-align: center; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

/* ---------- sezioni ---------- */
section.block { padding: 96px 0; position: relative; }
section.alt { background: linear-gradient(#140a24f0, #140a24f0), url("/img/floor.png") 0 0 / 64px 64px; border-top: 3px solid #2a1b14; border-bottom: 3px solid #2a1b14; }
.kicker { color: var(--pink); font-weight: 800; letter-spacing: 3px; text-transform: uppercase; font-size: 14px; margin-bottom: 8px; }
.title { font: 700 clamp(34px, 5vw, 54px)/1.1 var(--neon-font); color: #fff; text-shadow: 0 0 10px #ff4fb388; margin-bottom: 14px; }
.lead { color: var(--dim); font-size: 19px; max-width: 760px; }
.center { text-align: center; } .center .lead { margin-left: auto; margin-right: auto; }

/* comparsa delle sezioni scorrendo */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- caratteristiche ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 40px; }
.card { background: var(--panel); border: 3px solid var(--edge); padding: 24px; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.card:hover { transform: translateY(-5px); border-color: var(--pink); }
.card h3 { color: var(--gold); font-size: 21px; }
.card p { color: var(--dim); margin: 0; }
.sprites { display: flex; gap: 6px; max-width: 100%; overflow: hidden; align-items: flex-end; height: 72px; margin-bottom: 14px; }
.sprites img { height: 48px; width: auto; min-width: 0; transition: transform .2s; }
.sprites img.star { height: 34px; }
.sprites img.tall { height: 72px; }
.card:hover .sprites img { animation: hop .45s ease; }
.card:hover .sprites img:nth-child(2) { animation-delay: .06s; } .card:hover .sprites img:nth-child(3) { animation-delay: .12s; } .card:hover .sprites img:nth-child(4) { animation-delay: .18s; }
@keyframes hop { 40% { transform: translateY(-10px); } }
.crop { width: 48px; height: 72px; background-size: 200% 100%; background-repeat: no-repeat; image-rendering: pixelated; display: inline-block; }

/* ---------- mini-gioco ---------- */
.game {
  margin: 36px auto 0; max-width: 860px; background: linear-gradient(#22143df2, #160c2bf2), url("/img/wallback.png") 0 0 / 48px 48px;
  border: 4px solid var(--edge); box-shadow: 0 0 0 4px #000, 0 12px 0 #000a; position: relative; overflow: hidden;
}
.game-hud { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; background: #0b0613cc; border-bottom: 3px solid var(--edge); font-weight: 800; font-size: 18px; gap: 12px; flex-wrap: wrap; }
.game-hud .money { color: var(--gold); }
.game-hud .time { color: #fff; }
.stars .full { color: var(--gold); } .stars .empty { color: #4a3d63; }
.game-hud .stars { letter-spacing: 2px; } .result.stars { font-size: 34px; letter-spacing: 4px; }
.timebar { height: 8px; background: #000; } .timebar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--pink), #8a5cf0); transition: width .2s linear; }
.stage { height: 250px; position: relative; background: url("/img/floor.png") 0 0 / 48px 48px; }
.stage::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60px; background: url("/img/counter.png") 0 0 / 48px 60px repeat-x; }
.customer { position: absolute; left: 50%; bottom: 30px; width: 96px; height: 144px; margin-left: -48px; background-size: 200% 100%; image-rendering: pixelated; transition: transform .25s; z-index: 1; }
.customer.enter { animation: enter .35s ease-out; }
@keyframes enter { from { transform: translateX(160px); opacity: 0; } }
.customer.happy { animation: hop .4s ease; }
.order { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); background: #fff; color: #1b1030; border: 3px solid #1b1030; padding: 8px 16px; font: 800 20px var(--ui-font); white-space: nowrap; z-index: 2; box-shadow: 0 4px 0 #0006; }
.order small { display: block; font-size: 12px; color: #6b5b85; font-weight: 700; }
.float { position: absolute; left: 50%; top: 96px; margin-left: 70px; font: 900 26px var(--ui-font); color: var(--gold); text-shadow: 0 2px 0 #000; pointer-events: none; animation: rise 0.9s ease-out forwards; z-index: 3; }
.float.bad { color: var(--bad); font-size: 18px; }
@keyframes rise { from { transform: translate(-50%, 0); opacity: 1; } to { transform: translate(-50%, -60px); opacity: 0; } }
.glasses { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; padding: 16px; background: #0b0613cc; border-top: 3px solid var(--edge); }
.glass { background: var(--panel2); border: 3px solid var(--edge); color: #fff; font: 700 13px var(--ui-font); padding: 8px 4px 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: transform .1s, border-color .1s; }
.glass img { width: 56px; height: 56px; }
.glass:hover { border-color: var(--pink); transform: translateY(-3px); }
.glass:disabled { opacity: .5; cursor: default; transform: none; }
.glass.wrong { animation: shake .3s; border-color: var(--bad); }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.overlay { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; background: #0b0613e6; }
.overlay h3 { font: 700 40px var(--neon-font); color: #fff; text-shadow: 0 0 10px var(--pink); }
.overlay p { color: var(--dim); max-width: 520px; }
.overlay .result { font-size: 26px; font-weight: 800; color: var(--gold); }
.overlay .btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
@media (max-width: 700px) {
  .glasses { grid-template-columns: repeat(4, 1fr); }
  .glass img { width: 40px; height: 40px; }
  .stage { height: 220px; }
}

/* ---------- galleria ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); grid-auto-rows: 160px; grid-auto-flow: dense; gap: 16px; margin-top: 36px; }
.shot { position: relative; border: 3px solid var(--edge); background: #000; cursor: zoom-in; overflow: hidden; padding: 0; box-shadow: var(--shadow); }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.shot:hover img { transform: scale(1.06); }
.shot span { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 8px; background: linear-gradient(transparent, #000d); color: #fff; font-weight: 700; font-size: 15px; text-align: left; }
.shot.wide { grid-column: span 2; grid-row: span 2; }
@media (max-width: 560px) { .gallery { grid-auto-rows: 200px; } .shot.wide { grid-column: auto; grid-row: auto; } }
.lightbox { position: fixed; inset: 0; z-index: 100; background: #05020af2; display: none; align-items: center; justify-content: center; flex-direction: column; padding: 16px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: min(1400px, 100%); max-height: 80vh; border: 3px solid var(--edge); box-shadow: 0 0 40px #ff4fb344; }
.lightbox p { margin: 12px 0 0; color: #fff; font-weight: 700; text-align: center; }
.lb-btn { position: absolute; top: 50%; transform: translateY(-50%); background: var(--panel); border: 3px solid var(--edge); color: #fff; font: 900 26px var(--ui-font); width: 52px; height: 52px; cursor: pointer; }
.lb-btn:hover { border-color: var(--pink); }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-close { position: absolute; top: 16px; right: 16px; transform: none; top: 16px; }

/* ---------- storia ---------- */
.story { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; margin-top: 30px; }
@media (max-width: 860px) { .story { grid-template-columns: 1fr; } }
.story-pic { position: relative; border: 4px solid var(--edge); box-shadow: var(--shadow); }
.story-pic img { display: block; width: 100%; }
.story-pic::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, transparent 30%, #0b0613aa 100%); pointer-events: none; }
.dialog { background: #1d1238; border: 4px solid var(--gold); padding: 22px 24px; box-shadow: var(--shadow); }
.dialog .who { color: var(--gold); font-weight: 900; letter-spacing: 1px; margin-bottom: 10px; }
.dialog .line { font-size: 21px; font-weight: 700; min-height: 4.6em; color: #fff; }
.dialog .line::after { content: "▌"; color: var(--pink); animation: blink 1s steps(1) infinite; margin-left: 2px; }
.dialog .line.done::after { content: ""; }
@keyframes blink { 50% { opacity: 0; } }
.dialog .btn { width: 100%; justify-content: flex-start; margin-top: 10px; }
.choices { display: grid; gap: 10px; margin-top: 10px; }
.choices .btn { font-size: 16px; padding: 11px 16px; }
.story-note { color: var(--dim); margin-top: 16px; font-size: 15px; }

/* ---------- download ---------- */
.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; margin-top: 36px; }
.dl .card { display: flex; flex-direction: column; }
.dl .card .btn { margin-top: auto; align-self: flex-start; }
.dl .ver { color: var(--good); font-weight: 700; margin-bottom: 10px; }
.dl ol { color: var(--dim); padding-left: 22px; margin: 0 0 20px; }
.dl li { margin-bottom: 4px; }
.platform { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.platform svg { width: 34px; height: 34px; flex: none; }

/* ---------- piè di pagina ---------- */
footer { border-top: 3px solid #2a1b14; background: #07030c; padding: 36px 0 44px; color: var(--dim); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center; }
footer .logo { font-size: 24px; }
footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--dim); }

/* ---------- pagine semplici: account e pagamento di prova ---------- */
.page { min-height: 100vh; padding: 110px 16px 60px; background: linear-gradient(#0b0613d9, #0b0613f5), url("/img/foto_sala.png") center / cover no-repeat fixed; }
.card.form { max-width: 460px; margin: 0 auto; text-align: center; }
.card.form:hover { transform: none; }
.card.wide { max-width: 860px; margin: 0 auto; }
.card.wide:hover { transform: none; }
.big { font-size: 22px; color: var(--text); font-weight: 700; }
.price { font-size: 32px; color: var(--gold); font-weight: 800; margin: 4px 0 16px; }
.warn { color: #ffb070; font-weight: 700; }
.ok { color: var(--good); }
.err { color: var(--bad); min-height: 1.5em; margin: 6px 0; }
label.field { display: block; text-align: left; color: var(--dim); font-weight: 600; font-size: 14px; margin-top: 10px; }
input { width: 100%; padding: 12px; margin: 4px 0 6px; background: #0b0613; border: 3px solid var(--edge); color: #fff; font: 17px var(--ui-font); }
input:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 10px #ff4fb366; }
table { width: 100%; border-collapse: collapse; }
td, th { padding: 10px 8px; border-bottom: 2px solid #3c2a63; text-align: left; }
th { color: var(--dim); font-weight: 600; font-size: 14px; }
.table-scroll { overflow-x: auto; }
.mini-sign { text-align: center; margin-bottom: 28px; }
.mini-sign .neon { font-size: clamp(44px, 8vw, 72px); }
/* compatibilità con la pagina di pagamento di prova del server */
main.card { max-width: 480px; margin: 0 auto; text-align: center; }
main.card:hover { transform: none; }
main.card h1 { font: 400 48px var(--neon-font); color: #fff2fb; text-shadow: 0 0 10px var(--pink), 0 0 22px var(--pink); }
main.card form { margin: 6px 0; }
main.card .btn { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
