/* ============================================
   FIKER — Significa Amore
   Mobile-first PWA Stylesheet
   ============================================ */

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

/* --- CSS Variables --- */
:root {
  --purple: #7C3AED;
  --purple-light: #A78BFA;
  --purple-dark: #6D28D9;
  --purple-soft: #EDE9FE;
  --white: #FFFFFF;
  --off-white: #FAFAFE;
  --gray-light: #F3F4F6;
  --gray-border: #E5E7EB;
  --text-primary: #1F2937;
  --text-secondary: #6B7280;
  --text-light: #9CA3AF;
  --border: #E5E7EB;
  --success: #5CB85C;
  --shadow-sm: 0 1px 3px rgba(124,58,237,0.07);
  --shadow-md: 0 4px 12px rgba(124,58,237,0.1);
  --shadow-lg: 0 8px 30px rgba(124,58,237,0.13);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --nav-height: 64px;
  --bottom-nav-height: 72px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--off-white);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

input, button, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a { text-decoration: none; color: inherit; }

/* --- Screen Management --- */
.screen {
  display: none;
  min-height: 100dvh;
  width: 100%;
  position: relative;
}

.screen.active {
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.35s ease;
}

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

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

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

/* ============================================
   INSTALL SCREEN
   ============================================ */
#install-screen {
  background: var(--white);
}

.install-page {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.install-hero {
  position: relative;
  width: 100%;
  height: 70dvh;
  overflow: hidden;
}

.install-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.install-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 28px 32px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: white;
}

.install-hero-logo {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.install-hero-tagline {
  font-size: 1.1rem;
  opacity: 0.9;
  font-weight: 400;
}

.install-section {
  padding: 32px 28px;
}

.install-section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.install-section p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.install-photo {
  width: 100%;
  padding: 0 16px;
}

.install-photo img {
  width: 100%;
  border-radius: var(--radius-lg);
  object-fit: cover;
  max-height: 280px;
}

.install-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 16px;
}

.install-feature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.install-feature-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  background: var(--purple-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.install-feature strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.install-feature p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}

.install-cta {
  padding: 40px 28px 60px;
  text-align: center;
  background: linear-gradient(135deg, rgba(124,58,237,0.06), rgba(109,40,217,0.1));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.install-cta-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, #7C3AED, #6D28D9);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.install-cta h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.install-cta p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 300px;
  margin: 0 auto 24px;
}

/* ============================================
   ONBOARDING
   ============================================ */
#onboarding {
  background: var(--white);
  overflow: hidden;
}

.onboarding-carousel {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.onboarding-slides {
  flex: 1;
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.onboarding-slide {
  min-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  position: relative;
}

.onboarding-slide .slide-image {
  width: 100%;
  height: 55dvh;
  object-fit: cover;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.slide-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 28px;
  text-align: center;
}

.slide-content h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 10px;
}

.slide-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 280px;
}

.onboarding-footer {
  padding: 0 28px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-border);
  transition: all 0.3s ease;
}

.dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--purple);
}

.btn-primary {
  width: 100%;
  max-width: 320px;
  padding: 16px 32px;
  background: var(--purple);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
}

.btn-primary:active {
  transform: scale(0.97);
  background: var(--purple-dark);
}

.btn-secondary {
  padding: 12px 24px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ============================================
   REGISTRATION
   ============================================ */
#registration {
  background: var(--white);
}

.reg-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-back {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--purple-soft);
  color: var(--text-primary);
  transition: background 0.2s;
}

.btn-back:active { background: var(--gray-light); }

.reg-progress {
  flex: 1;
  height: 4px;
  background: var(--gray-light);
  border-radius: 2px;
  overflow: hidden;
}

.reg-progress-fill {
  height: 100%;
  background: var(--purple);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.reg-step-label {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 500;
  min-width: 40px;
  text-align: right;
}

.reg-body {
  flex: 1;
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
}

.reg-step {
  display: none;
  flex-direction: column;
  gap: 20px;
  animation: slideIn 0.3s ease;
}

.reg-step.active {
  display: flex;
  flex: 1;
}

.reg-step h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.reg-step .subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--gray-light);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: var(--text-primary);
  transition: all 0.2s ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--purple);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(124,58,237,0.1);
}

