@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&family=Space+Mono:wght@400;700&display=swap');

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

:root {
  --bg: #0f0f0f;
  --bg2: #1a1a1a;
  --bg3: #252525;
  --border: #262626;
  --text: #f0f0f0;
  --muted: #888;
  --dim: #666;
  --orange: #FF5C00;
  --green: #00C896;
  --purple: #7C5CFF;
  --yellow: #FFD600;
  --red: #FF3B3B;
  --map-bg: #161719;
  --r16: 16px;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

#app {
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
  position: relative;
  background: var(--bg);
  overflow: hidden;
}

/* ─── SCREENS ─── */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.screen.active { display: flex; }
.screen.scroll { overflow-y: auto; }

/* ─── STATUS BAR ─── */
.status-bar {
  flex: none;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 10;
}
.status-time {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 15px;
}
.status-battery { display: flex; align-items: center; gap: 4px; }

/* ─── SCROLLBAR HIDE ─── */
.hide-scroll { scrollbar-width: none; -ms-overflow-style: none; }
.hide-scroll::-webkit-scrollbar { display: none; }

/* ─── ONBOARDING ─── */
#screen-onboarding {
  background: var(--bg);
}
.ob-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 28px 48px;
}
.ob-illustration {
  flex: 1;
  border-radius: 24px;
  background: #131315;
  border: 1px solid #1e1e20;
  position: relative;
  overflow: hidden;
  margin-top: 8px;
  min-height: 300px;
}
.ob-content { padding-top: 32px; }
.ob-dots {
  display: flex;
  gap: 7px;
  margin-bottom: 26px;
}
.ob-dot {
  height: 5px;
  border-radius: 3px;
  background: #2c2c2c;
  transition: width .3s, background .3s;
}
.ob-dot.active { width: 24px; background: var(--orange); }
.ob-dot:not(.active) { width: 8px; }
.ob-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 38px;
  line-height: 1.02;
  color: var(--text);
  letter-spacing: -1.5px;
  margin-bottom: 12px;
}
.ob-sub {
  font-size: 17px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 280px;
}
.ob-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
}
.ob-skip { font-size: 15px; color: var(--dim); cursor: pointer; }
.ob-btn-next {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--orange);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.ob-btn-start {
  width: 100%;
  height: 56px;
  border-radius: 16px;
  background: var(--orange);
  border: none;
  color: #0f0f0f;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

/* Map markers */
.marker {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid #131315;
}
.marker-pulse {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: .55; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* ─── MAP SCREEN ─── */
#screen-map { background: var(--map-bg); }
.map-bg {
  position: absolute;
  inset: 0;
  background: var(--map-bg);
  z-index: 0;
}
.map-overlay-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 200px;
  background: linear-gradient(var(--bg) 8%, rgba(15,15,15,0));
  z-index: 10;
  pointer-events: none;
}
.map-controls {
  position: absolute;
  top: 56px;
  left: 14px; right: 14px;
  z-index: 20;
  display: flex;
  gap: 10px;
}
.search-bar {
  flex: 1;
  height: 50px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  cursor: text;
}
.search-bar span { color: var(--muted); font-size: 15px; }
.gps-btn {
  width: 50px; height: 50px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
}
.filter-row {
  position: absolute;
  top: 118px;
  left: 0; right: 0;
  z-index: 20;
  display: flex;
  gap: 8px;
  padding: 0 14px;
  overflow-x: auto;
}
.filter-row { scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-pill {
  flex: none;
  height: 36px;
  padding: 0 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  transition: background .2s, color .2s;
  white-space: nowrap;
  user-select: none;
}
.filter-pill.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.filter-pill .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.map-marker {
  position: absolute;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 3px solid var(--map-bg);
  box-shadow: 0 4px 10px rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .15s;
  z-index: 5;
}
.map-marker:hover { transform: scale(1.15); }
.map-marker-inner { width: 8px; height: 8px; border-radius: 50%; }
.map-marker-selected {
  width: 42px; height: 42px;
  border: 3px solid var(--text);
  box-shadow: 0 6px 18px rgba(255,92,0,.6);
}
.user-dot {
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #3b82f6;
  border: 3px solid var(--text);
  box-shadow: 0 0 0 6px rgba(59,130,246,.25);
  z-index: 5;
}
.bottom-sheet {
  position: absolute;
  bottom: 64px;
  left: 0; right: 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-radius: 24px 24px 0 0;
  padding: 10px 0 18px;
  z-index: 30;
  box-shadow: 0 -14px 40px rgba(0,0,0,.45);
}
.sheet-handle {
  width: 38px; height: 5px;
  border-radius: 3px;
  background: #3a3a3a;
  margin: 0 auto 14px;
}
.sheet-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 20px 14px;
}
.sheet-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 18px;
}
.sheet-title span {
  font-family: 'Space Mono', monospace;
  color: var(--orange);
  font-size: 14px;
}
.sheet-more { font-size: 13px; color: var(--muted); cursor: pointer; }
.cards-row {
  display: flex;
  gap: 12px;
  padding: 0 20px;
  overflow-x: auto;
}
.cards-row { scrollbar-width: none; }
.cards-row::-webkit-scrollbar { display: none; }
.spot-card-h {
  flex: none;
  width: 158px;
  cursor: pointer;
}
.spot-card-h-img {
  height: 96px;
  border-radius: 14px;
  background: repeating-linear-gradient(135deg,#1f1f21,#1f1f21 9px,#262629 9px,#262629 18px);
  position: relative;
  overflow: hidden;
}
.spot-card-tag {
  position: absolute;
  top: 8px; left: 8px;
  height: 20px;
  padding: 0 9px;
  border-radius: 6px;
  color: #0f0f0f;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 9px;
  letter-spacing: .5px;
  display: flex;
  align-items: center;
}
.spot-card-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 15px;
  margin-top: 8px;
}
.spot-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 3px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--muted);
}
.spot-card-meta .star { color: var(--yellow); }

