/* ================================================
   VLAM WEB APP — STYLESHEET
   Dark theme · DM Sans · Orange accent (#f97316)
   ================================================ */

/* ---- Reset & Variables ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #242734;
  --surface3: #2e3142;
  --border: #2e3142;
  --text: #e4e6f0;
  --text-dim: #8b8fa3;
  --text-muted: #555a6e;
  --accent: #f97316;
  --accent-hover: #fb923c;
  --accent-dim: rgba(249, 115, 22, 0.15);
  --danger: #ef4444;
  --success: #22c55e;
  --warn: #eab308;
  --radius: 16px;
  --radius-sm: 10px;
  --nav-h: 68px;
  --top-h: 56px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* Allow scrolling for LP */
}

/* ---- App Shell ---- */
#app {
  width: 100%;
  /* max-width controlled by container or media queries */
  height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

#screen-container {
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* ---- Bottom Nav ---- */
#bottom-nav {
  height: var(--nav-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: none;
  align-items: stretch;
  flex-shrink: 0;
  padding: 0 4px;
  padding-bottom: env(safe-area-inset-bottom);
}

#bottom-nav.visible {
  display: flex;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  transition: color 0.2s;
  position: relative;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.nav-item.active {
  color: var(--accent);
}

.nav-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 18px);
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: 99px;
  padding: 1px 5px;
  min-width: 16px;
  text-align: center;
  line-height: 14px;
}

/* ---- Scrollable Screen ---- */
.screen {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* ---- Top Bar ---- */
.top-bar {
  height: var(--top-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

.top-bar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 3px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface2);
  border: none;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.icon-btn:hover {
  background: var(--surface3);
  color: var(--text);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* ---- Buttons ---- */
.btn-accent {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 24px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-accent:hover {
  background: var(--accent-hover);
}

.btn-accent:active {
  transform: scale(0.97);
}

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 24px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-ghost:hover {
  background: var(--surface2);
}

.btn-danger {
  background: var(--danger);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-full {
  width: 100%;
}

/* ---- Login Screen ---- */
.login-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: radial-gradient(ellipse at 50% 30%, rgba(249, 115, 22, 0.12) 0%, transparent 70%);
}

.login-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
}

.login-flame {
  font-size: 64px;
  animation: flicker 2s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 20px rgba(249, 115, 22, 0.6));
}

@keyframes flicker {
  0% {
    transform: scale(1) rotate(-2deg);
  }

  100% {
    transform: scale(1.06) rotate(2deg);
  }
}

.login-brand {
  font-size: 48px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 6px;
}

.login-tagline {
  font-size: 16px;
  color: var(--text-dim);
  font-weight: 400;
  letter-spacing: 0.5px;
}

.login-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 32px 24px;
  width: 100%;
  border: 1px solid var(--border);
}

.login-card h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.login-card p {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 24px;
  line-height: 1.5;
}

.google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: white;
  color: #1f1f1f;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  font-family: inherit;
}

.google-btn:hover {
  background: #f5f5f5;
}

.google-btn:active {
  transform: scale(0.98);
}

.google-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ---- Onboarding ---- */
.onboarding-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.onboarding-header {
  padding: 20px 20px 0;
  flex-shrink: 0;
}

.onboarding-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
}

.progress-dot {
  flex: 1;
  height: 3px;
  background: var(--border);
  border-radius: 99px;
  transition: background 0.3s;
}

.progress-dot.done {
  background: var(--accent);
}

.onboarding-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px 20px;
}

.onboarding-step-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.2;
}

.onboarding-step-sub {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 28px;
}

.onboarding-footer {
  padding: 16px 20px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
}

/* ---- Form Elements ---- */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus {
  border-color: var(--accent);
}