.form-input::placeholder {
  color: var(--text-light);
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group { flex: 1; }

/* Photo upload */
.photo-upload {
  width: 120px;
  height: 120px;
  margin: 8px auto;
  border-radius: 50%;
  background: var(--gray-light);
  border: 3px dashed var(--gray-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
  position: relative;
}

.photo-upload:active {
  border-color: var(--purple);
  background: var(--purple-soft);
}

.photo-upload svg {
  color: var(--text-light);
}

.photo-upload span {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
}

.photo-upload img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-upload input[type="file"] {
  display: none;
}

.skip-text {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* Choice chips */
.choice-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.choice-chip {
  padding: 12px 20px;
  border-radius: var(--radius-full);
  border: 2px solid var(--gray-border);
  background: var(--white);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.choice-chip.selected {
  border-color: var(--purple);
  background: rgba(124,58,237,0.08);
  color: var(--purple);
}

.choice-chip:active { transform: scale(0.96); }

/* Presentation textarea */
.presentation-textarea {
  width: 100%;
  min-height: 120px;
  padding: 16px;
  background: var(--gray-light);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  font-size: 1rem;
  color: var(--text-primary);
  resize: none;
  outline: none;
  line-height: 1.6;
  transition: all 0.2s ease;
}

.presentation-textarea:focus {
  border-color: var(--purple);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(124,58,237,0.1);
}

.char-count {
  text-align: right;
  font-size: 0.8rem;
  color: var(--text-light);
}

.prompt-question {
  background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(167,139,250,0.06));
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--purple-dark);
  font-weight: 500;
  border-left: 3px solid var(--purple);
}

.reg-footer {
  padding: 16px 28px calc(20px + var(--safe-bottom));
}

.reg-footer .btn-primary {
  max-width: 100%;
}

.btn-primary:disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ============================================
   APP SHELL (Home, Chat, Profile)
   ============================================ */
#app-home, #app-chats, #app-profile {
  background: var(--off-white);
  padding-bottom: var(--bottom-nav-height);
}

/* Top header — glassmorphism */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray-border);
}

.app-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: -0.02em;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.header-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--purple-soft);
  color: var(--text-secondary);
  transition: all 0.2s;
}

.header-btn:active { background: var(--gray-light); }

/* Filters panel */
.filters-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--white);
  border-bottom: 1px solid var(--gray-border);
}

.filters-panel.open {
  max-height: 400px;
}

.filters-content {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filter-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 8px;
}

.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--gray-border);
  background: var(--white);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.filter-chip.active {
  border-color: var(--purple);
  background: rgba(124,58,237,0.08);
  color: var(--purple);
}

.range-slider {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
}

.range-slider input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--gray-light);
  border-radius: 2px;
  outline: none;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.range-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--purple);
  min-width: 50px;
  text-align: right;
}

/* Person cards list */
.people-list {
  padding: 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.person-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid rgba(229,231,235,0.6);
}

.person-card:active {
  transform: scale(0.985);
  box-shadow: var(--shadow-md);
}

.person-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--purple-soft);
}

.person-avatar-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-light), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
  flex-shrink: 0;
}

.person-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
}

.person-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.person-details {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 2px;
}

.person-profile-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: var(--purple-soft);
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  align-self: center;
}

.person-profile-btn:active {
  background: rgba(124,58,237,0.2);
}

/* ============================================
   VIEW USER PROFILE
   ============================================ */
#view-profile {
  background: var(--white);
}

.vp-page {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.vp-photo-hero {
  position: relative;
  width: 100%;
  height: 65dvh;
  background: linear-gradient(135deg, var(--purple-light), var(--purple));
  overflow: hidden;
}

.vp-photo-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vp-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
}

.vp-back-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  z-index: 2;
}

.vp-photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 24px 24px;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
}

.vp-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
}

.vp-details {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.85);
}

.vp-body {
  padding: 24px 28px;
}

.vp-section {
  margin-bottom: 20px;
}

.vp-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.vp-bio {
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.6;
}

.vp-seeking-badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--purple);
  background: var(--purple-soft);
  padding: 8px 16px;
  border-radius: var(--radius-full);
}

/* City autocomplete */
.city-autocomplete {
  position: relative;
}

.city-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  max-height: 200px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}

.city-suggestions.open {
  display: block;
}

.city-suggestion {
  padding: 12px 16px;
  font-size: 0.95rem;
  color: var(--text-primary);
  cursor: pointer;
  border-bottom: 1px solid var(--gray-light);
}

.city-suggestion:active {
  background: var(--purple-soft);
}

/* ============================================
   BOTTOM NAVIGATION
   ============================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--gray-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: var(--safe-bottom);
  z-index: 200;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 16px;
  color: var(--text-light);
  transition: color 0.2s;
  position: relative;
}

.nav-item.active { color: var(--purple); }

.nav-item span {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav-badge {
  position: absolute;
  top: 4px;
  right: 10px;
  width: 8px;
  height: 8px;
  background: var(--purple);
  border-radius: 50%;
  border: 2px solid var(--white);
}

/* ============================================
   CHAT LIST
   ============================================ */
.chat-list {
  padding: 8px 16px;
}

.chat-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--gray-light);
  cursor: pointer;
  transition: background 0.15s;
}

.chat-item:active { background: var(--purple-soft); }

.chat-item:last-child { border-bottom: none; }

.chat-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--purple-light), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
}

.chat-preview {
  flex: 1;
  min-width: 0;
}

.chat-preview-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.chat-preview-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.chat-preview-time {
  font-size: 0.75rem;
  color: var(--text-light);
}

