:root {
  --violet: #5B21B6;
  --violet-deep: #3B0F82;
  --violet-light: #F1EBFA;
  --violet-bg: #EEE6FA;
  --text: #0A0A0A;
  --text-muted: #55555F;
  --text-faint: #77778A;
  --border: #EEEDF2;
  --surface: #F6F5F9;
  --white: #fff;
  --danger: #B42318;
  --success: #1A8F52;
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-full: 999px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DM Sans', sans-serif; color: var(--text); background: var(--white); -webkit-font-smoothing: antialiased; }
a { color: var(--violet); text-decoration: none; }
a:hover { color: var(--violet-deep); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: inherit; font-size: 15px; font-weight: 700; border: none; cursor: pointer; transition: opacity .15s, transform .1s; border-radius: var(--radius-full); padding: 0 24px; height: 52px; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--violet); color: #fff; }
.btn-primary:hover { background: var(--violet-deep); }
.btn-secondary { background: var(--violet-light); color: var(--violet-deep); }
.btn-ghost { background: var(--surface); color: var(--text); }
.btn-danger { background: #FEE2E2; color: var(--danger); }
.btn-full { width: 100%; }
.btn-lg { height: 58px; font-size: 17px; }

/* Inputs */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-muted); letter-spacing: .03em; }
.input { width: 100%; height: 56px; border-radius: var(--radius-md); border: 1.5px solid var(--border); background: var(--white); padding: 0 18px; font-family: inherit; font-size: 16px; color: var(--text); outline: none; transition: border-color .15s; }
.input:focus { border-color: var(--violet); }
.input.error { border-color: var(--danger); }
.input-hint { font-size: 12px; color: var(--text-faint); }
.input-error { font-size: 12px; color: var(--danger); }

/* Phone input with country code */
.phone-row { display: flex; gap: 10px; }
.phone-row .country-select { width: 120px; flex: none; }
.phone-row .phone-input { flex: 1; }

/* OTP boxes */
.otp-row { display: flex; gap: 10px; }
.otp-box { flex: 1; height: 68px; border-radius: var(--radius-md); border: 1.5px solid var(--border); background: var(--surface); text-align: center; font-family: inherit; font-size: 28px; font-weight: 700; color: var(--text); outline: none; transition: border-color .15s; }
.otp-box:focus { border-color: var(--violet); background: var(--white); }
.otp-box.filled { border-color: var(--violet); background: var(--violet-light); }

/* Auth card */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(to bottom, var(--violet-bg) 0%, var(--white) 50%); padding: 24px; }
.auth-card { width: 100%; max-width: 480px; background: var(--white); border-radius: var(--radius-lg); padding: 40px; box-shadow: 0 0 0 1px rgba(10,10,10,.06), 0 20px 50px rgba(91,33,182,.12); display: flex; flex-direction: column; gap: 24px; }
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(to bottom, var(--violet-bg) 0%, var(--white) 50%); padding: 24px 16px; }
.auth-logo { font-size: 22px; font-weight: 700; letter-spacing: -.8px; text-align: center; }
.auth-heading { text-align: center; display: flex; flex-direction: column; gap: 8px; }
.auth-heading h1 { font-size: 32px; font-weight: 700; letter-spacing: -1.2px; line-height: 1; }
.auth-heading p { font-size: 15px; color: var(--text-muted); }
.auth-divider { text-align: center; font-size: 13px; color: var(--text-faint); }
.auth-footer { text-align: center; font-size: 13px; color: var(--text-faint); }
.auth-footer a { font-weight: 600; }

/* Nav */
.nav { height: 72px; padding: 0 40px; display: flex; align-items: center; gap: 40px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--white); z-index: 100; }
.nav-logo { font-size: 22px; font-weight: 700; letter-spacing: -.8px; flex: 1; color: var(--text); }
.nav-links { display: flex; gap: 32px; font-size: 15px; font-weight: 500; }
.nav-links a { color: var(--text-muted); padding: 4px 0; }
.nav-links a.active { color: var(--text); font-weight: 700; border-bottom: 2px solid var(--violet); }
.nav-actions { display: flex; gap: 12px; align-items: center; }
.nav-hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.mobile-nav { display: none; position: fixed; inset: 0; background: var(--white); z-index: 200; flex-direction: column; padding: 24px; gap: 16px; }
.mobile-nav.open { display: flex; }
.mobile-nav-close { align-self: flex-end; background: var(--surface); border: none; border-radius: var(--radius-full); width: 40px; height: 40px; cursor: pointer; font-size: 20px; }
.mobile-nav a { font-size: 22px; font-weight: 700; color: var(--text); padding: 12px 0; border-bottom: 1px solid var(--border); }

