/* ═══════════════════════════════════════════════════════════
   CRUISER+ MOBILE APP — DESIGN SYSTEM
   Dark mode · Purple/Magenta/Blue palette · Neumorphic UI
═══════════════════════════════════════════════════════════ */

:root {
  --purple: #7c3aed;
  --purple-light: #a78bfa;
  --purple-dark: #4c1d95;
  --blue: #3b82f6;
  --blue-electric: #06b6d4;
  --magenta: #ec4899;
  --magenta-dark: #be185d;
  --gold: #f59e0b;
  --bg: #0a0a0f;
  --bg2: #111118;
  --bg3: #16161f;
  --bg4: #1c1c28;
  --surface: #1e1e2e;
  --surface2: #252535;
  --border: rgba(124, 58, 237, 0.2);
  --border2: rgba(255,255,255,0.06);
  --text: #f1f0f7;
  --text2: #a09fb8;
  --text3: #6b6a80;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --grad1: linear-gradient(135deg, #7c3aed, #ec4899);
  --grad2: linear-gradient(135deg, #3b82f6, #7c3aed);
  --grad3: linear-gradient(135deg, #ec4899, #f59e0b);
  --grad-dark: linear-gradient(180deg, #0a0a0f 0%, #111118 100%);
  --shadow: 0 4px 24px rgba(124,58,237,0.15);
  --shadow-card: 0 8px 32px rgba(0,0,0,0.4);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  height: 100%;
  width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

#app {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  max-width: 430px;
  margin: 0 auto;
  overflow: hidden;
}

/* ── Scrollable Content ──────────────────────────────────── */
.scroll-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.scroll-area::-webkit-scrollbar { display: none; }

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; }
.text-gradient {
  background: var(--grad1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ══════════════════════════════════════════════════════════
   SPLASH SCREEN
══════════════════════════════════════════════════════════ */
#splash {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease;
}
#splash.hidden { opacity: 0; pointer-events: none; }

.splash-logo {
  width: 90px;
  height: 90px;
  background: var(--grad1);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  box-shadow: 0 0 60px rgba(124,58,237,0.5), 0 0 120px rgba(236,72,153,0.3);
  animation: splashPulse 1.5s ease-in-out infinite;
  margin-bottom: 24px;
}
@keyframes splashPulse {
  0%,100% { transform: scale(1); box-shadow: 0 0 60px rgba(124,58,237,0.5); }
  50% { transform: scale(1.05); box-shadow: 0 0 80px rgba(236,72,153,0.7); }
}
.splash-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 36px;
  font-weight: 700;
  background: var(--grad1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}
.splash-sub { color: var(--text2); font-size: 14px; }
.splash-loader {
  margin-top: 40px;
  width: 120px;
  height: 3px;
  background: var(--surface);
  border-radius: 2px;
  overflow: hidden;
}
.splash-loader-bar {
  height: 100%;
  background: var(--grad1);
  border-radius: 2px;
  animation: loaderFill 1.8s ease forwards;
}
@keyframes loaderFill { from { width: 0 } to { width: 100% } }

/* ══════════════════════════════════════════════════════════
   AUTH SCREENS
══════════════════════════════════════════════════════════ */
.auth-screen {
  min-height: 100%;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow-y: auto;
}
.auth-hero {
  position: relative;
  height: 260px;
  background: var(--grad1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.auth-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='50' r='40' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='1'/%3E%3C/svg%3E") repeat;
  background-size: 60px;
}
.auth-hero-logo { font-size: 56px; margin-bottom: 12px; filter: drop-shadow(0 4px 20px rgba(0,0,0,0.3)); }
.auth-hero-title { font-family: 'Space Grotesk', sans-serif; font-size: 32px; font-weight: 700; color: #fff; }
.auth-hero-sub { color: rgba(255,255,255,0.8); font-size: 14px; margin-top: 4px; }

.auth-body {
  flex: 1;
  background: var(--bg);
  border-radius: 28px 28px 0 0;
  margin-top: -28px;
  padding: 32px 24px 40px;
}
.auth-title { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.auth-subtitle { color: var(--text2); font-size: 14px; margin-bottom: 28px; }

.form-group { margin-bottom: 18px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; display: block; }
.form-input {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(124,58,237,0.2); }
.form-input::placeholder { color: var(--text3); }

.input-wrapper { position: relative; }
.input-wrapper .form-input { padding-right: 44px; }
.input-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  cursor: pointer;
  font-size: 16px;
  transition: color 0.2s;
}
.input-icon:hover { color: var(--purple-light); }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--grad1);
  color: #fff;
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
}
.btn-primary:active { transform: scale(0.97); }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border2);
}
.btn-outline {
  background: transparent;
  color: var(--purple-light);
  border: 1.5px solid var(--purple);
}

.btn-ripple::after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: rippleAnim 0.6s ease-out;
}
@keyframes rippleAnim {
  to { width: 300px; height: 300px; opacity: 0; }
}

