:root {
  --primary-color: #1565C0;
  --primary-hover: #0d47a1;
  --bg-color: #f0f7ff;
  --card-bg: #ffffff;
  --text-color: #0f172a;
  --text-muted: #475569;
  --border-color: #cbd5e1;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

html, body {
  max-width: 100%;
  overflow-x: hidden; /* Forza l'assenza di scroll orizzontale */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-wrap: break-word; /* Forza i link/testi lunghi ad andare a capo */
  word-wrap: break-word;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--primary-color);
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow);
}

.header-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.icon-btn {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 50%;
}

.icon-btn:focus-visible {
  outline: 2px solid white;
}

.main-container {
  flex: 1;
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 1rem;
}

.card {
  background-color: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.install-banner {
  background-color: #e3f2fd;
  border: 1px solid #90caf9;
  border-radius: 6px;
  padding: 0.75rem;
  margin-bottom: 1.25rem;
}

.banner-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 0.9rem;
  color: #0d47a1;
}

.share-badge {
  background-color: #bbdefb;
  color: #0d47a1;
  border: 1px solid #64b5f6;
  padding: 0.6rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
  text-align: center;
}

.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

input[type="email"],
input[type="text"] {
  width: 100%;
  padding: 0.65rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background-color: #fff;
}

input:focus {
  outline: 2px solid var(--primary-color);
  border-color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: #e2e8f0;
  color: var(--text-color);
}

.btn-secondary:hover {
  background-color: #cbd5e1;
}

.full-width {
  width: 100%;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
}

.link-btn {
  background: none;
  border: none;
  color: var(--primary-color);
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
}

.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.hidden { display: none !important; }

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}

.modal-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  max-width: 500px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.modal-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 1rem;
  overflow-y: auto;
  font-size: 0.9rem;
}

.modal-body ul {
  margin-left: 1.25rem;
  margin-bottom: 0.5rem;
}

.modal-body hr {
  margin: 0.75rem 0;
  border: 0;
  border-top: 1px solid var(--border-color);
}

.app-footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap; /* Consente agli elementi di andare a capo se lo schermo è troppo stretto */
}