.form-input::placeholder {
  color: var(--text-muted);
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Gender/choice chips */
.choice-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.choice-chip {
  flex: 1;
  min-width: 80px;
  background: var(--surface2);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.choice-chip:hover {
  border-color: var(--accent-hover);
  color: var(--text);
}

.choice-chip.selected {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* Interest chips */
.interests-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.interest-chip {
  background: var(--surface2);
  border: 2px solid var(--border);
  border-radius: 99px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
}

.interest-chip:hover {
  border-color: var(--accent-hover);
}

.interest-chip.selected {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* ---- Photo Upload Grid ---- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.photo-slot {
  aspect-ratio: 3/4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  background: var(--surface2);
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s;
}

.photo-slot:hover {
  border-color: var(--accent);
}

.photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.photo-slot .plus-icon {
  font-size: 28px;
  color: var(--text-muted);
}

.photo-slot .remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.photo-uploading {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- Location Step ---- */
.location-btn {
  width: 100%;
  background: var(--surface2);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.2s;
  font-family: inherit;
  color: var(--text);
}

.location-btn:hover {
  border-color: var(--accent);
}

.location-btn .loc-icon {
  font-size: 40px;
}

.location-btn span {
  font-size: 15px;
  font-weight: 600;
}

.location-btn small {
  color: var(--text-dim);
  font-size: 12px;
}

.location-granted {
  background: var(--accent-dim);
  border-color: var(--accent) !important;
  color: var(--accent);
}

/* ---- DISCOVER SCREEN ---- */
.discover-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card-area {
  flex: 1;
  position: relative;
  padding: 12px;
  overflow: hidden;
}

.card-stack {
  position: relative;
  width: 100%;
  height: 100%;
}

.swipe-card {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: none;
  will-change: transform;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.swipe-card:active {
  cursor: grabbing;
}

/* Stacked cards beneath */
.swipe-card:nth-child(2) {
  transform: scale(0.95) translateY(14px);
  z-index: 0;
  pointer-events: none;
}

.swipe-card:nth-child(3) {
  transform: scale(0.90) translateY(28px);
  z-index: -1;
  pointer-events: none;
}

/* Photos inside card */
.card-photos {
  position: absolute;
  inset: 0;
}

.card-photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0;
  transition: opacity 0.25s;
}

.card-photo-img.active {
  opacity: 1;
}

/* Photo tap zones */
.card-tap-zones {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 2;
}

.card-tap-prev {
  flex: 2;
}

.card-tap-next {
  flex: 3;
}

/* Photo dots */
.card-photo-dots {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  gap: 4px;
  z-index: 3;
}

.card-dot {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 99px;
  transition: background 0.2s;
}

.card-dot.active {
  background: white;
}

/* Swipe indicators */
.card-indicator {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 2px;
  border: 3px solid;
  opacity: 0;
  transition: opacity 0.1s;
  z-index: 5;
  pointer-events: none;
}

.card-indicator-like {
  left: 20px;
  color: var(--success);
  border-color: var(--success);
}

.card-indicator-pass {
  right: 20px;
  color: var(--danger);
  border-color: var(--danger);
}

/* Card info overlay */
.card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 60px 18px 18px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
  z-index: 4;
  pointer-events: none;
}

.card-name {
  font-size: 26px;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.card-meta {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-bio {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 6px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.card-chip {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  border-radius: 99px;
  padding: 4px 10px;
  font-size: 11px;
  color: white;
  font-weight: 500;
}

/* Swipe action buttons */
.swipe-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding: 12px 20px 16px;
  flex-shrink: 0;
}

.swipe-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 26px;
  transition: transform 0.15s, box-shadow 0.15s;
  background: var(--surface);
}

.swipe-btn:hover {
  transform: scale(1.08);
}

.swipe-btn:active {
  transform: scale(0.95);
}

.swipe-btn-pass {
  border-color: var(--danger);
  color: var(--danger);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.2);
}

.swipe-btn-like {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.25);
  width: 72px;
  height: 72px;
  font-size: 32px;
}

.swipe-btn-super {
  border-color: var(--warn);
  color: var(--warn);
  box-shadow: 0 4px 20px rgba(234, 179, 8, 0.2);
}

/* Empty state */
.empty-state {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px 24px;
  text-align: center;
}

.empty-icon {
  font-size: 64px;
}

.empty-state h2 {
  font-size: 22px;
  font-weight: 700;
}

.empty-state p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ---- LIKES SCREEN ---- */
.likes-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.likes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 14px;
  overflow-y: auto;
  flex: 1;
}

.like-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s;
  aspect-ratio: 3/4;
}

.like-card:hover {
  transform: scale(1.02);
}

.like-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.like-card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px 12px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

.like-card-name {
  font-size: 15px;
  font-weight: 700;
  color: white;
}

.like-card-age {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
}

/* Swipe card */
.swipe-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transform-origin: 50% 100%;
  touch-action: none;
  cursor: grab;
  /* Desktop constraint */
  max-width: 420px;
  /* Slightly narrower for better desktop proportion */
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid var(--border);
  /* definition */
}

