/* ==================== HOME PORTAL ADD-ON ==================== */

.hubSection {
  width: 100%;
  margin-top: 20px;
  padding: 20px 0 10px;
}

.hubGrid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 26px;
  margin-top: 28px;
}

.hubCard {
  position: relative;
  display: block;
  min-height: 205px;
  background: var(--surface);
  border: 1px solid rgba(255,102,0,0.12);
  border-radius: 24px;
  padding: 24px;
  text-align: left;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--panel-shadow);
  cursor: pointer;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, opacity .25s ease;
}

.hubCard::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255,102,0,.12), transparent 34%);
  pointer-events: none;
}

.hubCard:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 18px 40px rgba(0,0,0,0.12);
  border-color: rgba(255,102,0,0.28);
}

.hubCard:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.hubIcon {
  font-size: 2.25rem;
  line-height: 1;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.hubCard h3 {
  margin: 0;
  color: var(--text-main);
  font-size: 1.18rem;
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

.hubCard p {
  margin: 9px 0 18px;
  color: var(--text-muted);
  font-size: .94rem;
  line-height: 1.45;
  position: relative;
  z-index: 1;
}

.hubTag,
.hubBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .74rem;
  font-weight: 900;
  position: relative;
  z-index: 1;
}

.hubTag {
  background: rgba(255,102,0,0.1);
  color: var(--accent);
}

.hubBadge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: white;
  box-shadow: 0 8px 18px rgba(255,102,0,0.22);
}

.hubCard.disabled {
  opacity: .68;
  cursor: default;
}

.hubCard.disabled:hover {
  transform: none;
  box-shadow: var(--panel-shadow);
  border-color: rgba(255,102,0,0.12);
}

/* ==================== CERCA + STATISTICHE HOME ==================== */

.portalSearchSection {
  width: min(1080px, 100%);
  margin: 30px auto 36px;
}

.portalSearchWrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.portalSearchInput {
  width: min(460px, 100%);
  height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(255,102,0,.22);
  background: #fff;
  color: var(--text-main);
  font-size: 1rem;
  font-family: inherit;
  box-shadow: 0 10px 26px rgba(0,0,0,.08);
  outline: none;
}

.portalSearchInput:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255,102,0,.14), 0 12px 28px rgba(0,0,0,.1);
}

.portalSearchBtn,
.portalMapBtn {
  height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(255,102,0,.22);
  padding: 0 24px;
  font-family: inherit;
  font-weight: 900;
  cursor: pointer;
}

.portalSearchBtn {
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #fff;
  box-shadow: 0 10px 22px rgba(255,102,0,.24);
}

.portalMapBtn {
  background: rgba(255,255,255,.9);
  color: var(--accent);
}

.noSearchResults {
  margin: 8px auto 22px;
  color: var(--text-muted);
  font-weight: 800;
  text-align: center;
}

.noSearchResults.hidden {
  display: none !important;
}

.portalStatsPanel {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 34px;
  align-items: center;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(255,102,0,.11);
  border-radius: 28px;
  padding: 24px 32px;
  box-shadow: 0 18px 42px rgba(0,0,0,.07);
}

.portalStats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  align-items: center;
}

.portalStat {
  position: relative;
  text-align: center;
}

.portalStat:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -11px;
  top: 50%;
  width: 1px;
  height: 42px;
  transform: translateY(-50%);
  background: rgba(255,102,0,.2);
}

.portalStat strong {
  display: block;
  color: var(--accent);
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: 8px;
}

