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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
  background: #f2f2f7;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Map as full-screen wallpaper */
.map-cover {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#map {
  width: 100%;
  height: 100%;
}

/* Locating text */
.locating-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -140px);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
  z-index: 1000;
  pointer-events: none;
  opacity: 1;
  transition: opacity 800ms ease;
}

.locating-text.hide {
  opacity: 0;
}

/* Hide Mapbox logo */
.mapboxgl-ctrl-logo,
.mapboxgl-compact {
  display: none !important;
}

/* Fixed avatar at top of page */
.avatar-fixed {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  z-index: 200;
  pointer-events: auto;
  cursor: pointer;
  opacity: 0;
  transition: opacity 1000ms ease;
  will-change: opacity;
}

.avatar-fixed.show {
  opacity: 1;
}

.avatar-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.6),
              0 0 60px rgba(0, 122, 255, 0.5),
              0 8px 40px rgba(0, 0, 0, 0.6);
  position: relative;
  z-index: 2;
  animation: avatarPulse 2s ease-in-out infinite;
  object-fit: cover;
  will-change: transform;
}

.avatar-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(0, 122, 255, 0.3);
  z-index: 1;
  animation: pulse 2s ease-out infinite;
}

@keyframes avatarPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.5);
    opacity: 0;
  }
}

/* iOS-style prelander content - floating card on top of map */
.prelander-content {
  position: relative;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(6px) saturate(130%);
  -webkit-backdrop-filter: blur(6px) saturate(130%);
  padding: 0 0 50px;
  max-width: 440px;
  margin: 30vh auto 40px;
  border-radius: 28px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255,255,255,0.28);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1200ms ease, transform 1200ms ease;
  will-change: opacity, transform;
  z-index: 100;
}

.prelander-content.show {
  opacity: 1;
  transform: translateY(0);
}

/* iOS Profile header */
.profile-header {
  padding: 24px 20px 24px;
  text-align: center;
  border-bottom: 0.5px solid rgba(60, 60, 67, 0.12);
}

.profile-name {
  font-size: 28px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 4px;
  letter-spacing: -0.6px;
}

.verified-badge {
  width: 20px;
  height: 20px;
  vertical-align: -3px;
  margin-left: 6px;
}

.profile-handle {
  font-size: 17px;
  font-weight: 400;
  color: #8e8e93;
  margin-bottom: 0;
}

.prelander-title {
  font-size: 20px;
  font-weight: 600;
  color: #000000;
  text-align: center;
  margin: 24px 0 20px;
  letter-spacing: -0.4px;
  line-height: 1.3;
  padding: 0 20px;
}

.prelander-copy {
  text-align: center;
  margin: 24px 0 24px;
  padding: 0 24px;
}

.prelander-copy p {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  color: #1d1d1f;
  margin: 0 0 14px 0;
  letter-spacing: -0.4px;
}

.prelander-copy p:last-child {
  margin-bottom: 0;
}

.prelander-deal {
  text-align: center;
  margin: 20px 20px 0;
  padding: 0;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.deal-text {
  color: #FF3B30;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.6px;
}

.deal-timer {
  font-size: 15px;
  font-weight: 600;
  color: #8e8e93;
  letter-spacing: -0.3px;
}

/* iOS-style button */
.prelander-btn {
  appearance: none;
  border: 0;
  background: #007AFF;
  color: #ffffff;
  font-weight: 600;
  font-size: 17px;
  padding: 16px 24px;
  border-radius: 14px;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 40px);
  max-width: 400px;
  margin: 0 auto;
  cursor: pointer;
  transition: all 180ms ease-out;
  letter-spacing: -0.4px;
}

.prelander-btn:active {
  transform: scale(0.96);
  opacity: 0.7;
}

.prelander-btn svg {
  flex-shrink: 0;
  opacity: 0.9;
}

/* Intercept overlay */
.intercept-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: transparent;
}

.intercept-overlay.hide {
  pointer-events: none;
  opacity: 0;
}