.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border2); }
.divider span { color: var(--text3); font-size: 12px; }

.auth-link { text-align: center; margin-top: 20px; color: var(--text2); font-size: 14px; }
.auth-link a { color: var(--purple-light); font-weight: 600; text-decoration: none; }

/* ══════════════════════════════════════════════════════════
   APP SHELL
══════════════════════════════════════════════════════════ */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg);
}

/* ── Top Bar ─────────────────────────────────────────────── */
.top-bar {
  background: var(--bg);
  padding: 12px 20px;
  padding-top: calc(12px + var(--safe-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border2);
  z-index: 10;
  flex-shrink: 0;
}
.top-bar-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  background: var(--grad1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.top-bar-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface);
  border: none;
  color: var(--text);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.icon-btn:active { transform: scale(0.93); background: var(--surface2); }
.badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  background: var(--magenta);
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
  color: #fff;
}

/* ── Bottom Nav ──────────────────────────────────────────── */
.bottom-nav {
  background: var(--bg2);
  border-top: 1px solid var(--border2);
  padding: 8px 0;
  padding-bottom: calc(8px + var(--safe-bottom));
  display: flex;
  align-items: center;
  z-index: 10;
  flex-shrink: 0;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: transparent;
  color: var(--text3);
}
.nav-item.active { color: var(--purple-light); }
.nav-item .nav-icon { font-size: 20px; transition: transform 0.2s; }
.nav-item.active .nav-icon { transform: scale(1.1); }
.nav-item .nav-label { font-size: 10px; font-weight: 500; }

