/* =========================================================
   ConfortPark / ParkRadar — Design Tokens
   ========================================================= */

:root {
  /* --- Tema scuro (default) --- */
  --bg: #0A0E17;
  --surface: #161B2E;
  --card: #12122a;
  --border: #6A3452;
  --gold: #C9A227;
  --gold: #C9A227;              /* dorato originale (per sfondi scuri) */
  --gold-text: #B8860B;         /* dorato scuro (per testi su sfondo chiaro) */
  --gold-shadow: 0 1px 2px rgba(0,0,0,.55), 0 0 6px rgba(0,0,0,.35);
  --red: #A52A2A;
  --plum: #6A3452;
  --offwhite: #F2F2F2;
  --text: #F2F2F2;
  --sub: #9999bb;

  --accent: #4f8ef7;
  --verde: #00cc66;
  --rosso: #ff4d4d;
  --libero: #4ADE80;
  --incerto: #FCD34D;
  --occupato: #F87171;
  --green: #2A7A4A;
  --orange: #C4742A;
}

/* --- Tema chiaro: attivato con <body class="light"> --- */
body.light, body.tema-chiaro {
  --bg: #F5F0EB;
  --surface: #ffffff;
  --card: #ffffff;
  --border: #D1C7B8;
  --text: #1A1A1A;
  --sub: #6b7280;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  transition: background 0.3s ease, color 0.3s ease;
}

a { text-decoration: none; }

.card {
  background: var(--card);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.header-bar {
  background: var(--card);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.header-bar .back-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 20px;
  cursor: pointer;
}

.header-title {
  color: var(--accent);
  font-weight: 800;
  font-size: 18px;
}

.input-field {
  display: flex;
  align-items: center;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0 16px;
  height: 56px;
  gap: 12px;
  transition: border-color 0.2s ease;
}

.input-field:focus-within {
  border-color: var(--gold);
}

.input-field input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
}

.btn-primary {
  background: var(--red);
  border-radius: 12px;
  padding: 17px 0;
  border: none;
  color: var(--offwhite);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 4px;
  cursor: pointer;
  width: 100%;
  transition: opacity 0.2s ease;
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 15px 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
}
.divider .line { flex: 1; height: 1px; background: var(--border); }
.divider span { font-size: 11px; color: var(--plum); }

.error-box {
  background: rgba(165,42,42,0.18);
  border: 1px solid var(--red);
  border-radius: 10px;
  padding: 12px 16px;
  color: #FF6B6B;
  font-size: 13px;
  font-weight: 600;
}

.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--card);
  padding: 10px 20px;
  display: flex;
  justify-content: space-around;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.15);
}
.bottom-nav a {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.bottom-nav a.active { color: var(--accent); }

.hyper-bg-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(var(--gold) 0.6px, transparent 0.6px);
  background-size: 50px 50px;
  background-position: 20px 20px;
  opacity: 0.07;
}
.hyper-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

@keyframes pulse-logo {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
.logo-pulse {
  animation: pulse-logo 3.2s ease-in-out infinite;
}

@keyframes fade-slide-in {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.fade-slide-in {
  animation: fade-slide-in 0.9s ease forwards;
}

@keyframes radar-scale {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.4); }
}
.radar-pulse {
  display: inline-block;
  animation: radar-scale 1.6s ease-in-out infinite;
}
