/* Made with love ❤️ by semplicemente.io */

:root {
  --bg: #0b0d12;
  --card: #141824;
  --card-2: #1b2030;
  --border: #272d3f;
  --text: #eef1f7;
  --muted: #8b93a7;
  --green: #22c55e;
  --red: #ef4444;
  --radius: 18px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 44px 18px 52px;
  background-image:
    radial-gradient(900px 420px at 10% -10%, rgba(124,140,255,.16), transparent 60%),
    radial-gradient(800px 420px at 90% 110%, rgba(244,114,182,.12), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

.intestazione {
  text-align: center;
  max-width: 600px;
  margin-bottom: 34px;
}

h1 {
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -.03em;
  line-height: 1.08;
  font-weight: 800;
  margin-bottom: 12px;
}

h1 .evidenzia {
  background: linear-gradient(90deg, #7c8cff, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.intestazione p {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.55;
}

.arena {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  width: 100%;
  max-width: 980px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

#card-a {
  --accent: #60a5fa;
  --glow: rgba(96,165,250,.35);
}

#card-b {
  --accent: #a78bfa;
  --glow: rgba(167,139,250,.35);
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 24px 48px -20px var(--glow);
  }
  .card:hover .browser {
    transform: scale(1.02);
  }
  .btn-scegli:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #0b0d12;
    transform: scale(1.015);
  }
}

.card:active {
  transform: scale(.99);
}

.btn-scegli:active {
  transform: scale(.98);
}

.card.scelta {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(34,197,94,.22), 0 24px 48px -20px rgba(34,197,94,.5);
  animation: pop .45s cubic-bezier(.2,.9,.3,1.2);
}

.card.scartata {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(239,68,68,.15);
}

.card.scartata .browser,
.card.scartata .anteprima img {
  filter: grayscale(.45);
}

.anteprima {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0e1119;
  border-bottom: 1px solid var(--border);
}

.anteprima img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.browser {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}

.browser-barra {
  height: 24px;
  flex-shrink: 0;
  background: #e9ecf2;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
}

