/* ── Reset & Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  font-family: "Source Sans 3", system-ui, sans-serif;
  background: #0d1117;
  color: #e6edf3;
  min-height: 100vh;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

/* ── Nav ──────────────────────────────────────────────────────────── */
.nav {
  background: #161b22;
  border-bottom: 1px solid #21262d;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #e6edf3;
  letter-spacing: -0.01em;
}

.nav-logo span {
  color: #4ade80;
}

.nav-tagline {
  font-size: 0.78rem;
  color: #6e7681;
  letter-spacing: 0.01em;
}

.nav-site {
  font-size: 0.72rem;
  color: #484f58;
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 72px 24px 56px;
  max-width: 700px;
  margin: 0 auto;
}

.hero h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  color: #e6edf3;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero-sub {
  font-size: 1.1rem;
  color: #8b949e;
  margin-bottom: 12px;
}

.hero-cta {
  font-size: 0.9rem;
  color: #6e7681;
  margin-top: 28px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── City Grid ────────────────────────────────────────────────────── */
.city-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 800px;
  margin: 0 auto 60px;
  padding: 0 24px;
}

.city-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  position: relative;
  overflow: hidden;
}

.city-card.active {
  border-color: #2d6a4f;
  box-shadow: 0 0 0 1px #2d6a4f, 0 4px 24px rgba(45, 106, 79, 0.2);
  cursor: pointer;
}

.city-card.active:hover {
  border-color: #40916c;
  box-shadow: 0 0 0 1px #40916c, 0 8px 32px rgba(45, 106, 79, 0.3);
  transform: translateY(-2px);
}

.city-card.active:active {
  transform: translateY(0);
}

.city-card.coming-soon {
  opacity: 0.45;
  cursor: not-allowed;
}

.city-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: #e6edf3;
  margin-bottom: 8px;
}

.city-card.active .city-name {
  color: #e6edf3;
}

.city-action {
  font-size: 0.82rem;
  color: #4ade80;
  font-weight: 500;
}

.city-card.coming-soon .city-action {
  color: #6e7681;
}

/* ── Auth Panel ───────────────────────────────────────────────────── */
.auth-panel {
  max-width: 460px;
  margin: 0 auto 80px;
  padding: 0 24px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.auth-panel.hidden {
  display: none;
}

.auth-box {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 32px 28px;
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-city-badge {
  display: inline-block;
  background: rgba(45, 106, 79, 0.2);
  border: 1px solid rgba(45, 106, 79, 0.4);
  color: #4ade80;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 12px;
}

.auth-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #e6edf3;
}

/* Google button */
.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffffff;
  color: #1f2328;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 6px;
  height: 44px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}

.btn-google:hover {
  background: #f3f4f6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-google svg {
  flex-shrink: 0;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #484f58;
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #21262d;
}

/* Form */
#auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#auth-form input[type="text"],
#auth-form input[type="email"],
#auth-form input[type="password"] {
  width: 100%;
  height: 44px;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  color: #e6edf3;
  font-size: 0.9rem;
  font-family: inherit;
  padding: 0 14px;
  outline: none;
  transition: border-color 0.15s;
}

#auth-form input:focus {
  border-color: #2d6a4f;
}

#auth-form input::placeholder {
  color: #484f58;
}

#name-row {
  display: flex;
  flex-direction: column;
}

#name-row.hidden {
  display: none;
}

.btn-auth-submit {
  width: 100%;
  height: 44px;
  background: #2d6a4f;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 4px;
}

.btn-auth-submit:hover {
  background: #40916c;
}

.btn-auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Footer toggle */
.auth-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 0.85rem;
  color: #8b949e;
}

.btn-text {
  background: none;
  border: none;
  color: #4ade80;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  font-weight: 500;
}

.btn-text:hover {
  text-decoration: underline;
}

/* Error */
.auth-error {
  margin-top: 12px;
  font-size: 0.82rem;
  color: #f87171;
  text-align: center;
}

.auth-error.hidden {
  display: none;
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 680px) {
  .city-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 420px) {
  .city-grid {
    grid-template-columns: 1fr;
  }

  .auth-box {
    padding: 24px 18px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }
}