.portalStat span {
  display: block;
  color: var(--text-muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
}

.popularBox {
  text-align: left;
}

.popularBox h3 {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.gcTopList {
  display: grid;
  gap: 7px;
}

.gcTopItem {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 0;
  color: var(--text-main);
}

.gcTopLabel {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gcTopCount {
  color: var(--accent);
  font-weight: 900;
}

.searchHidden {
  display: none !important;
}

/* =========================
   GIOCHI - CARD COME PORTALE
========================= */

.gamesHubGrid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 26px;
  margin-top: 28px;
}

.gameHubCard {
  min-height: 205px;
  background: linear-gradient(180deg, #fff8f2, #fff1e6);
  border: 1px solid rgba(255,102,0,.2);
  box-shadow: var(--panel-shadow);
}

.gameHubCard::before {
  background: radial-gradient(circle at top right, rgba(255,102,0,.18), transparent 34%);
}

.gameHubCard:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 18px 40px rgba(255,102,0,.18);
  border-color: rgba(255,102,0,.35);
}

.gameHubCard .hubIcon {
  color: var(--accent);
  text-shadow: 0 0 12px rgba(255,102,0,.28);
}

.gameHubCard h3 {
  color: var(--text-main);
}

.gameHubCard .hubTag {
  background: rgba(255,102,0,.1);
  color: var(--accent);
  border: 0;
}

.gameHubCard::after {
  content: "Gioca";
  position: absolute;
  top: 14px;
  right: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: white;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .74rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(255,102,0,.22);
}

/* =========================
   PANEL CHI SONO / CONTATTI / ACCESSO
========================= */

.homePanelOverlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,.2);
  backdrop-filter: blur(6px);
}

.homePanelOverlay.show {
  display: flex;
}

.homePanel {
  position: relative;
  display: none;
  width: min(620px, 100%);
  min-height: 520px;
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  padding: 0;
  border-radius: 24px;
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(255,102,0,.16);
  box-shadow: 0 28px 70px rgba(0,0,0,.18);
  text-align: left;
}

.homePanel.active {
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.homePanelClose {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,102,0,.18);
  background: rgba(255,102,0,.08);
  color: var(--accent);
  padding: 0;
  font-size: 1.4rem;
  line-height: 1;
}

.homePanelHeader {
  padding: 30px 72px 22px 30px;
  border-bottom: 1px solid rgba(255,102,0,.12);
}

.homePanelBody {
  display: grid;
  align-content: start;
  padding: 24px 30px 30px;
}

.profileHeader {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 22px;
  align-items: center;
  padding: 34px 72px 34px 34px;
  background:
    radial-gradient(circle at top right, rgba(255,102,0,.22), transparent 38%),
    linear-gradient(135deg, #fff8f2, #fff1e6);
  color: var(--text-main);
  border-bottom: 1px solid rgba(255,102,0,.16);
}

.profileAvatar {
  width: 78px;
  height: 78px;
  display: block;
  border-radius: 18px;
  background: #06182f;
  border: 2px solid rgba(255,102,0,.18);
  box-shadow: 0 14px 30px rgba(255,102,0,.26);
  overflow: hidden;
}

.profileAvatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profileHeader h2 {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 1.45rem;
}

.profileHeader p,
.profileHeader span {
  display: block;
  margin: 0;
  color: var(--text-muted);
  line-height: 1.45;
  font-weight: 700;
}

.profileHeader span {
  font-size: .88rem;
}

.profileBody {
  gap: 16px;
  padding-bottom: 24px;
}

.profileTags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.profileTags span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255,102,0,.09);
  color: var(--accent);
  font-size: .82rem;
  font-weight: 900;
}

.homePanelFooter {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding: 22px 30px 28px;
  border-top: 1px solid rgba(0,0,0,.08);
}

.panelPrimaryBtn {
  width: auto;
  height: 48px;
  min-width: 150px;
  border-radius: 10px;
  padding: 0 18px;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 900;
}

.panelPrimaryBtn {
  background: linear-gradient(135deg, var(--action-orange), var(--action-orange-soft));
  color: #ffffff;
  border: 0;
  box-shadow: 0 12px 28px rgba(232,93,4,.26);
}

.homePanel h2 {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 1.8rem;
}

.homePanel p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
}

.infoEyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.infoText h3 {
  margin: 0 0 12px;
  color: var(--text-main);
  font-size: 1.35rem;
  line-height: 1.25;
}

.infoText p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
}