.browser-barra i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.browser-barra i:nth-child(1) { background: #ff5f57; }
.browser-barra i:nth-child(2) { background: #febc2e; }
.browser-barra i:nth-child(3) { background: #28c840; }

.browser-barra .url {
  margin-left: 7px;
  flex: 1;
  height: 13px;
  border-radius: 6px;
  background: #fff;
  font-size: 8.5px;
  color: #8b93a7;
  display: flex;
  align-items: center;
  padding: 0 7px;
}

.browser-corpo {
  flex: 1;
  position: relative;
  overflow: hidden;
  padding: 12px 16px;
}

.mock-a { background: #fafafa; }
.mock-a .m-nav { display: flex; align-items: center; gap: 9px; margin-bottom: 18px; }
.mock-a .m-nav b { width: 20px; height: 7px; border-radius: 2px; background: #111; }
.mock-a .m-nav span { width: 16px; height: 3.5px; border-radius: 2px; background: #cfd3db; }
.mock-a .m-nav span:first-of-type { margin-left: auto; }
.mock-a .m-h1 { display: block; height: 12.5px; width: 70%; border-radius: 3px; background: #111; margin-bottom: 6px; }
.mock-a .m-h1.corta { width: 45%; }
.mock-a .m-p { display: block; height: 4.5px; width: 55%; border-radius: 2px; background: #d5d9e1; margin-top: 8px; }
.mock-a .m-p.corta { width: 35%; margin-top: 4px; }
.mock-a .m-griglia { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 16px; }
.mock-a .m-griglia div { height: 56px; border-radius: 6px; }
.mock-a .m-griglia div:nth-child(1) { background: linear-gradient(135deg, #dfe6ff, #c7d2fe); }
.mock-a .m-griglia div:nth-child(2) { background: linear-gradient(135deg, #ffe4e6, #fecdd3); }
.mock-a .m-griglia div:nth-child(3) { background: linear-gradient(135deg, #dcfce7, #bbf7d0); }

.mock-b { background: #0d0f1a; }
.mock-b .m-blob { position: absolute; border-radius: 50%; filter: blur(26px); opacity: .75; }
.mock-b .m-blob.uno { width: 140px; height: 140px; background: #7c3aed; top: -45px; right: -25px; }
.mock-b .m-blob.due { width: 125px; height: 125px; background: #06b6d4; bottom: -50px; left: -18px; }
.mock-b .m-nav { position: relative; display: flex; align-items: center; gap: 9px; margin-bottom: 22px; }
.mock-b .m-nav b { width: 9px; height: 9px; border-radius: 50%; background: linear-gradient(135deg, #a78bfa, #22d3ee); }
.mock-b .m-nav span { width: 16px; height: 3.5px; border-radius: 2px; background: rgba(255,255,255,.25); }
.mock-b .m-nav span:first-of-type { margin-left: auto; }
.mock-b .m-h1 { position: relative; display: block; height: 15px; width: 80%; border-radius: 3px; background: linear-gradient(90deg, #fff, #c4b5fd); margin-bottom: 7px; }
.mock-b .m-h1.corta { width: 55%; background: linear-gradient(90deg, #c4b5fd, #67e8f9); }
.mock-b .m-btn { position: relative; display: inline-block; margin-top: 10px; width: 54px; height: 14px; border-radius: 7px; background: #fff; }
.mock-b .m-righe { position: relative; display: grid; grid-template-columns: 1.4fr 1fr; gap: 7px; margin-top: 16px; }
.mock-b .m-righe div { height: 42px; border-radius: 7px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); }

.velo {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(8,10,16,.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
}

.arena.votato .velo {
  opacity: 1;
}

.velo .pct {
  font-size: clamp(42px, 6.2vw, 60px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1;
  text-shadow: 0 4px 20px rgba(0,0,0,.5);
}

.velo .voti {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  background: rgba(0,0,0,.4);
  padding: 5px 12px;
  border-radius: 999px;
}

.card.scelta .velo .pct { color: #4ade80; }
.card.scartata .velo .pct { color: #f87171; }

.badge {
  position: absolute;
  top: 11px;
  left: 11px;
  z-index: 3;
  font-size: 11.5px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(-7px);
  transition: opacity .3s ease .3s, transform .3s ease .3s;
}

.badge-scelta { background: var(--green); color: #052e16; }
.badge-scartata { background: var(--red); color: #fff; }

.card.scelta .badge-scelta,
.card.scartata .badge-scartata {
  opacity: 1;
  transform: none;
}

.info {
  padding: 16px 18px 5px;
  flex: 1;
}

.titolo-riga {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

h2 {
  font-size: 18.5px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.link-esterno {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 5px 9px;
  border-radius: 7px;
  border: 1px solid var(--border);
  white-space: nowrap;
  transition: background .2s;
}

.link-esterno:hover {
  background: rgba(255,255,255,.06);
}

.link-esterno:focus-visible,
.btn-scegli:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.descrizione {
  color: var(--muted);
  font-size: 13.8px;
  line-height: 1.48;
}

.azione {
  padding: 12px 18px 18px;
}

.btn-scegli {
  width: 100%;
  padding: 12.5px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, transform .15s;
}

.barra {
  display: none;
  height: 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}

.riempimento {
  height: 100%;
  width: 0;
  border-radius: inherit;
  transition: width 1s cubic-bezier(.2,.8,.2,1);
}

.card.scelta .riempimento {
  background: linear-gradient(90deg, #16a34a, #4ade80);
}

.card.scartata .riempimento {
  background: linear-gradient(90deg, #dc2626, #f87171);
}

.arena.votato .btn-scegli { display: none; }
.arena.votato .barra { display: block; }

.vs {
  align-self: center;
  justify-self: center;
  z-index: 2;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #ffffff;
  font-weight: 900;
  font-size: 17px;
  letter-spacing: .5px;
  box-shadow: 0 0 0 6px rgba(139, 92, 246, .18), 0 10px 26px rgba(124, 58, 237, .35);
}

.esito {
  margin-top: 28px;
  text-align: center;
  animation: saliSu .5s ease both;
}

.riepilogo {
  font-size: 15px;
  color: var(--muted);
}

.riepilogo strong {
  color: var(--text);
}

.test {
  margin-top: 12px;
  font-size: 12px;
  color: #5b6478;
}

.test button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: #8b93a7;
  text-decoration: underline;
  cursor: pointer;
}

.test button:hover {
  color: var(--text);
}

.pie-pagina {
  margin-top: auto;
  padding-top: 42px;
  text-align: center;
  font-size: 13px;
  color: #64748b;
}

.pie-pagina a {
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}

.pie-pagina a:hover {
  color: var(--text);
  text-decoration: underline;
}

@keyframes pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.025); }
  100% { transform: scale(1); }
}

@keyframes saliSu {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 820px) {
  body { padding: 28px 14px 44px; }
  .intestazione { margin-bottom: 24px; }
  .arena { grid-template-columns: 1fr; gap: 14px; }
  .vs { width: 46px; height: 46px; font-size: 14px; margin: -2px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