@media (max-width: 768px) {
  .swipe-card {
    max-width: 100%;
    left: 0;
    transform: none;
    /* Reset distinct transform for mobile */
  }
}

.like-card-online {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 10px;
  height: 10px;
  background: var(--success);
  border: 2px solid var(--surface);
  border-radius: 50%;
}

/* ---- MATCHES SCREEN ---- */
.matches-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.matches-list {
  flex: 1;
  overflow-y: auto;
}

.match-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}

.match-item:hover {
  background: var(--surface2);
}

.match-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.match-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  background: var(--surface2);
}

.match-online-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  background: var(--success);
  border: 2px solid var(--bg);
  border-radius: 50%;
}

.match-info {
  flex: 1;
  min-width: 0;
}

.match-name {
  font-size: 15px;
  font-weight: 600;
}

.match-last-msg {
  font-size: 13px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.match-time {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.match-unread {
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: 99px;
  padding: 2px 6px;
  min-width: 18px;
  text-align: center;
}

/* ---- CHAT SCREEN ---- */
.chat-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.chat-header {
  height: var(--top-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-back-btn {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 6px;
  display: flex;
}

.chat-back-btn svg {
  width: 22px;
  height: 22px;
}

.chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
}

.chat-header-info {
  flex: 1;
}

.chat-header-name {
  font-size: 16px;
  font-weight: 700;
}

.chat-header-status {
  font-size: 12px;
  color: var(--text-dim);
}

.chat-header-status.online {
  color: var(--success);
}

.messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.msg-bubble {
  max-width: 72%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
}

.msg-bubble.mine {
  align-self: flex-end;
  background: var(--accent);
  color: white;
  border-bottom-right-radius: 4px;
}

.msg-bubble.theirs {
  align-self: flex-start;
  background: var(--surface2);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.msg-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  padding: 0 4px;
  text-align: right;
  align-self: flex-end;
}

.msg-time.left {
  text-align: left;
  align-self: flex-start;
}

.msg-group {
  display: flex;
  flex-direction: column;
}

.typing-indicator {
  align-self: flex-start;
  background: var(--surface2);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  padding: 10px 14px;
  display: flex;
  gap: 4px;
  align-items: center;
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: var(--text-dim);
  border-radius: 50%;
  animation: typing-bounce 1.2s infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing-bounce {

  0%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-6px);
  }
}

.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 11px 16px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  resize: none;
  max-height: 100px;
  overflow-y: auto;
}

.chat-input:focus {
  border-color: var(--accent);
}

.chat-input::placeholder {
  color: var(--text-muted);
}

.chat-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.1s;
}

.chat-send-btn:hover {
  background: var(--accent-hover);
}

.chat-send-btn:active {
  transform: scale(0.92);
}

.chat-send-btn svg {
  width: 18px;
  height: 18px;
}

/* ---- PROFILE SCREEN ---- */
.profile-screen {
  height: 100%;
  overflow-y: auto;
}

.profile-header {
  height: var(--top-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}

.profile-body {
  padding: 20px 16px;
}

.profile-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.profile-avatar-big {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 3px solid var(--accent);
}

.profile-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.save-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0 20px;
  height: 36px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.save-btn:hover {
  background: var(--accent-hover);
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

.logout-btn {
  width: 100%;
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 13px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 12px;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.08);
}

/* ---- MATCH OVERLAY ---- */
#match-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  /* Changed from flex to none by default */
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  padding: 24px;
  animation: fade-in 0.3s ease;
}

#match-overlay:not([hidden]) {
  display: flex;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.match-bg-anim {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(249, 115, 22, 0.2) 0%, transparent 65%);
  animation: pulse-glow 2s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
  from {
    opacity: 0.6;
  }

  to {
    opacity: 1;
  }
}

.match-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 340px;
}

.match-fire {
  font-size: 56px;
  animation: flicker 1.5s ease-in-out infinite alternate;
}

