/**
 * Giochi tab — layout Gemini (immagine mockup approvata, v2026073010)
 * Loghi grandi, copy centrata, stats live da RPC.
 */

.gestisci-app.giochi-tab-active #team-page-title {
  display: none !important;
}

body.gestisci-v2-shell.giochi-page-active {
  padding-bottom: 0 !important;
}

.gestisci-app.giochi-tab-active #gestisci-bottom-nav.bottom-bar {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  width: 100%;
  max-width: none;
  margin: 0;
}

.gestisci-app.giochi-tab-active .screen-scroll.giochi-mode {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0.72rem 0.35rem;
}

.gestisci-app.giochi-tab-active .screen-scroll.giochi-mode #panel-giochi.active {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}

.gestisci-app.giochi-tab-active .screen-scroll.giochi-mode .giochi-stack {
  flex: 1;
  min-height: 0;
  gap: 0.48rem;
}

.gestisci-app #panel-giochi .game-hero {
  flex: 1 1 0;
  min-height: 0;
  border-radius: 1.05rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
}

.gestisci-app #panel-giochi .game-hero-bg-scrim {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.55) 100%);
}

.gestisci-app #panel-giochi .game-hero-content {
  min-height: 0;
  height: 100%;
  padding: 0.62rem 0.78rem 0.58rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.gestisci-app #panel-giochi .game-hero-foot {
  flex-shrink: 0;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.45rem;
  width: 100%;
  margin-top: auto;
}

.gestisci-app #panel-giochi .hero-apri {
  padding: 0.48rem 1.15rem;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 999px;
}

/* —— Summer Tour —— */
.gestisci-app #panel-giochi .game-hero.summer {
  border: 1px solid rgba(249, 168, 37, 0.45);
}

.gestisci-app #panel-giochi .summer-logo-area {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  padding: 0.15rem 0.35rem 0 0.15rem;
}

.gestisci-app #panel-giochi .summer-logo {
  height: 100%;
  width: auto;
  max-width: 72%;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.55));
}

.gestisci-app #panel-giochi .summer-stats-panel {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.38rem 0.62rem;
  border-radius: 0.65rem;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.gestisci-app #panel-giochi .summer-stats-sep {
  width: 1px;
  height: 2rem;
  background: rgba(255, 255, 255, 0.24);
  flex-shrink: 0;
}

.gestisci-app #panel-giochi .game-hero-stats {
  flex-direction: row;
  gap: 0;
}

.gestisci-app #panel-giochi .stat-block {
  text-align: center;
  min-width: 4.5rem;
}

.gestisci-app #panel-giochi .stat-value {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff8e1;
  justify-content: center;
}

.gestisci-app #panel-giochi .stat-label {
  font-size: 0.46rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 224, 130, 0.78);
  text-align: center;
}

.gestisci-app #panel-giochi .hero-apri.summer-apri {
  background: linear-gradient(180deg, #ffe082 0%, #f9a825 100%);
  color: #3e2723;
  box-shadow: 0 4px 14px rgba(249, 168, 37, 0.45);
}

/* —— Sfida BET —— */
.gestisci-app #panel-giochi .game-hero.bet {
  border: 1px solid rgba(76, 175, 80, 0.42);
}

.gestisci-app #panel-giochi .bet-body {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  flex: 1;
  min-height: 0;
}

.gestisci-app #panel-giochi .bet-logo-wrap {
  flex: 0 0 42%;
  max-width: 42%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.gestisci-app #panel-giochi .bet-logo {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.55));
}

.gestisci-app #panel-giochi .bet-copy-block {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0.22rem;
  padding-right: 0.15rem;
}

.gestisci-app #panel-giochi .bet-copy-lead {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.28;
  color: #fff;
}

.gestisci-app #panel-giochi .bet-copy-lead strong {
  color: #69f0ae;
  font-weight: 800;
}

.gestisci-app #panel-giochi .bet-copy-sub {
  margin: 0;
  font-size: 0.62rem;
  line-height: 1.38;
  color: rgba(200, 230, 201, 0.82);
  max-width: 11rem;
}

.gestisci-app #panel-giochi .hero-apri.bet-apri {
  background: linear-gradient(180deg, #81c784 0%, #2e7d32 100%);
  color: #1b5e20;
  box-shadow: 0 4px 14px rgba(46, 125, 50, 0.42);
}

/* —— Trivia —— */
.gestisci-app #panel-giochi .game-hero.trivia {
  border: 1px solid rgba(212, 163, 115, 0.55);
}

.gestisci-app #panel-giochi .trivia-body {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  flex: 1;
  min-height: 0;
}

.gestisci-app #panel-giochi .trivia-logo-wrap {
  flex: 0 0 40%;
  max-width: 40%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0.1rem 0;
}

.gestisci-app #panel-giochi .trivia-logo {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 0.35rem;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.5));
}

.gestisci-app #panel-giochi .trivia-copy-block {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-right: 0.1rem;
}

.gestisci-app #panel-giochi .trivia-title {
  margin: 0 0 0.18rem;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.05;
  color: #ffe8c2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.gestisci-app #panel-giochi .trivia-copy {
  margin: 0 0 0.32rem;
  font-size: 0.62rem;
  line-height: 1.38;
  color: rgba(255, 236, 210, 0.92);
  max-width: 11.5rem;
}

.gestisci-app #panel-giochi .trivia-progress-wrap {
  font-size: 0.62rem;
  color: rgba(255, 236, 210, 0.95);
  width: 100%;
  max-width: 10.5rem;
  text-align: center;
}

.gestisci-app #panel-giochi .trivia-progress {
  height: 0.24rem;
  margin-top: 0.28rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.gestisci-app #panel-giochi .trivia-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #d4a373 0%, #ffe8c2 100%);
  transition: width 0.35s ease;
}