.chat-preview-msg {
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-unread {
  width: 20px;
  height: 20px;
  background: var(--purple);
  border-radius: 50%;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ============================================
   CHAT VIEW
   ============================================ */
#chat-view {
  background: var(--off-white);
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

.chat-header {
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--gray-border);
}

.chat-header-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-light), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
}

.chat-header-info {
  flex: 1;
}

.chat-header-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.chat-header-status {
  font-size: 0.75rem;
  color: var(--text-light);
}

.chat-header-actions {
  display: flex;
  gap: 4px;
  position: relative;
}

.chat-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  min-width: 180px;
  z-index: 100;
  overflow: hidden;
}

.chat-menu.open {
  display: block;
}

.chat-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  font-size: 0.9rem;
  color: var(--text-primary);
  background: none;
  border: none;
  text-align: left;
  transition: background 0.15s;
}

.chat-menu-item:active {
  background: var(--gray-light);
}

.chat-menu-danger {
  color: #EF4444;
}

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

.message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 0.92rem;
  line-height: 1.45;
  animation: slideUp 0.2s ease;
}

.message.sent {
  align-self: flex-end;
  background: var(--purple);
  color: white;
  border-bottom-right-radius: 6px;
}

.message.received {
  align-self: flex-start;
  background: var(--white);
  color: var(--text-primary);
  border-bottom-left-radius: 6px;
  box-shadow: var(--shadow-sm);
}

.message-time {
  font-size: 0.68rem;
  margin-top: 4px;
  opacity: 0.6;
}

.message.sent .message-time { text-align: right; }

.message-voice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.voice-play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.message.sent .voice-play-btn {
  background: rgba(255,255,255,0.2);
  color: white;
}

.message.received .voice-play-btn {
  background: var(--purple-soft);
  color: var(--purple);
}

.voice-waves {
  flex: 1;
  height: 24px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.voice-wave-bar {
  width: 3px;
  border-radius: 2px;
  transition: height 0.15s;
}

.message.sent .voice-wave-bar { background: rgba(255,255,255,0.5); }
.message.received .voice-wave-bar { background: var(--purple-light); }

.voice-duration {
  font-size: 0.72rem;
  opacity: 0.7;
  flex-shrink: 0;
}

/* Chat input */
.chat-input-bar {
  padding: 10px 12px calc(10px + var(--safe-bottom));
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--gray-border);
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.chat-input-actions {
  display: flex;
  gap: 4px;
}

.chat-action-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-light);
  transition: all 0.2s;
}

.chat-action-btn:active {
  background: var(--purple-soft);
  color: var(--purple);
}

.chat-action-btn.disabled {
  opacity: 0.3;
  pointer-events: none;
}

.chat-text-input {
  flex: 1;
  padding: 10px 16px;
  background: var(--gray-light);
  border: none;
  border-radius: 20px;
  font-size: 0.92rem;
  color: var(--text-primary);
  outline: none;
  max-height: 100px;
  resize: none;
  line-height: 1.4;
}

.chat-text-input::placeholder { color: var(--text-light); }

.chat-send-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--purple);
  color: white;
  transition: all 0.2s;
  flex-shrink: 0;
}

.chat-send-btn:active { transform: scale(0.9); background: var(--purple-dark); }

/* ============================================
   PROFILE
   ============================================ */
.profile-screen {
  padding: 0 20px 100px;
}

.profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 0 20px;
  gap: 12px;
}

.profile-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-light), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(124,58,237,0.25);
}

.profile-photo img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.profile-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.profile-details {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.profile-section {
  margin-top: 24px;
}

.profile-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.profile-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.profile-item {
  display: flex;
  align-items: center;
  padding: 16px;
  gap: 14px;
  border-bottom: 1px solid var(--gray-light);
  cursor: pointer;
  transition: background 0.15s;
}

.profile-item:last-child { border-bottom: none; }
.profile-item:active { background: var(--purple-soft); }

.profile-item-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--purple-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple);
}

.profile-item-content {
  flex: 1;
}

.profile-item-label {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-primary);
}

.profile-item-value {
  font-size: 0.8rem;
  color: var(--text-light);
}

.profile-item-arrow {
  color: var(--text-light);
}

.profile-bio-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.profile-bio-question {
  font-size: 0.82rem;
  color: var(--purple);
  font-weight: 500;
  margin-bottom: 6px;
}

.profile-bio-answer {
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.5;
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--purple-dark);
  color: white;
  padding: 14px 24px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 500;
  z-index: 9999;
  box-shadow: var(--shadow-lg);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 28px;
  text-align: center;
}

.empty-state svg {
  color: var(--purple-soft);
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (min-width: 500px) {
  body {
    max-width: 430px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
    min-height: 100vh;
  }
  .bottom-nav {
    max-width: 430px;
    left: 50%;
    transform: translateX(-50%);
  }
  .toast {
    max-width: 430px;
  }
}