.nav-item.checkin-btn {
  position: relative;
  top: -16px;
}
.nav-item.checkin-btn .nav-icon-wrap {
  width: 56px;
  height: 56px;
  background: var(--grad1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 20px rgba(124,58,237,0.5);
  transition: all 0.2s;
  border: 3px solid var(--bg2);
  color: #fff;
}
.nav-item.checkin-btn.active .nav-icon-wrap,
.nav-item.checkin-btn:active .nav-icon-wrap {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(236,72,153,0.6);
}

/* ══════════════════════════════════════════════════════════
   HOME / NEARBY
══════════════════════════════════════════════════════════ */
.page { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.filter-bar {
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  flex-shrink: 0;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid var(--border2);
  background: var(--surface);
  color: var(--text2);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.filter-chip.active {
  background: var(--grad1);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 12px rgba(124,58,237,0.3);
}

.users-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 4px 16px 16px;
}

.user-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border2);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.user-card:active { transform: scale(0.97); }
.user-card-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
}
.user-card-body { padding: 10px; }
.user-card-name { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.user-card-info { font-size: 11px; color: var(--text2); display: flex; align-items: center; gap: 4px; }
.user-card-dist { color: var(--purple-light); font-weight: 600; }

.user-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
}
.badge-ilimitado { background: var(--grad1); color: #fff; }
.badge-cruiser { background: rgba(124,58,237,0.85); color: #fff; }
.badge-voyeur { background: rgba(255,255,255,0.15); color: #fff; }

.online-dot {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 10px;
  height: 10px;
  background: var(--success);
  border-radius: 50%;
  border: 2px solid var(--surface);
}

/* Profile Card Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

.profile-modal {
  width: 100%;
  max-height: 90vh;
  background: var(--bg2);
  border-radius: 28px 28px 0 0;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(100%) } to { transform: translateY(0) } }

.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--border2);
  border-radius: 2px;
  margin: 12px auto 0;
}
.profile-modal-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}
.profile-modal-body { padding: 20px; }
.profile-modal-name { font-size: 26px; font-weight: 700; font-family: 'Space Grotesk', sans-serif; }
.profile-modal-info { color: var(--text2); font-size: 14px; margin-top: 4px; }
.profile-modal-bio { color: var(--text2); font-size: 14px; line-height: 1.5; margin: 14px 0; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.profile-tag {
  padding: 4px 12px;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 20px;
  font-size: 12px;
  color: var(--purple-light);
}
.profile-actions { display: flex; gap: 10px; }
.btn-chat { flex: 1; background: var(--grad1); color: #fff; }
.btn-wave { width: 48px; height: 48px; flex-shrink: 0; background: var(--surface); color: var(--text); border-radius: 12px; border: none; font-size: 20px; display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* ══════════════════════════════════════════════════════════
   CHECK-IN PAGE
══════════════════════════════════════════════════════════ */
.checkin-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 24px;
  gap: 24px;
  overflow-y: auto;
}

.checkin-map-preview {
  width: 100%;
  height: 220px;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
}
.checkin-map-preview iframe { width: 100%; height: 100%; border: none; filter: invert(1) hue-rotate(200deg) saturate(0.7); }

.checkin-info-card {
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border2);
}
.checkin-info-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.checkin-info-row:last-child { margin-bottom: 0; }
.checkin-info-icon {
  width: 40px;
  height: 40px;
  background: rgba(124,58,237,0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--purple-light);
  flex-shrink: 0;
}
.checkin-info-label { font-size: 11px; color: var(--text3); }
.checkin-info-value { font-size: 14px; font-weight: 600; }

.checkin-btn-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.checkin-big-btn {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--grad1);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: #fff;
  box-shadow: 0 0 40px rgba(124,58,237,0.5);
  transition: all 0.3s;
}
.checkin-big-btn:active { transform: scale(0.95); }
.checkin-big-btn.active {
  background: var(--grad3);
  box-shadow: 0 0 60px rgba(236,72,153,0.6);
  animation: checkinPulse 1.5s infinite;
}
@keyframes checkinPulse {
  0%,100% { box-shadow: 0 0 40px rgba(236,72,153,0.4); }
  50% { box-shadow: 0 0 80px rgba(236,72,153,0.8), 0 0 120px rgba(124,58,237,0.4); }
}

.ripple-rings {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}
.ripple-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(124,58,237,0.4);
  animation: rippleRing 2s ease-out infinite;
}
.ripple-ring:nth-child(1) { inset: -20px; animation-delay: 0s; }
.ripple-ring:nth-child(2) { inset: -40px; animation-delay: 0.5s; }
.ripple-ring:nth-child(3) { inset: -60px; animation-delay: 1s; }
@keyframes rippleRing {
  0% { opacity: 0.6; transform: scale(0.8); }
  100% { opacity: 0; transform: scale(1.3); }
}

.checkin-status {
  text-align: center;
  font-size: 15px;
  color: var(--text2);
}
.checkin-status.active { color: var(--success); }

.nearby-quick { width: 100%; }
.nearby-quick-title { font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.nearby-avatars { display: flex; gap: -8px; }
.nearby-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  margin-left: -8px;
  object-fit: cover;
}
.nearby-avatar:first-child { margin-left: 0; }
.nearby-count {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface2);
  border: 2px solid var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--purple-light);
  margin-left: -8px;
}