/* Feed */
.feed-wrap { max-width: 1200px; margin: 0 auto; padding: 28px 32px 80px; display: flex; gap: 24px; align-items: flex-start; }
.feed-sidebar { width: 180px; flex: none; display: flex; flex-direction: column; gap: 10px; position: sticky; top: 88px; }
.feed-sidebar-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.feed-grid { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: var(--radius-full); font-size: 14px; font-weight: 500; cursor: pointer; transition: background .15s, color .15s; border: none; font-family: inherit; white-space: nowrap; }
.pill-active { background: var(--violet); color: #fff; }
.pill-default { background: var(--surface); color: var(--text); }
.pill-tonight { background: #E3F6EB; color: #116B3C; }
.pill-tonight.active { background: var(--success); color: #fff; }

/* Activity card */
.activity-card { position: relative; aspect-ratio: 4/5; border-radius: 24px; overflow: hidden; cursor: pointer; display: block; }
.activity-card-bg { position: absolute; inset: 0; object-fit: cover; width: 100%; height: 100%; }
.activity-card-gradient { position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,10,10,.85), rgba(10,10,10,0) 60%); }
.activity-card-emoji { position: absolute; top: 14px; left: 14px; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.92); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.activity-card-bookmark { position: absolute; top: 14px; right: 14px; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.92); display: flex; align-items: center; justify-content: center; border: none; cursor: pointer; }
.activity-card-body { position: absolute; left: 18px; right: 18px; bottom: 18px; color: #fff; display: flex; flex-direction: column; gap: 6px; }
.activity-card-title { font-size: 22px; font-weight: 700; letter-spacing: -.8px; line-height: 1.05; }
.activity-card-meta { font-size: 13px; opacity: .8; }
.activity-card-badge { position: absolute; top: 14px; left: 62px; background: var(--violet); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-full); }

