.gs-main-container {
  background-size: cover;
  background-repeat: no-repeat;
  overflow: hidden;
  background-position: center;
  padding-right: 40px;
  color: white;
  padding-left: 40px;
  background-image: url("../assets/bg-gradient.png");
  height: calc(100 * var(--vh, 1vh));
  animation: gs-fadeIn 1s ease-in-out;
}

@keyframes gs-fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.gs-header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 48px;
}

.gs-login-header {
  display: flex;
  align-items: center;
}
.gs-login-header > * + * {
  margin-left: 14px; /* era gap: 14px (Chromium 84); qui webOS 5 */
}

.gs-header-logo {
  height: 46px;
}

.gs-content-wrap {
  zoom: 1.2;
  height: calc(60 * var(--vh, 1vh));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  position: relative;
  padding: 20px;
}

.gs-panel {
  width: 65%;
  border-radius: 10px;
  padding: 48px 56px 40px;
  border: 1px solid rgba(255, 255, 255, 0.02);
  position: relative;
  background-color: #071212;
}

.gs-panel::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0; /* era inset: 0 (Chromium 87); qui webOS 5 */
  border-radius: 10px;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.gs-title {
  text-align: center;
  margin: 0 0 30px 0;
  font-weight: 500;
  font-size: 40px;
  letter-spacing: 0.4px;
}

.gs-options-list {
  display: flex;
  flex-direction: column;
  margin-bottom: 28px;
}
.gs-options-list > * + * {
  margin-top: 18px; /* era gap: 18px (Chromium 84); qui webOS 5 */
}

.gs-option {
  display: flex;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  align-items: center;
  padding: 18px 22px;
  background-color: black;
  border-radius: 10px;
  position: relative;
  transition: all 0.2s ease;
}

.gs-option:hover {
  border: 1px solid #d18d15;
  transform: translateY(-1px);
}

.gs-option .gs-checkbox {
  margin-right: 18px;
}

.limit-option {
  justify-content: space-between;
  cursor: pointer;
}

.gs-limit-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.gs-limit-label {
  font-size: 24px;
  font-weight: 600;
}

.gs-limit-selector {
  display: flex;
  align-items: center;
}
.gs-limit-selector > * + * {
  margin-left: 12px; /* era gap: 12px (Chromium 84); qui webOS 5 */
}

.gs-limit-display {
  font-size: 20px;
  color: var(--gold);
}

.gs-limit-arrow {
  font-size: 14px;
  color: var(--gold);
  transition: transform 0.2s ease;
}

.gs-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #071212;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-top: none;
  border-radius: 0 0 10px 10px;
  z-index: 10;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.gs-dropdown-option {
  padding: 15px 22px;
  font-size: 20px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 0.2s ease;
}

.gs-dropdown-option:last-child {
  border-bottom: none;
}

.gs-dropdown-option:hover {
  background-color: rgba(209, 141, 21, 0.1);
}

.gs-checkbox {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 8px;
  display: flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border: 1px solid white;
  position: relative;
}

.gs-checkbox input {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  background: transparent;
  display: none;
}

.gs-checkbox::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 12px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -50%) rotate(45deg);
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.gs-checkbox.gs-checked::after {
  opacity: 1;
}

.gs-option-label {
  font-size: 24px;
  font-weight: 600;
  user-select: none;
}

