/* === Contenitori principali === */
#fb-welcome-container,
.fb-protected {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 1.5rem auto;
  padding: 1rem;
  max-width: 360px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* === Pulsanti di login === */
.fb-login-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.fb-login-btn {
  width: 240px;
  max-width: 90%;
  cursor: pointer;
  transition: transform 0.2s ease;
  border-radius: 8px;
}

.fb-login-btn:hover {
  transform: scale(1.05);
}

/* === Pulsante guest e logout === */
#login-guest,
#logout-btn {
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1.2rem;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

#login-guest:hover,
#logout-btn:hover {
  background-color: #005ec2;
  transform: scale(1.03);
}

/* === Sezione di benvenuto === */
.fb-welcome-msg {
  text-align: center;
}

.fb-welcome-msg p {
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 0.8rem;
}

.fb-welcome-msg strong {
  color: #007bff;
}

/* === Overlay per richiesta nome === */
.fb-name-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

/* === Box interno richiesta nome === */
.fb-name-box {
  background: #fff;
  padding: 1.5rem 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  width: 280px;
  text-align: center;
}

.fb-name-box label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: #222;
}

.fb-name-box input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 1rem;
}

/* === Pulsanti della modale === */
.fb-name-buttons {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.fb-name-buttons button {
  flex: 1;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.5rem;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background-color 0.2s ease;
}

.fb-name-buttons button:hover {
  background-color: #005ec2;
}

/* === Errore nome === */
#fb-name-error {
  color: red;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* === Contenuto protetto === */
.fb-protected-content {
  display: none;
  width: 100%;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #eee;
  border-radius: 10px;
  background-color: #fafafa;
}

/* === Animazione fade === */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* === Responsive === */
@media (max-width: 480px) {
  #fb-welcome-container,
  .fb-protected {
    max-width: 90%;
    padding: 0.75rem;
  }

  .fb-login-btn {
    width: 200px;
  }

  .fb-name-box {
    padding: 1rem;
  }
}