/* ══════════════════════════════════════════════════════════
   CHAT / MESSAGES
══════════════════════════════════════════════════════════ */
.conversations-list { padding: 12px 16px; }
.conversation-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border2);
  cursor: pointer;
  transition: all 0.15s;
}
.conversation-item:last-child { border-bottom: none; }
.conversation-item:active { opacity: 0.7; }

.conv-avatar {
  position: relative;
  flex-shrink: 0;
}
.conv-avatar img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border2);
}
.conv-online {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  background: var(--success);
  border-radius: 50%;
  border: 2px solid var(--bg);
}

.conv-body { flex: 1; min-width: 0; }
.conv-name { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.conv-last { font-size: 13px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-last.unread { color: var(--text); font-weight: 500; }

.conv-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.conv-time { font-size: 11px; color: var(--text3); }
.conv-unread {
  min-width: 20px;
  height: 20px;
  background: var(--grad1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  padding: 0 5px;
}

/* Chat Room */
.chat-room {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 50;
  display: flex;
  flex-direction: column;
  max-width: 430px;
  margin: 0 auto;
  animation: slideInRight 0.25s ease;
}
@keyframes slideInRight { from { transform: translateX(100%) } to { transform: translateX(0) } }

.chat-header {
  background: var(--bg2);
  padding: 12px 16px;
  padding-top: calc(12px + var(--safe-top));
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border2);
}
.chat-back { font-size: 20px; color: var(--text); background: none; border: none; cursor: pointer; padding: 4px; }
.chat-header-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--purple); }
.chat-header-info { flex: 1; }
.chat-header-name { font-size: 15px; font-weight: 600; }
.chat-header-status { font-size: 12px; color: var(--success); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-messages::-webkit-scrollbar { display: none; }

.chat-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  animation: bubbleIn 0.2s ease;
}
@keyframes bubbleIn { from { opacity: 0; transform: scale(0.9) } to { opacity: 1; transform: scale(1) } }
.bubble-received {
  background: var(--surface);
  color: var(--text);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.bubble-sent {
  background: var(--grad1);
  color: #fff;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}
.bubble-time { font-size: 10px; color: rgba(255,255,255,0.6); margin-top: 3px; text-align: right; }
.bubble-time.received { color: var(--text3); text-align: left; }

.chat-input-bar {
  padding: 10px 16px;
  padding-bottom: calc(10px + var(--safe-bottom));
  background: var(--bg2);
  border-top: 1px solid var(--border2);
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-input {
  flex: 1;
  background: var(--surface);
  border: 1.5px solid var(--border2);
  border-radius: 22px;
  padding: 10px 16px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.chat-input:focus { border-color: var(--purple); }
.chat-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--grad1);
  border: none;
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}
.chat-send-btn:active { transform: scale(0.9); }

/* ══════════════════════════════════════════════════════════
   HEAT MAP
══════════════════════════════════════════════════════════ */
.heatmap-page { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.heatmap-legend {
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text2); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }

.heatmap-container {
  flex: 1;
  position: relative;
  background: var(--surface);
  overflow: hidden;
}

.heatmap-svg {
  width: 100%;
  height: 100%;
  background: #0f1621;
}

.heat-spot {
  cursor: pointer;
  transition: all 0.2s;
}
.heat-spot:hover { opacity: 0.9; }

.heatmap-stats {
  padding: 12px 16px;
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}
.heatmap-stat {
  flex: 1;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  border: 1px solid var(--border2);
}
.heatmap-stat-val { font-size: 20px; font-weight: 700; font-family: 'Space Grotesk', sans-serif; background: var(--grad1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.heatmap-stat-label { font-size: 11px; color: var(--text3); margin-top: 2px; }

/* ══════════════════════════════════════════════════════════
   PROFILE PAGE
══════════════════════════════════════════════════════════ */
.profile-page { flex: 1; overflow-y: auto; }
.profile-header {
  position: relative;
  height: 280px;
}
.profile-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, var(--bg) 100%);
}
.profile-avatar-wrap {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
}
.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 4px solid var(--bg);
  object-fit: cover;
  display: block;
}
.profile-avatar-edit {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  background: var(--grad1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
  border: 2px solid var(--bg);
  cursor: pointer;
}

.profile-info { margin-top: 52px; text-align: center; padding: 0 24px 20px; }
.profile-name { font-size: 24px; font-weight: 700; font-family: 'Space Grotesk', sans-serif; }
.profile-handle { color: var(--text2); font-size: 14px; margin-top: 4px; }
.profile-plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  background: var(--grad1);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  margin-top: 10px;
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 16px 0;
  border-top: 1px solid var(--border2);
  border-bottom: 1px solid var(--border2);
  margin: 0 16px 20px;
}
.profile-stat { text-align: center; }
.profile-stat-val { font-size: 22px; font-weight: 700; font-family: 'Space Grotesk', sans-serif; }
.profile-stat-label { font-size: 11px; color: var(--text3); margin-top: 2px; }

.profile-section { padding: 0 20px 20px; }
.profile-section-title { font-size: 13px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }

.profile-edit-btn {
  margin: 0 20px 20px;
  background: var(--surface);
  border: 1.5px solid var(--border2);
}

/* ══════════════════════════════════════════════════════════
   SUBSCRIPTIONS
══════════════════════════════════════════════════════════ */
.plans-page { flex: 1; overflow-y: auto; padding: 20px 16px; }
.plans-header { text-align: center; margin-bottom: 28px; }
.plans-header h2 { font-size: 26px; font-weight: 700; font-family: 'Space Grotesk', sans-serif; }
.plans-header p { color: var(--text2); font-size: 14px; margin-top: 6px; }

.plan-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  border: 2px solid var(--border2);
  position: relative;
  transition: all 0.2s;
  cursor: pointer;
}
.plan-card.popular {
  border-color: var(--purple);
  box-shadow: 0 0 30px rgba(124,58,237,0.2);
}
.plan-card.selected {
  border-color: var(--magenta);
  box-shadow: 0 0 30px rgba(236,72,153,0.3);
}
.plan-popular-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--grad1);
  padding: 4px 16px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.plan-name { font-size: 20px; font-weight: 700; font-family: 'Space Grotesk', sans-serif; margin-bottom: 4px; }