.infoHighlights {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.aboutText {
  color: var(--text-main) !important;
  font-size: .98rem;
}

.infoHighlights div {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff8f2, #fff1e6);
  border: 1px solid rgba(255,102,0,.16);
}

.infoHighlights strong {
  color: var(--accent);
  font-size: 1.55rem;
  line-height: 1;
}

.infoHighlights span {
  color: var(--text-muted);
  font-size: .85rem;
  font-weight: 800;
}

.homePanelForm {
  display: grid;
  gap: 16px;
  padding: 0;
  max-width: none;
  margin: 0;
  text-align: left;
}

.homePanelForm label {
  display: grid;
  gap: 8px;
  color: var(--text-main);
  font-weight: 800;
}

.homePanelForm label span,
.ratingField span {
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 700;
}

.homePanelForm .fieldLabel {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 800;
}

.homePanelForm .requiredMark {
  display: inline;
  color: var(--action-orange);
  font-size: .95rem;
  font-weight: 900;
}

.homePanelForm input,
.homePanelForm select,
.homePanelForm textarea {
  min-height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,102,0,.18);
  background: #fff;
  color: var(--text-main);
  font-family: inherit;
  font-size: .96rem;
  outline: none;
}

.botcheck {
  display: none;
}

.homePanelForm textarea {
  padding: 12px 16px;
  resize: vertical;
}

.ratingField {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.ratingField legend {
  padding: 0;
  color: var(--text-main);
  font-weight: 800;
}

.starRating {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 5px;
}

.starRating input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.starRating label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: rgba(255,102,0,.32);
  background: rgba(255,102,0,.06);
  border: 1px solid rgba(255,102,0,.12);
  font-size: 1.25rem;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

.starRating label:hover,
.starRating label:hover ~ label,
.starRating input:checked ~ label {
  color: var(--action-orange);
  background: rgba(255,102,0,.14);
}

.starRating label:hover {
  transform: translateY(-1px);
}

.homePanelForm input:focus,
.homePanelForm select:focus,
.homePanelForm textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255,102,0,.12);
}

.accessTabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px;
  border-radius: 16px;
  background: rgba(255,102,0,.08);
  border: 1px solid rgba(255,102,0,.12);
}

.accessTab {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 900;
}

.accessTab.active {
  background: #ffffff;
  color: var(--accent);
  box-shadow: 0 8px 18px rgba(0,0,0,.08);
}

.accessPane {
  display: none;
  gap: 16px;
}

.accessPane.active {
  display: grid;
}

.googleAccessButton {
  width: 100%;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 16px;
  border: 1.5px solid rgba(255,102,0,.18);
  background: #ffffff;
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(0,0,0,.07);
}

.googleAccessButton:hover {
  background: rgba(255,102,0,.06);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(255,102,0,.14);
}

.googleLogo {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  font-family: Arial, sans-serif;
  font-size: 1.16rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}

.googleLogo .g-blue {
  background: conic-gradient(from -35deg, #4285f4 0 28%, #34a853 28% 47%, #fbbc05 47% 68%, #ea4335 68% 86%, #4285f4 86% 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.accessLinks {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: -2px;
}

.accessLinks.single {
  justify-content: flex-end;
}

.accessLinks button {
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: .78rem;
  font-weight: 900;
  box-shadow: none;
}

.accessLinks button:hover {
  background: transparent;
  color: var(--accent);
  transform: none;
  box-shadow: none;
}

.accessDivider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2px 0;
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 800;
}

.accessDivider::before,
.accessDivider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255,102,0,.14);
}

.accessDivider span {
  padding: 0 12px;
}

.accessButton {
  width: 100%;
  height: 52px;
  border-radius: 16px;
  border: 0;
  background: linear-gradient(135deg, var(--action-orange), var(--action-orange-soft));
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(232,93,4,.26);
}

.accessMessage {
  min-height: 22px;
  margin: 0;
  color: var(--accent);
  text-align: center;
  font-weight: 800;
}

.privacyNote {
  margin: -2px 0 0 !important;
  color: var(--text-muted) !important;
  font-size: .78rem;
  text-align: center;
  line-height: 1.45 !important;
}

@media (max-width: 640px) {
  .homePanel {
    min-height: auto;
  }

  .profileHeader {
    grid-template-columns: 1fr;
    padding: 30px 58px 28px 22px;
  }

  .homePanelFooter {
    flex-direction: column;
    padding: 20px 18px 22px;
  }

  .homePanelHeader {
    padding: 26px 58px 20px 18px;
  }

  .homePanelBody {
    padding: 20px 18px 22px;
  }
}
