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

body {
  font-family: var(--font-sans, system-ui, -apple-system, sans-serif);
  background: var(--surface-default);
  color: var(--text-color-1);
  line-height: 1.6;
}

#app {
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(135deg, var(--surface-tonal) 0%, var(--surface-default) 100%);
}

.auth-card {
  background: var(--surface-elevated);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-l);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h1 {
  font-size: var(--font-size-h3);
  color: var(--text-color-1);
  margin-bottom: 0.5rem;
}

.auth-header p {
  font-size: var(--font-size-sm);
  color: var(--text-color-2);
}

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

.form-group label {
  display: block;
  font-size: var(--font-size-sm);
  color: var(--text-color-1);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  height: var(--field-size);
  padding: 0 1rem;
  border: var(--field-border-width) solid var(--field-border-color);
  border-radius: var(--border-radius);
  background: var(--surface-filled);
  color: var(--text-color-1);
  font-size: var(--font-size-md);
  transition: all 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px oklch(from var(--primary) l c h / 0.1);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: var(--font-size-md);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-contrast);
  width: 100%;
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-m);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--surface-tonal);
  color: var(--text-color-1);
}

.btn-secondary:hover {
  background: var(--surface-filled);
  box-shadow: var(--shadow-s);
}

.auth-divider {
  margin: 1.5rem 0;
  text-align: center;
  position: relative;
}

.auth-divider::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1px;
  background: var(--border-color);
}

.auth-divider span {
  position: relative;
  background: var(--surface-elevated);
  padding: 0 1rem;
  font-size: var(--font-size-sm);
  color: var(--text-color-2);
}

.auth-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--text-color-2);
}

.auth-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.map-container {
  width: 100%;
  height: 100vh;
  position: relative;
}

#map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

.map-header {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.map-info {
  background: var(--surface-elevated);
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-l);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.map-info h2 {
  font-size: var(--font-size-h5);
  color: var(--text-color-1);
  margin: 0;
}

.user-count {
  background: var(--primary);
  color: var(--primary-contrast);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.map-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-icon {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  background: var(--surface-elevated);
  color: var(--text-color-1);
  box-shadow: var(--shadow-l);
}

.btn-icon:hover {
  background: var(--surface-tonal);
  transform: translateY(-2px);
}

.btn-icon i {
  font-size: 1.25rem;
}

.map-instructions {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: var(--surface-elevated);
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-l);
  text-align: center;
  max-width: 90%;
  animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.map-instructions p {
  margin: 0;
  color: var(--text-color-1);
  font-size: var(--font-size-md);
}

.map-instructions i {
  color: var(--primary);
  margin-right: 0.5rem;
}

.leaflet-popup-content-wrapper {
  background: var(--surface-elevated);
  color: var(--text-color-1);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-l);
}

.leaflet-popup-content {
  margin: 1rem;
  font-family: var(--font-sans, system-ui, -apple-system, sans-serif);
}

.leaflet-popup-tip {
  background: var(--surface-elevated);
}

.popup-content h3 {
  margin: 0 0 0.5rem 0;
  font-size: var(--font-size-md);
  color: var(--text-color-1);
}

.popup-content p {
  margin: 0.25rem 0;
  font-size: var(--font-size-sm);
  color: var(--text-color-2);
}

.popup-time {
  font-size: var(--font-size-xs);
  color: var(--text-color-2);
  margin-top: 0.5rem;
}

@media (max-width: 768px) {
  .map-header {
    flex-direction: column;
    align-items: stretch;
  }

  .map-info {
    flex-direction: column;
    align-items: flex-start;
  }

  .map-actions {
    width: 100%;
    justify-content: stretch;
  }

  .map-actions .btn {
    flex: 1;
  }

  .map-instructions {
    bottom: 1rem;
    padding: 0.75rem 1rem;
  }

  .map-instructions p {
    font-size: var(--font-size-sm);
  }
}