.plan-price { font-size: 32px; font-weight: 800; font-family: 'Space Grotesk', sans-serif; }
.plan-price-period { font-size: 14px; color: var(--text2); font-weight: 400; }
.plan-features { margin: 16px 0 0; display: flex; flex-direction: column; gap: 10px; }
.plan-feature { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.plan-feature i { color: var(--success); font-size: 14px; }

.plan-select-btn {
  margin-top: 20px;
}

/* ══════════════════════════════════════════════════════════
   ANIMATIONS & UTILITIES
══════════════════════════════════════════════════════════ */
.fade-in { animation: fadeInUp 0.3s ease forwards; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s infinite;
  border-radius: var(--radius-xs);
}
@keyframes skeleton { to { background-position: -200% 0 } }

.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface2);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 500;
  z-index: 200;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border2);
  white-space: nowrap;
  animation: toastAnim 2.5s forwards;
}
@keyframes toastAnim {
  0% { opacity: 0; transform: translateX(-50%) translateY(10px) }
  15% { opacity: 1; transform: translateX(-50%) translateY(0) }
  70% { opacity: 1 }
  100% { opacity: 0 }
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
}
.section-title { font-size: 16px; font-weight: 700; font-family: 'Space Grotesk', sans-serif; }
.section-link { font-size: 12px; color: var(--purple-light); font-weight: 600; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text2);
}
.empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-text { font-size: 14px; }

/* Success animation */
.success-check {
  width: 64px;
  height: 64px;
  background: rgba(16,185,129,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 28px;
  color: var(--success);
  animation: successPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes successPop {
  0% { transform: scale(0) }
  100% { transform: scale(1) }
}