.gestisci-app #panel-giochi .hero-apri.trivia-apri {
  background: linear-gradient(180deg, #ffe8c2 0%, #c68b59 100%);
  color: #3e2723;
  box-shadow: 0 4px 14px rgba(198, 139, 89, 0.45);
}

/* Passaporto Trivia overlay */
#trivia-passaporto-popup.popup-overlay {
  z-index: 10060;
  align-items: center;
  padding: max(3vh, env(safe-area-inset-top, 0px)) 0.85rem max(4vh, env(safe-area-inset-bottom, 0px));
}

#trivia-passaporto-popup .trivia-passaporto-card {
  width: min(28rem, 100%);
  max-height: calc(100dvh - 6rem);
  overflow: auto;
  border-radius: 1rem;
  background: linear-gradient(180deg, #2a1c14 0%, #1a120e 100%);
  border: 1px solid rgba(212, 163, 115, 0.45);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  padding: 0.85rem 0.9rem 1rem;
}

#trivia-passaporto-popup .trivia-passaporto-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

#trivia-passaporto-popup .trivia-passaporto-head h2 {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffe8c2;
  line-height: 1.2;
}

#trivia-passaporto-popup .trivia-passaporto-head p {
  margin: 0.25rem 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: rgba(255, 236, 210, 0.82);
}

#trivia-passaporto-popup .trivia-passaporto-close {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.35);
  color: #ffe8c2;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

#trivia-passaporto-popup .trivia-passaporto-close:hover {
  background: rgba(0, 0, 0, 0.55);
}

#trivia-passaporto-popup .trivia-passaporto-close:active {
  transform: scale(0.96);
}

#trivia-passaporto-popup .trivia-passaporto-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.55rem;
  border: 1px solid rgba(212, 163, 115, 0.35);
  background: #f3e7d3;
}

#trivia-passaporto-popup .trivia-stamp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin-top: 0.75rem;
}

#trivia-passaporto-popup .trivia-stamp-slot {
  --trivia-fill: 0;
  border-radius: 0.5rem;
  border: 1px dashed rgba(255, 232, 194, 0.35);
  background: rgba(0, 0, 0, 0.28);
  padding: 0.45rem 0.3rem;
  text-align: center;
  min-height: 3.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
}

#trivia-passaporto-popup .trivia-stamp-slot .stamp-icon {
  position: relative;
  overflow: hidden;
  font-size: 0.95rem;
  color: rgba(255, 232, 194, 0.45);
}
#trivia-passaporto-popup .trivia-stamp-slot .stamp-icon::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--trivia-fill, 0) * 100%);
  background: currentColor;
  opacity: 0.35;
  pointer-events: none;
  transition: height 0.35s ease;
}
#trivia-passaporto-popup .trivia-stamp-slot.filled {
  border-style: solid;
  border-color: rgba(212, 163, 115, 0.65);
  background: rgba(212, 163, 115, 0.16);
}

#trivia-passaporto-popup .trivia-stamp-slot.filled .stamp-icon {
  color: #ffe082;
}

#trivia-passaporto-popup .trivia-stamp-slot .stamp-label {
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 236, 210, 0.78);
  line-height: 1.2;
}

#trivia-passaporto-popup .trivia-passaporto-note {
  margin: 0.75rem 0 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: rgba(255, 236, 210, 0.78);
  text-align: center;
}

#trivia-passaporto-popup .trivia-passaporto-badge {
  display: inline-block;
  margin-top: 0.55rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #3e2723;
  background: linear-gradient(180deg, #ffe8c2 0%, #c68b59 100%);
}

/* —— Enigma —— */
.gestisci-app #panel-giochi .game-hero.enigma {
  border: 1px solid rgba(171, 71, 188, 0.45);
}

.gestisci-app #panel-giochi .enigma-body {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  flex: 1;
  min-height: 0;
}

.gestisci-app #panel-giochi .enigma-logo-wrap {
  flex: 0 0 40%;
  max-width: 40%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.gestisci-app #panel-giochi .enigma-logo {
  position: static;
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 22px rgba(171, 71, 188, 0.58));
}

.gestisci-app #panel-giochi .enigma-copy-block {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-right: 0.1rem;
}

.gestisci-app #panel-giochi .enigma-title {
  margin: 0 0 0.18rem;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.72rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1.05;
  background: linear-gradient(180deg, #f3e5f5 0%, #ce93d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gestisci-app #panel-giochi .enigma-copy {
  margin: 0 0 0.32rem;
  font-size: 0.62rem;
  line-height: 1.38;
  color: rgba(225, 190, 231, 0.9);
  max-width: 11.5rem;
}

.gestisci-app #panel-giochi .enigma-progress-wrap {
  font-size: 0.62rem;
  color: rgba(225, 190, 231, 0.92);
  width: 100%;
  max-width: 10.5rem;
  text-align: center;
}

.gestisci-app #panel-giochi .enigma-progress {
  height: 0.24rem;
  margin-top: 0.28rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.gestisci-app #panel-giochi .enigma-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ab47bc 0%, #e1bee7 100%);
  transition: width 0.35s ease;
}

.gestisci-app #panel-giochi .hero-apri.enigma-apri {
  background: linear-gradient(180deg, #ce93d8 0%, #7b1fa2 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(123, 31, 162, 0.45);
}

.gestisci-app.giochi-tab-active .game-hero.enigma.opacity-60 {
  opacity: 1 !important;
}

.gestisci-app.giochi-tab-active .game-hero.enigma .hero-apri:disabled {
  opacity: 0.45;
}