.match-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 2px;
}

.match-photos {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
}

.match-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 3px solid var(--accent);
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.4);
}

.match-heart {
  font-size: 32px;
  color: var(--accent);
  animation: heartbeat 1s ease-in-out infinite;
}

@keyframes heartbeat {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.3);
  }
}

.match-subtitle {
  font-size: 16px;
  color: var(--text-dim);
  text-align: center;
}

/* ---- TOAST ---- */
#toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 16px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  z-index: 900;
  box-shadow: var(--shadow);
  white-space: nowrap;
  animation: slide-up 0.3s ease;
  max-width: 320px;
  text-align: center;
}

#toast.success {
  border-color: var(--success);
  color: var(--success);
}

#toast.error {
  border-color: var(--danger);
  color: var(--danger);
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ---- Loading overlay ---- */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

/* ---- Utility ---- */
.text-center {
  text-align: center;
}

.mt-16 {
  margin-top: 16px;
}

.gap-12 {
  gap: 12px;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 99px;
}


/* ================================================
   WEB LANDING PAGE STYLES (Split Screen)
   ================================================ */
.web-lp {
  display: flex;
  height: 100vh;
  width: 100%;
  background: var(--bg);
  overflow: hidden;
}

/* LEFT SIDE: Visual */
.lp-visual-side {
  flex: 6;
  /* 60% width */
  /* Updated to Happy Couple Image */
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.2)), url('https://images.unsplash.com/photo-1529333166437-7750a6dd5a70?q=80&w=2069&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  padding: 60px;
  color: white;
}

@media (max-width: 960px) {
  .lp-visual-side {
    display: none;
  }

  /* On smaller tablets/mobile, hide visual side */
  .web-lp {
    flex-direction: column;
  }
}

.lp-visual-content {
  max-width: 500px;
}

.lp-logo-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  /* Closer to text */
  margin-bottom: 24px;
}

.lp-logo-img {
  height: 80px;
  /* Bigger */
  width: auto;
  display: block;
}