/* Profile */
.profile-wrap { max-width: 1280px; margin: 0 auto; padding: 40px; display: flex; gap: 32px; align-items: flex-start; }
.profile-sidebar { width: 380px; flex: none; display: flex; flex-direction: column; gap: 20px; }
.profile-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.profile-card { padding: 28px; border-radius: var(--radius-lg); background: var(--surface); display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.profile-avatar { width: 112px; height: 112px; border-radius: 50%; overflow: hidden; position: relative; background: var(--violet-light); display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 700; color: var(--violet); }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-size: 30px; font-weight: 700; letter-spacing: -1.2px; display: flex; align-items: center; gap: 8px; }
.verified-badge { width: 24px; height: 24px; border-radius: 50%; background: var(--violet); display: inline-flex; align-items: center; justify-content: center; }
.profile-location { font-size: 15px; color: var(--text-muted); }
.stat-box { padding: 14px 16px; border-radius: var(--radius-md); background: var(--white); display: flex; flex-direction: column; gap: 4px; }
.stat-value { font-size: 22px; font-weight: 700; letter-spacing: -.6px; }
.stat-label { font-size: 12px; color: var(--text-muted); }
.passport-stamp { flex: 1; padding: 16px 8px; border-radius: 20px; background: var(--white); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.kudos-tag { padding: 10px 16px; border-radius: var(--radius-full); font-size: 14px; font-weight: 500; }
.menu-item { display: flex; align-items: center; height: 56px; border-bottom: 1px solid var(--border); font-size: 16px; font-weight: 500; cursor: pointer; }
.menu-item:hover { color: var(--violet); }
.menu-item-label { flex: 1; }
.menu-item-danger { color: var(--danger); }

/* Matches/chat */
.matches-wrap { max-width: 1280px; margin: 0 auto; display: flex; height: calc(100vh - 72px); }
.matches-list { width: 380px; flex: none; border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; }
.matches-list-header { padding: 24px 20px 16px; font-size: 28px; font-weight: 700; letter-spacing: -1.1px; flex: none; }
.matches-list-scroll { flex: 1; overflow-y: auto; padding: 0 8px 16px; display: flex; flex-direction: column; gap: 4px; }
.match-item { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 20px; cursor: pointer; transition: background .15s; }
.match-item:hover { background: var(--surface); }
.match-item.active { background: var(--violet); color: #fff; }
.match-avatar { position: relative; width: 52px; height: 52px; flex: none; border-radius: 50%; overflow: hidden; background: var(--violet-light); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; color: var(--violet); }
.match-avatar img { width: 100%; height: 100%; object-fit: cover; }
.match-emoji-badge { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.match-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.match-name-row { display: flex; gap: 8px; }
.match-name { flex: 1; font-size: 16px; font-weight: 700; }
.match-time { font-size: 12px; opacity: .75; }
.match-preview { font-size: 14px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-header { height: 76px; flex: none; padding: 0 28px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--border); }
.chat-body { flex: 1; padding: 24px 28px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; background: #FBFAFD; }
.chat-bubble { max-width: 480px; padding: 14px 18px; border-radius: 22px; font-size: 15px; line-height: 1.45; }
.chat-bubble-in { background: var(--white); box-shadow: 0 0 0 1px var(--border); border-bottom-left-radius: 6px; align-self: flex-start; }
.chat-bubble-out { background: var(--violet); color: #fff; border-bottom-right-radius: 6px; align-self: flex-end; }
.plan-card { background: var(--white); border-radius: 24px; box-shadow: 0 0 0 1px #E4DAF5, 0 12px 30px rgba(91,33,182,.1); overflow: hidden; align-self: center; width: 420px; max-width: 100%; }
.plan-card-map { height: 110px; background: var(--violet-light); position: relative; overflow: hidden; }
.plan-card-body { padding: 18px 20px; display: flex; align-items: center; gap: 14px; }
.plan-card-label { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--violet); }
.plan-card-venue { font-size: 18px; font-weight: 700; letter-spacing: -.5px; }
.plan-card-meta { font-size: 14px; color: var(--text-muted); }
.chat-footer { height: 88px; flex: none; padding: 0 28px; display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--border); }
.chat-input { flex: 1; height: 52px; border-radius: var(--radius-full); background: var(--surface); border: none; padding: 0 22px; font-family: inherit; font-size: 15px; color: var(--text-faint); outline: none; }
.chat-send { width: 52px; height: 52px; border-radius: 50%; background: var(--violet); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; flex: none; }

/* Verify ID page */
.verify-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(to bottom, var(--violet-bg), var(--white) 50%); padding: 24px; }
.verify-card { width: 100%; max-width: 520px; background: var(--white); border-radius: var(--radius-lg); padding: 48px 40px; box-shadow: 0 0 0 1px rgba(10,10,10,.06), 0 20px 50px rgba(91,33,182,.12); display: flex; flex-direction: column; align-items: center; gap: 28px; text-align: center; }
.verify-icon { width: 80px; height: 80px; border-radius: 22px; background: var(--violet-light); display: flex; align-items: center; justify-content: center; font-size: 38px; }
.verify-steps { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.verify-step { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius-md); background: var(--surface); text-align: left; }
.verify-step-num { width: 32px; height: 32px; border-radius: 50%; background: var(--violet); color: #fff; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.verify-step-text { font-size: 15px; font-weight: 500; }

/* Alert */
.alert { padding: 14px 18px; border-radius: var(--radius-md); font-size: 14px; font-weight: 500; }
.alert-error { background: #FEE2E2; color: var(--danger); }
.alert-success { background: #DCFCE7; color: #166534; }
.alert-info { background: var(--violet-light); color: var(--violet-deep); }

/* Spinner */
.spinner { width: 22px; height: 22px; border: 2.5px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.spinner-violet { border-color: var(--violet-light); border-top-color: var(--violet); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 900px) {
  .nav { padding: 0 20px; }
  .nav-links, .nav-actions { display: none; }
  .nav-hamburger { display: block; }
  .feed-wrap { padding: 20px 16px 80px; flex-direction: column; }
  .feed-sidebar { width: 100%; position: static; flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .feed-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .profile-wrap { padding: 20px 16px; flex-direction: column; }
  .profile-sidebar { width: 100%; }
  .matches-wrap { flex-direction: column; height: auto; }
  .matches-list { width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--border); max-height: 320px; }
  .chat-wrap { min-height: 500px; }
  .plan-card { width: 100%; }
  .auth-card { padding: 28px 20px; }
}
@media (max-width: 480px) {
  .feed-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .activity-card-title { font-size: 17px; }
  .nav { height: 60px; }
  .auth-heading h1 { font-size: 26px; }
}