/* ─── BOTTOM NAV ─── */
.bottom-nav {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 64px;
  background: #131313;
  border-top: 1px solid #222;
  display: flex;
  z-index: 40;
  flex: none;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
}
.nav-label { font-size: 10px; color: var(--dim); font-weight: 500; }
.nav-label.active { color: var(--orange); font-weight: 600; }
.nav-add {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-add-btn {
  width: 46px; height: 46px;
  border-radius: 15px;
  background: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -8px;
  box-shadow: 0 6px 16px rgba(255,92,0,.4);
  cursor: pointer;
}

/* ─── SPOT DETAIL ─── */
#screen-spot {
  overflow-y: auto;
  padding-bottom: 90px;
}
.spot-hero {
  height: 290px;
  background: repeating-linear-gradient(135deg,#1c1c1e,#1c1c1e 12px,#232326 12px,#232326 24px);
  border-radius: 0 0 24px 24px;
  position: relative;
  flex: none;
}
.spot-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(15,15,15,.55) 0%,rgba(15,15,15,0) 30%,rgba(15,15,15,0) 60%,rgba(15,15,15,.85));
  border-radius: 0 0 24px 24px;
}
.spot-hero-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: #4a4a4a;
  letter-spacing: 2px;
}
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: rgba(15,15,15,.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
}
.discipline-pill {
  position: absolute;
  bottom: 16px; left: 20px;
  height: 26px;
  padding: 0 12px;
  border-radius: 8px;
  color: #0f0f0f;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
}
.spot-body { padding: 18px 20px; }
.spot-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -.5px;
}
.spot-address {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}
.stats-row {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.stat-box {
  flex: 1;
  background: var(--bg2);
  border-radius: 12px;
  padding: 10px 0;
  text-align: center;
}
.stat-val {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 15px;
}
.stat-label { font-size: 10px; color: var(--muted); margin-top: 2px; }
.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 16px;
  margin-top: 24px;
  margin-bottom: 12px;
}
.tags-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--bg3);
  font-size: 13px;
  display: flex;
  align-items: center;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.photo-thumb {
  aspect-ratio: 1;
  border-radius: 10px;
  background: repeating-linear-gradient(135deg,#1c1c1e,#1c1c1e 8px,#232326 8px,#232326 16px);
  position: relative;
  overflow: hidden;
}
.photo-more {
  position: absolute;
  inset: 0;
  background: rgba(15,15,15,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 15px;
}
.review-card {
  background: var(--bg2);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.review-header { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  flex: none;
}
.review-meta { flex: 1; }
.review-user { font-weight: 600; font-size: 14px; }
.review-date { font-family: 'Space Mono', monospace; font-size: 11px; color: var(--dim); }
.review-stars { font-family: 'Space Mono', monospace; font-size: 13px; color: var(--yellow); }
.review-text { font-size: 14px; line-height: 1.5; color: #bbb; margin-top: 10px; }
.spot-cta {
  position: fixed;
  bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px;
  padding: 14px 20px 32px;
  background: linear-gradient(rgba(15,15,15,0),#0f0f0f 30%);
  display: flex;
  gap: 10px;
  z-index: 50;
}
.btn-primary {
  flex: 1;
  height: 54px;
  border: none;
  border-radius: 16px;
  background: var(--orange);
  color: #0f0f0f;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-icon {
  width: 54px; height: 54px;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
}

/* ─── ADD SPOT ─── */
#screen-add { background: var(--bg); }
.add-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 18px;
}
.add-cancel { font-size: 15px; color: var(--muted); cursor: pointer; }
.add-title { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 16px; }
.add-step-label { font-family: 'Space Mono', monospace; font-size: 13px; color: var(--orange); }
.progress-bar {
  display: flex;
  gap: 6px;
  padding: 0 20px;
  margin-bottom: 28px;
}
.progress-seg {
  flex: 1;
  height: 4px;
  border-radius: 3px;
  background: #2a2a2a;
  transition: background .3s;
}
.progress-seg.done { background: var(--orange); }
.add-body { flex: 1; padding: 0 20px; display: flex; flex-direction: column; overflow-y: auto; }
.step { display: none; flex: 1; flex-direction: column; }
.step.active { display: flex; }
.step-h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -.5px;
  margin-bottom: 6px;
}
.step-sub { font-size: 15px; color: var(--muted); margin-bottom: 24px; }
.drop-zone {
  flex: 1;
  border: 2px dashed var(--orange);
  border-radius: 20px;
  background: rgba(255,92,0,.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 34px;
  cursor: pointer;
  transition: background .2s;
}
.drop-zone:hover { background: rgba(255,92,0,.08); }
.drop-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(255,92,0,.12);
  display: flex;
  align-items: center;
  justify-content: center;
}
.drop-text { text-align: center; }
.drop-text strong { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 16px; display: block; }
.drop-text small { font-size: 14px; color: var(--muted); margin-top: 4px; display: block; }
.field-label {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 7px;
}
.field-input {
  height: 52px;
  background: var(--bg3);
  border-radius: 14px;
  border: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  color: var(--dim);
  font-size: 15px;
  width: 100%;
  font-family: 'Inter', sans-serif;
  outline: none;
}
.field-input:focus { border: 1px solid var(--orange); }
.mini-map {
  border-radius: 20px;
  overflow: hidden;
  height: 320px;
  position: relative;
  background: var(--map-bg);
  margin-bottom: 16px;
}
.mini-map-pin {
  position: absolute;
  left: 50%; top: 44%;
  transform: translate(-50%, -100%);
}
.my-pos-btn {
  position: absolute;
  bottom: 14px; right: 14px;
  height: 40px;
  padding: 0 14px;
  border: none;
  border-radius: 12px;
  background: var(--bg2);
  color: var(--orange);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}
.discipline-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.disc-card {
  background: var(--bg2);
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  padding: 12px 6px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s;
}
.disc-card.active { border-width: 2px; }
.disc-icon {
  width: 30px; height: 30px;
  border-radius: 9px;
  margin: 0 auto 7px;
  opacity: .85;
}
.disc-card.active .disc-icon { opacity: 1; }
.disc-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.disc-card.active .disc-label { color: var(--text); }
.equip-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.equip-tag {
  height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--bg3);
  color: var(--muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  transition: background .15s, color .15s;
}
.equip-tag.active {
  background: var(--orange);
  color: #0f0f0f;
  font-weight: 600;
}
.recap-card {
  background: var(--bg2);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 20px;
}
.recap-img {
  height: 170px;
  background: repeating-linear-gradient(135deg,#1c1c1e,#1c1c1e 12px,#232326 12px,#232326 24px);
  position: relative;
}
.recap-body { padding: 16px; }
.recap-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 20px;
}
.add-footer {
  padding: 14px 20px 32px;
  flex: none;
}
.confirm-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  margin-top: 16px;
}
.field-textarea {
  min-height: 80px;
  background: var(--bg3);
  border-radius: 14px;
  border: none;
  padding: 14px;
  color: var(--dim);
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  width: 100%;
  resize: none;
  outline: none;
}
.field-textarea:focus { border: 1px solid var(--orange); }

/* ─── PROFILE ─── */
#screen-profile { overflow-y: auto; }
.profile-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 14px;
}
.profile-avatar-wrap { display: flex; flex-direction: column; align-items: center; padding: 0 20px 22px; }
.profile-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: repeating-linear-gradient(135deg,#2a2a2a,#2a2a2a 8px,#333 8px,#333 16px);
  border: 3px solid var(--orange);
}
.profile-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 24px;
  margin-top: 14px;
  text-align: center;
}
.profile-sub { font-size: 14px; color: var(--muted); margin-top: 4px; text-align: center; }
.stats-strip {
  display: flex;
  margin: 0 20px 26px;
  background: var(--bg2);
  border-radius: 16px;
  padding: 16px 0;
}
.stats-strip-item {
  flex: 1;
  text-align: center;
}
.stats-strip-item + .stats-strip-item {
  border-left: 1px solid var(--border);
}
.stats-num {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 20px;
}
.stats-num.accent { color: var(--orange); }
.stats-lbl { font-size: 11px; color: var(--muted); margin-top: 3px; }
.profile-section { padding: 0 20px; margin-bottom: 26px; }
.profile-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 17px;
  margin-bottom: 12px;
}
.spots-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.spots-grid-item { cursor: pointer; }
.spots-grid-img {
  height: 110px;
  border-radius: 14px;
  background: repeating-linear-gradient(135deg,#1c1c1e,#1c1c1e 10px,#232326 10px,#232326 20px);
  position: relative;
  overflow: hidden;
}
.spots-grid-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 14px;
  margin-top: 7px;
}
.activity-item {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--bg2);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
}
.activity-thumb {
  width: 52px; height: 52px;
  border-radius: 10px;
  flex: none;
  background: repeating-linear-gradient(135deg,#1c1c1e,#1c1c1e 8px,#232326 8px,#232326 16px);
}
.activity-text { font-size: 14px; font-weight: 500; flex: 1; }
.activity-text span { color: var(--orange); }
.activity-time { font-family: 'Space Mono', monospace; font-size: 11px; color: var(--dim); margin-top: 3px; }

/* ─── SECTION LABEL ─── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  margin-bottom: 12px;
}
.section-more { font-size: 13px; color: var(--orange); cursor: pointer; }

/* ─── UTILS ─── */
.map-grid-lines { position: absolute; inset: 0; }
.btn-back {
  position: absolute;
  top: 60px; left: 16px;
  z-index: 10;
}
.btn-flag {
  position: absolute;
  top: 60px; right: 16px;
  z-index: 10;
}