.lp-logo-text {
  font-size: 48px;
  /* Prominent */
  font-weight: 800;
  letter-spacing: 1px;
  /* Red-Orange Gradient */
  background: linear-gradient(135deg, #FF512F 0%, #F09819 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.lp-logo-large {
  font-size: 32px;
  font-weight: 800;
  /* Red-Orange Gradient */
  background: linear-gradient(135deg, #FF512F 0%, #F09819 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  /* Fallback */
  letter-spacing: 2px;
  margin-bottom: 24px;
}

.lp-visual-heading {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 32px;
}

.lp-visual-pills {
  display: flex;
  gap: 12px;
}

.lp-visual-pills span {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  padding: 8px 16px;
  border-radius: 99px;
  font-weight: 600;
  font-size: 14px;
}

/* Phone Mockup (Restored) */
.phone-mockup-small {
  width: 280px;
  height: 560px;
  background: #000;
  border-radius: 36px;
  border: 10px solid #2e3142;
  overflow: hidden;
  position: absolute;
  right: 10%;
  /* Responsive positioning */
  bottom: -40px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
  transform: rotate(6deg);
  /* Tilt right */
  z-index: 10;
  transition: transform 0.5s ease;
}

.phone-mockup-small:hover {
  transform: rotate(0deg) translateY(-10px);
  /* Interactive hover effect */
}

.phone-screen-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* RIGHT SIDE: Action */
.lp-action-side {
  flex: 4;
  /* 40% width */
  background: var(--surface);
  display: flex;
  flex-direction: column;
  position: relative;
  border-left: 1px solid var(--border);
}

.lp-nav-simple {
  padding: 32px 40px;
  display: flex;
  justify-content: flex-end;
  gap: 24px;
}

.lp-link {
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: color 0.2s;
}

.lp-link:hover {
  color: var(--text);
}

.lp-login-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  /* Align left */
  padding: 40px 80px;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.lp-title {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
}

.lp-subtitle {
  font-size: 18px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 48px;
}

.lp-auth-card {
  width: 100%;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  /* Space between buttons and divider */
}

/* Divider styles (Clean) */
.lp-divider {
  text-align: center;
  margin: 0;
  /* Handled by gap */
  color: var(--text-dim);
  font-size: 14px;
}

/* Google Button styles restored */
.btn-google-large {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: white;
  color: #1f1f1f;
  border: none;
  border-radius: 99px;
  /* Pill shape */
  padding: 18px;
  font-size: 18px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.btn-google-large:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

.btn-google-large svg {
  width: 24px;
  height: 24px;
}

/* Red-Orange Gradient for everything */
/* Red-Orange Gradient for everything */
.text-gradient {
  background: linear-gradient(135deg, #FF512F 0%, #F09819 100%);
  /* Red to Orange */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  display: inline-block;
  /* Sometimes needed for text gradients */
}

/* Restored .lp-btn-outline */
.lp-btn-outline {
  width: 100%;
  padding: 16px;
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
  border-radius: 99px;
  font-weight: 600;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.lp-btn-outline:hover {
  border-color: var(--text-dim);
}

.lp-disclaimer {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.lp-disclaimer a {
  color: var(--text-dim);
}

.lp-mini-footer {
  padding: 24px 40px 40px 40px;
  /* Added more bottom padding */
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--surface2);
}

/* APP WRAPPER (Desktop View) */
/* Desktop Navigation (when screen is > 768px) */
#desktop-sidebar {
  display: none;
  /* Hidden on mobile */
}

@media (min-width: 769px) {
  #app-wrapper {
    background: var(--bg);
    align-items: flex-start;
    /* Align into 2-col from top */
    padding-top: 0;
  }

  /* Full Width for Desktop Web Experience */
  #app {
    max-width: 100% !important;
    /* Force full width */
    height: 100dvh;
    border: none;

    display: grid;
    /* Sidebar | Content | Filters(Right) */
    grid-template-columns: 280px 1fr;
    /* Add 3rd column later if needed, for now 2 col is fine but full width */
    grid-template-rows: 1fr;
  }

  /* Hide Bottom Nav on Desktop */
  #bottom-nav {
    display: none !important;
  }

  /* Show Sidebar */
  #desktop-sidebar {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 30px 0;
    box-shadow: 1px 0 0 var(--border);
  }

  .sidebar-header {
    margin-bottom: 32px;
    padding: 0 24px;
  }

  .sidebar-logo {
    font-size: 28px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 1px;
  }

  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .sidebar-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 0;
    /* More 'work-like' square edges? Or just less rounded */
    border-left: 3px solid transparent;
    border-radius: 0 8px 8px 0;
    margin-right: 12px;
  }

  .sidebar-item:hover {
    background: var(--surface2);
    color: var(--text);
  }

  .sidebar-item.active {
    background: var(--surface2);
    color: var(--accent);
    border-left-color: var(--accent);
  }

  .sidebar-item .icon {
    font-size: 24px;
  }

  .sidebar-footer {
    margin-top: auto;
    padding-left: 12px;
    color: var(--text-dim);
    font-size: 12px;
  }
}

/* Mobile Responsive Overrides */
@media (max-width: 768px) {
  .lp-hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 40px;
    gap: 40px;
  }

  .lp-headline {
    font-size: 42px;
  }

  .lp-ctas {
    justify-content: center;
  }

  .lp-header {
    padding: 20px;
  }

  .lp-nav {
    display: none;
  }

  /* Hide nav on mobile for simplicity */

  /* On mobile, app should fill screen */
  #app-wrapper {
    background: none;
    align-items: flex-start;
  }

  #app-wrapper #app {
    height: 100dvh;
    max-height: none;
    border: none;
    border-radius: 0;
  }
}

/* ---- DESKTOP GRID VIEW ---- */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  padding: 24px;
  overflow-y: auto;
  height: 100%;
}

.grid-profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.grid-profile-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-color: var(--border);
}

.grid-card-img-wrap {
  aspect-ratio: 3/4;
  width: 100%;
  position: relative;
  background: var(--surface2);
}

.grid-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.grid-card-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.grid-card-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.grid-actions {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.btn-grid-pass,
.btn-grid-like {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-grid-pass {
  color: var(--text-dim);
  border-color: var(--border);
}

.btn-grid-pass:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border-color: var(--danger);
}

.btn-grid-like {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(249, 115, 22, 0.1);
}

.btn-grid-like:hover {
  background: var(--accent);
  color: white;
}