/* Layout minimalista stile Google: contenuto centrato e colori neutri */
:root {
  --primary: #1a73e8;
  --text: #202124;
  --muted: #5f6368;
  --border: #dadce0;
  --bg: #f8f9fa;
}
* { box-sizing: border-box; }
.page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 24px;
}
.bg {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(6px) saturate(1.05);
  transform: scale(1.05);
  transition: background-image 0.5s ease, opacity 0.5s ease;
  z-index: 0;
}
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.28);
}
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
}
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 32px;
  z-index: 10;
}
.logo {
  position: fixed;
  top: 16px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.3px;
  z-index: 11;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.logo-mark {
  position: relative;
  width: 36px;
  height: 36px;
  border: 2px solid var(--primary);
  border-radius: 10px;
  display: inline-block;
  background: linear-gradient(135deg, rgba(26,115,232,0.12), rgba(26,115,232,0.04));
}
/* Barra centrale per ricordare una morsa che comprime l'URL */
.logo-mark::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 15px;
  height: 6px;
  background: var(--primary);
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav a:hover {
  background: rgba(26,115,232,0.08);
  color: var(--primary);
}
.nav select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 600;
  background: #fff;
  cursor: pointer;
}
.content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 48px;
  align-items: center;
  min-height: 100vh;
  padding-top: 80px;
}
.shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 32px 30px 40px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 22px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.18);
  text-align: center;
}
.hero {
  color: #fff;
  text-shadow: 0 3px 16px rgba(0,0,0,0.3);
  font-size: 42px;
  font-weight: 700;
  line-height: 1.1;
}
.hero-sub {
  margin-top: 12px;
  max-width: 520px;
  color: rgba(255,255,255,0.92);
  font-size: 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
h1 {
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: -0.2px;
}
p.lead {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 15px;
}
form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}
.input-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
input[type="text"],
input[type="email"],
.text-input {
  flex: 1 1 460px;
  padding: 14px 16px;
  font-size: 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  outline: none;
  background: #fff;
  color: var(--text);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.text-input:invalid {
  box-shadow: none;
  border-color: var(--border);
}
input[type="text"]:focus,
input[type="email"]:focus,
.text-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2);
}
button {
  padding: 14px 22px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  min-width: 160px;
}
button:hover { background: #1558b0; }
button:active { transform: translateY(1px); }
.message {
  min-height: 22px;
  font-size: 14px;
  color: var(--muted);
}
.message.error { color: #c62828; }
.loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-weight: 600;
  margin-top: 12px;
}
.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid #e0e0e0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.result-card {
  margin-top: 18px;
  padding: 18px 16px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f9fbff;
  display: inline-flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.result-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #0f9d58;
}
.result-link a { color: #0f9d58; text-decoration: none; }
.result-link a:hover { text-decoration: underline; }
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.copy-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(26,115,232,0.12);
}
.qr {
  margin-top: 4px;
  padding: 10px;
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 12px;
}
.qr img { width: 180px; height: 180px; display: block; }
.qr-actions {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}
.credit {
  position: fixed;
  bottom: 12px;
  right: 16px;
  z-index: 1;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(6px);
  color: var(--muted);
  font-size: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
.credit a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.credit a:hover { text-decoration: underline; }

.gate {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}
.gate label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
  text-align: left;
}
.gate small {
  color: var(--muted);
}

.note {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 16px;
}
.note a {
  color: var(--text);
  text-decoration: underline;
}