.gs-actions {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.gs-btn {
  border: none;
  padding: 16px 36px;
  font-weight: 700;
  font-size: 18px;
  border-radius: 40px;
  cursor: pointer;
  min-width: 160px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

.gs-back-btn {
  background: #ffffff;
  color: #0b0b0b;
}

.gs-btn:hover {
  background-color: #d18d15;
  color: white;
  transform: translateY(-2px);
}

/* Focus states */
/* La riga Versione (c31, forma 7): in fondo, un testo grigio, NON selezionabile. */
.gs-versione {
  margin: 18px 0 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 18px;
  text-align: right;
}
.gs-focused {
  box-shadow: inset 0 0 0 3px var(--gold) !important;
}

.gs-btn-focused {
  background: var(--gold) !important;
  color: black !important;
  outline: none;
}

.gs-dropdown-option.gs-focused {
  background-color: rgba(209, 141, 21, 0.2);
  box-shadow: inset 3px 0 0 var(--gold);
}

@media (max-width: 720px) {
  .gs-panel {
    padding: 28px 20px;
    width: 92%;
  }
  .gs-checkbox {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }
  .gs-option-label {
    font-size: 18px;
  }
  .gs-btn {
    padding: 12px 22px;
    font-size: 16px;
    min-width: 140px;
  }
  .gs-title {
    font-size: 32px;
  }
  .gs-header {
    padding: 18px;
  }
  .gs-limit-label {
    font-size: 18px;
  }
  .gs-limit-display {
    font-size: 16px;
  }
  .gs-dropdown-option {
    font-size: 16px;
    padding: 12px 18px;
  }
}

@media (max-width: 420px) {
  .gs-actions {
    flex-direction: column;
    align-items: center;
  }
.gs-actions > * + * {
  margin-top: 12px; /* era gap: 12px (Chromium 84); qui webOS 5 */
}
  .gs-option {
    padding: 12px 16px;
  }
}

#gs-save-btn {
  margin-right: 28px;
}

/* Additional CSS for selected dropdown option */
.gs-option-selected {
  background-color: rgba(209, 141, 21, 0.2) !important;
  border-left: 3px solid var(--gold) !important;
  color: var(--gold) !important;
}

.gs-dropdown-option.gs-option-selected::before {
  content: "✓";
  margin-right: 10px;
  font-weight: bold;
  color: var(--gold);
}

/* "Non salvare la cronologia" (12 ottobre 2026, decisione 92): il valore Si'/No in oro, come il limite */
.gs-nocron-valore {
  font-size: 24px;
  font-weight: 600;
  color: var(--gold, #e7a101);
}

/* LE IMPOSTAZIONI A LISTA SUI TV (15 ottobre 2026, punto 26b; pages/SettingsPage.js, ImpostazioniWeb): la lista di Android e della web
   (web.css, html.web .impw-*, che sulla web vince), dentro l'area sicura dei TV (60 px sopra, 140 ai lati), fondo nero; in testa
   l'intestazione unica (css/intestazione.css, punto 26c). Niente gap ne' inset (Chromium 63). */
.impw-tv { position: absolute; top: 0; left: 0; right: 0; bottom: 0; overflow-y: auto; padding: 60px 140px 40px; box-sizing: border-box; background: #000; font-family: "Poppins", sans-serif; color: #fff; }
.impw-tv .impw-riga { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; margin: 6px 0; border-radius: 10px; background: rgba(255, 255, 255, 0.06); border: 3px solid transparent; }
.impw-tv .impw-riga.impw-fuoco { border-color: #e7a101; background: rgba(231, 161, 1, 0.12); }
.impw-tv .impw-testi { display: flex; flex-direction: column; min-width: 0; }
.impw-tv .impw-voce { font-size: 30px; }
.impw-tv .impw-descrizione { font-size: 20px; color: rgba(255, 255, 255, 0.65); margin-top: 4px; }
.impw-tv .impw-valore { font-size: 28px; color: #e7a101; margin-left: 30px; white-space: nowrap; }
.impw-tv .impw-versione { margin-top: 18px; font-size: 22px; color: rgba(255, 255, 255, 0.6); }
/* il dialogo Si'/No sui TV (components/ConfermaWeb.js): le misure della web (web.css, html.web .cw-*); il velo copre lo schermo */
.cw-velo { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.8); display: flex; align-items: center; justify-content: center; z-index: 80; }
.cw-riquadro { background: #161b22; border: 2px solid rgba(255, 255, 255, 0.2); border-radius: 14px; padding: 36px 44px; max-width: 1100px; display: flex; flex-direction: column; align-items: center; font-family: "Poppins", sans-serif; color: #fff; }
.cw-testo { font-size: 30px; text-align: center; margin-bottom: 22px; }
.cw-tasti { display: flex; }
.cw-pulsante { margin: 0 12px; padding: 14px 44px; font-family: "Poppins", sans-serif; font-size: 28px; font-weight: 600; color: #fff; background: rgba(255, 255, 255, 0.12); border: 3px solid rgba(255, 255, 255, 0.25); border-radius: 8px; outline: none; }
.cw-pulsante.cw-focused { border-color: #e7a101; background: rgba(231, 161, 1, 0.2); }
/* L'attribuzione TMDB sotto la riga Versione (decisione 104, A5 a), TV e web */
.impw-tmdb { display: flex; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.impw-tmdb-logo { height: 22px; width: auto; margin-right: 16px; flex: 0 0 auto; }
.impw-tmdb-testo { margin: 0; font-size: 18px; color: rgba(255, 255, 255, 0.6); }
/* accanto, JustWatch (decisione 83): solo testo, va a capo dove non c'e' posto */
.impw-justwatch { margin: 0 0 0 24px; font-size: 18px; color: rgba(255, 255, 255, 0.6); }
