/* ======================== */
/* FF Page-Specific Styles  */
/* ======================== */

/* OTP shake animation for invalid code */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

/* === SPLASH === */
.splash-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: #FFFFFF; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.splash-logo {
  font-family: var(--font-display); font-weight: 800;
  font-size: 84px; color: #000000;
  letter-spacing: -2px;
  animation: splash-logo 600ms var(--ease-spring) forwards;
}
.splash-tagline {
  color: #666666; font-size: var(--text-md); margin-top: var(--sp-4);
  font-weight: 600;
  opacity: 0; animation: splash-tagline 400ms var(--ease-out) 400ms forwards;
}

/* === WELCOME / ONBOARDING === */
.welcome-page {
  min-height: 100vh; background: var(--bg-app);
  display: flex; flex-direction: column;
}
.carousel-container {
  flex: 1; position: relative; overflow: hidden;
}
.carousel-slides {
  display: flex; height: 100%; transition: transform 400ms var(--ease-out);
}
.carousel-slide {
  min-width: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: var(--sp-8);
  padding-top: 20vh;
  text-align: center;
}
.carousel-slide .slide-icon { font-size: 100px; margin-bottom: var(--sp-8); }
.carousel-slide h2 { font-family: var(--font-display); margin-bottom: var(--sp-3); }
.carousel-slide p { color: var(--text-secondary); max-width: 320px; }
.carousel-dots {
  display: flex; justify-content: center; gap: var(--sp-2);
  padding: var(--sp-4);
}
.carousel-dot {
  width: 8px; height: 8px; border-radius: var(--r-full);
  background: var(--border-strong); transition: all 300ms var(--ease-spring);
  border: none; cursor: pointer;
}
.carousel-dot.active { width: 24px; background: var(--primary); }
.welcome-actions {
  padding: var(--sp-4) var(--sp-6) var(--sp-8);
  display: flex; flex-direction: column; gap: var(--sp-3);
}
.welcome-legal-footer {
  text-align: center;
  padding: 0 var(--sp-6) var(--sp-6);
}
.welcome-legal-footer p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}
.welcome-legal-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
.welcome-legal-link:hover {
  text-decoration: underline;
}

/* === AUTH PAGES === */
.auth-page {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: var(--sp-6);
}
.auth-page .auth-header {
  text-align: center; margin-bottom: var(--sp-6);
}
.auth-page .auth-header .auth-logo {
  font-family: var(--font-display); font-weight: 800;
  font-size: var(--text-3xl);
  color: #000000;
  margin-bottom: var(--sp-2);
}
.auth-page .auth-header p { color: var(--text-muted); }
.auth-form { max-width: 420px; margin: 0 auto; width: 100%; }
.auth-divider {
  display: flex; align-items: center; gap: var(--sp-3);
  margin: var(--sp-6) 0; color: var(--text-muted); font-size: var(--text-sm);
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.social-btns { display: flex; flex-direction: column; gap: var(--sp-3); width: 100%; }
.social-btns .auth-divider {
  margin: var(--sp-2) 0;
}
.social-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 50px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg-surface); color: var(--text-primary);
  font-weight: 600; font-size: 14px; cursor: pointer;
  transition: all 200ms ease; position: relative; overflow: hidden;
  box-sizing: border-box;
}
.social-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.social-btn:active { transform: translateY(0); }
.social-btn svg { flex-shrink: 0; }

/* Google */
.social-btn.social-google {
  border-color: rgba(66, 133, 244, 0.2);
}
.social-btn.social-google:hover {
  background: rgba(66, 133, 244, 0.06);
  border-color: rgba(66, 133, 244, 0.4);
  box-shadow: 0 4px 16px rgba(66, 133, 244, 0.12);
}

/* Facebook */
.social-btn.social-facebook {
  border-color: rgba(24, 119, 242, 0.2);
}
.social-btn.social-facebook:hover {
  background: rgba(24, 119, 242, 0.06);
  border-color: rgba(24, 119, 242, 0.4);
  box-shadow: 0 4px 16px rgba(24, 119, 242, 0.12);
}

/* Discord */
.social-btn.social-discord {
  border-color: rgba(88, 101, 242, 0.2);
}
.social-btn.social-discord:hover {
  background: rgba(88, 101, 242, 0.06);
  border-color: rgba(88, 101, 242, 0.4);
  box-shadow: 0 4px 16px rgba(88, 101, 242, 0.12);
}

/* Email */
.social-btn.social-email {
  border-color: var(--border);
  color: var(--text-secondary);
}
.social-btn.social-email:hover {
  background: var(--bg-sunken);
  border-color: var(--border-strong);
}
.social-btn.social-email.active {
  background: var(--primary-ghost);
  border-color: var(--primary);
  color: var(--primary);
}

/* Email form expand animation */
.email-login-form {
  animation: slideDown 0.3s ease;
  margin-top: var(--sp-4);
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); max-height: 0; }
  to { opacity: 1; transform: translateY(0); max-height: 500px; }
}

/* Dark mode social button adjustments */
[data-theme="dark"] .social-btn {
  background: var(--bg-surface);
}
[data-theme="dark"] .social-btn.social-google:hover { background: rgba(66, 133, 244, 0.1); }
[data-theme="dark"] .social-btn.social-facebook:hover { background: rgba(24, 119, 242, 0.1); }
[data-theme="dark"] .social-btn.social-discord:hover { background: rgba(88, 101, 242, 0.1); }

/* Step progress */
.step-progress {
  display: flex; gap: var(--sp-1); padding: var(--sp-4) var(--sp-4) 0;
}
.step-bar {
  flex: 1; height: 4px; border-radius: var(--r-full); background: var(--border);
  overflow: hidden;
}
.step-bar.active { background: var(--primary); }
.step-bar.completed { background: var(--primary); }

/* === PROFILE SETUP === */
.profile-setup {
  min-height: 100vh; display: flex; flex-direction: column;
  width: 100%;
}
.profile-setup .setup-content {
  flex: 1; padding: var(--sp-6); max-width: 600px;
  margin: 0 auto; width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .profile-setup .setup-content {
    max-width: 640px;
    padding: var(--sp-8) var(--sp-6);
  }
}

@media (min-width: 1280px) {
  .profile-setup .setup-content {
    max-width: 720px;
  }
}
.avatar-upload {
  width: 100px; height: 100px; border-radius: 50%;
  background: var(--bg-sunken); border: 3px dashed var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--sp-6); cursor: pointer; font-size: 36px;
  color: var(--text-muted); transition: all 200ms;
  overflow: hidden;
}
.avatar-upload:hover { border-color: var(--primary); color: var(--primary); }
.avatar-upload img { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: cover; display: block; border-radius: 50%; }

/* Interests grid */
.interests-grid {
  display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: center;
}

/* === COMMUNITY NOTICE === */
.community-notice {
  background: var(--bg-surface); border-radius: var(--r-lg);
  padding: var(--sp-6); border: 1px solid var(--border);
  max-width: 480px; margin: 0 auto;
}
.community-notice h3 { text-align: center; margin-bottom: var(--sp-4); }
.notice-rules {
  list-style: none; display: flex; flex-direction: column; gap: var(--sp-3);
}
.notice-rules li {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  font-size: var(--text-sm); color: var(--text-secondary);
}
.notice-rules li .rule-icon { font-size: 20px; flex-shrink: 0; }

/* === FEED === */
.story-row {
  display: flex; gap: var(--sp-3); padding: var(--sp-4) var(--sp-4) var(--sp-2);
  overflow-x: auto; scrollbar-width: none;
}
.story-row::-webkit-scrollbar { display: none; }
.story-item {
  display: flex; flex-direction: column; align-items: center;
  gap: var(--sp-1); cursor: pointer; flex-shrink: 0;
}
.story-avatar-ring {
  width: 72px; height: 72px; border-radius: 50%;
  padding: 3px; background: #000;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-clay);
  position: relative;
  transition: transform 200ms var(--ease-spring);
}
.story-avatar-ring:hover { transform: scale(1.05); }
.story-avatar-ring.seen { background: var(--border-strong); }
.story-avatar-ring.add { background: none; border: 2.5px dashed var(--primary); }
.story-avatar {
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--bg-surface);
  border: 2.5px solid var(--bg-surface);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.story-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.story-item .story-name {
  font-size: 10px; font-weight: 600; color: var(--text-secondary);
  max-width: 58px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; text-align: center;
}
.add-badge {
  position: absolute; bottom: -2px; right: -2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-green); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; border: 2px solid var(--bg-surface);
}

.filter-pills {
  display: flex; gap: var(--sp-2); padding: 0 var(--sp-4) var(--sp-3);
  overflow-x: auto; scrollbar-width: none;
  position: sticky; top: 56px; z-index: 100;
  background: var(--bg-app); padding-top: var(--sp-2);
}
.filter-pills::-webkit-scrollbar { display: none; }

/* POST CARD */
.post-card {
  background: var(--bg-surface); border-bottom: 1px solid var(--divider);
  animation: fade-in-up 300ms var(--ease-out);
  contain: content;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}
.post-header {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-4) var(--sp-2);
}
.post-author-info { flex: 1; }
.post-author-name { font-weight: 700; font-size: var(--text-base); cursor: pointer; }
.post-author-name:hover { color: var(--primary); }
.post-meta { font-size: var(--text-xs); color: var(--text-muted); }
.post-content { padding: 0 var(--sp-4) var(--sp-3); font-size: var(--text-base); line-height: 1.5; }
.post-content .hashtag { color: var(--primary); cursor: pointer; font-weight: 600; }
.post-content .mention { color: var(--primary); cursor: pointer; }
.post-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  cursor: pointer;
  background: var(--bg-sunken);
}
.post-stats {
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-2) var(--sp-4); font-size: var(--text-sm);
  color: var(--text-muted);
}
.post-actions {
  display: flex; border-top: 1px solid var(--divider);
}
.post-action {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: var(--sp-2); padding: var(--sp-3); cursor: pointer;
  color: var(--text-secondary); font-size: var(--text-sm); font-weight: 600;
  border: none; background: none; transition: color 150ms;
}
.post-action:hover { color: var(--primary); background: var(--primary-ghost); }
.post-action.liked { color: var(--accent-coral); }
.post-action.saved { color: var(--accent-amber); }

/* === DISCOVER === */
.discover-page .search-wrapper {
  padding: var(--sp-3) var(--sp-4); position: relative;
}
.discover-page .search-wrapper .search-icon {
  position: absolute; left: 28px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted);
}
.people-grid {
  display: flex; gap: var(--sp-3); overflow-x: auto; padding: var(--sp-2) var(--sp-4);
  scrollbar-width: none;
}
.people-grid::-webkit-scrollbar { display: none; }
.person-card {
  min-width: 160px; max-width: 180px; padding: var(--sp-4);
  background: var(--bg-surface); border-radius: var(--r-lg);
  border: 1px solid var(--border); text-align: center;
  display: flex; flex-direction: column; align-items: center;
  gap: var(--sp-2); animation: fade-in-up 300ms var(--ease-out);
  flex-shrink: 0;
}
.person-card .person-name { font-weight: 700; font-size: var(--text-sm); }
.person-card .person-handle { font-size: var(--text-xs); color: var(--text-muted); }
.person-card .mutual { font-size: var(--text-xs); color: var(--text-muted); }
.person-card .person-interests {
  display: flex; gap: var(--sp-1); font-size: var(--text-xs);
}
.person-card .dismiss-btn {
  position: absolute; top: var(--sp-2); right: var(--sp-2);
  width: 24px; height: 24px; border-radius: 50%;
  border: none; background: var(--bg-sunken); color: var(--text-muted);
  cursor: pointer; font-size: 12px; display: flex;
  align-items: center; justify-content: center;
}
.person-row {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--divider);
  transition: background 0.2s ease;
}
.person-row:hover {
  background-color: var(--bg-sunken);
}
.person-row .person-info { flex: 1; }
.person-row .person-name { font-weight: 700; font-size: var(--text-base); }
.person-row .person-details { font-size: var(--text-xs); color: var(--text-muted); }

/* === PROFILE === */
.profile-page { max-width: 100%; overflow-x: hidden; }
.profile-cover {
  width: 100%; height: clamp(200px, 40vw, 500px);
  background-color: var(--bg-sunken);
  background-position: center;
  background-size: cover;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}
.profile-cover img { width: 100%; height: 100%; object-fit: cover; }
.profile-cover-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.4));
  pointer-events: none;
}
.profile-cover-edit {
  position: absolute; top: var(--sp-4); right: var(--sp-4);
  z-index: 20;
  display: flex; gap: 8px;
}
.btn-cover-delete {
  background: rgba(239, 68, 68, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fee2e2;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s; font-size: 14px;
}
.btn-cover-delete:hover {
  background: rgba(239, 68, 68, 0.4);
  transform: scale(1.1);
  color: white;
}
.btn-cover-edit {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.btn-cover-edit:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}
.profile-avatar-wrapper {
  display: flex; justify-content: center; margin-top: -60px;
  position: relative; z-index: 10;
}
.profile-avatar-wrapper .avatar {
  border: 4px solid var(--bg-surface);
  width: 88px; height: 88px;
  max-width: 88px; max-height: 88px;
  flex-shrink: 0;
}
.profile-info {
  text-align: center; padding: var(--sp-3) var(--sp-4);
}
.profile-info .profile-name { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.profile-info .profile-handle { font-size: var(--text-sm); color: var(--text-muted); }
.profile-info .profile-bio { color: var(--text-secondary); margin-top: var(--sp-2); font-size: var(--text-sm); }
.profile-info .profile-location {
  font-size: var(--text-xs); color: var(--text-muted); margin-top: var(--sp-1);
}
.profile-stats {
  display: flex; justify-content: center; gap: var(--sp-8);
  padding: var(--sp-3); border-bottom: 1px solid var(--divider);
}
.stat-item {
  text-align: center; cursor: pointer;
}
.stat-item .stat-number { font-weight: 700; font-size: var(--text-md); }
.stat-item .stat-label { font-size: var(--text-xs); color: var(--text-muted); }
.profile-cta {
  display: flex; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4);
  justify-content: center;
}
.profile-tabs {
  display: flex; border-bottom: 1px solid var(--border);
  position: sticky; top: 56px; background: var(--bg-surface); z-index: 50;
}
.profile-tab {
  flex: 1; padding: var(--sp-3); text-align: center;
  font-weight: 600; font-size: var(--text-sm); color: var(--text-muted);
  cursor: pointer; border: none; background: none;
  border-bottom: 2px solid transparent; transition: all 150ms;
}
.profile-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ── Profile Media Grid (Photos/Videos) ── */
.profile-media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 2px;
}

.profile-media-tile {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-sunken);
  position: relative;
  transition: opacity 0.15s;
}

.profile-media-tile:hover {
  opacity: 0.85;
}

.profile-media-tile img,
.profile-media-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-video-tile .profile-video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* ── Saved Post Link Cards ── */
.saved-post-link-card {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--divider);
  transition: background 0.15s;
  align-items: center;
}

.saved-post-link-card:hover {
  background: var(--bg-sunken);
}

.saved-post-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-sunken);
  position: relative;
}

.saved-post-thumb img,
.saved-post-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.saved-post-no-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: linear-gradient(135deg, var(--bg-sunken), var(--bg-elevated));
}

.saved-post-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  color: white;
  font-size: 16px;
}

.saved-post-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.saved-post-author {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.saved-post-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.saved-post-time {
  font-size: 11px;
  color: var(--text-muted);
}

/* === MESSAGES === */
.chat-row {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); cursor: pointer;
  border-bottom: 1px solid var(--divider); transition: background 100ms;
}
.chat-row:hover { background: var(--bg-sunken); }
.chat-row.unread { background: var(--primary-ghost); }
.chat-row .chat-info { flex: 1; min-width: 0; }
.chat-row .chat-name { font-weight: 700; font-size: var(--text-base); }
.chat-row.unread .chat-name { color: var(--primary); }
.chat-row .chat-preview {
  font-size: var(--text-sm); color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-row .chat-meta {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: var(--sp-1); flex-shrink: 0;
}
.chat-row .chat-time { font-size: var(--text-xs); color: var(--text-muted); }

/* === OLD CHAT STYLES REMOVED — Now using CometChat styles from chat-screen.css === */



/* === GROUPS === */
.group-card {
  background: var(--bg-surface); border-radius: var(--r-lg);
  border: 1px solid var(--border); overflow: hidden;
  animation: fade-in-up 300ms var(--ease-out);
  cursor: pointer; transition: box-shadow 200ms;
}
.group-card:hover { box-shadow: var(--shadow-md); }
.group-cover {
  width: 100%; height: 100px; object-fit: cover;
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
}
.group-card-body { padding: var(--sp-3); }
.group-card-body .group-name { font-weight: 700; font-size: var(--text-base); margin-bottom: 2px; }
.group-card-body .group-meta { font-size: var(--text-xs); color: var(--text-muted); }
.groups-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--sp-4); padding: var(--sp-4);
}

/* === NOTIFICATIONS === */
.notif-row {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--divider);
  cursor: pointer; transition: background 100ms;
}
.notif-row:hover { background: var(--bg-sunken); }
.notif-row.unread { background: var(--primary-ghost); }
.notif-content { flex: 1; min-width: 0; }
.notif-text { font-size: var(--text-sm); line-height: 1.4; word-break: break-word; }
.notif-text img { max-width: 100%; max-height: 180px; border-radius: var(--r-sm); object-fit: cover; margin-top: var(--sp-2); display: block; box-shadow: var(--shadow-sm); }
.notif-text strong { font-weight: 700; }
.notif-time { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }
.notif-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary); flex-shrink: 0; margin-top: 6px;
}

/* === SETTINGS === */
.settings-section { margin-bottom: var(--sp-4); }
.settings-header {
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-6) var(--sp-4); border-bottom: 1px solid var(--divider);
}
.settings-row {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); cursor: pointer;
  border-bottom: 1px solid var(--divider); transition: background 100ms;
}
.settings-row:hover { background: var(--bg-sunken); }
.settings-row .sr-icon { font-size: 18px; width: 24px; text-align: center; }
.settings-row .sr-label { flex: 1; font-size: var(--text-base); }
.settings-row .sr-value { font-size: var(--text-sm); color: var(--text-muted); }
.settings-row .sr-arrow { color: var(--text-muted); }

/* === STORY VIEWER === */
.story-viewer {
  position: fixed; inset: 0; z-index: 1000; background: #000;
  display: flex; flex-direction: column;
  contain: strict;
}
.story-progress {
  display: flex; gap: 3px; padding: var(--sp-3) var(--sp-4);
}
.story-progress-bar {
  flex: 1; height: 3px; border-radius: var(--r-full);
  background: rgba(255,255,255,0.3); overflow: hidden;
}
.story-progress-bar .fill {
  height: 100%; background: white; border-radius: var(--r-full);
  width: 0;
}
.story-progress-bar .fill.active { animation: progress-fill 5s linear forwards; will-change: width; }
.story-progress-bar .fill.done { width: 100%; }
.story-header-bar {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 0 var(--sp-4) var(--sp-3); color: white;
}
.story-header-bar .story-user-name { font-weight: 700; font-size: var(--text-sm); }
.story-header-bar .story-timestamp { font-size: var(--text-xs); opacity: 0.7; }
.story-content {
  flex: 1; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.story-content img {
  width: 100%; height: 100%; object-fit: contain;
}
.story-text-content {
  font-family: var(--font-display); font-size: var(--text-2xl);
  font-weight: 700; color: white; text-align: center; padding: var(--sp-8);
}
.story-reactions {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); background: rgba(0,0,0,0.5);
}
.story-reactions input {
  flex: 1; height: 40px; border-radius: var(--r-full);
  background: rgba(255,255,255,0.15); border: none;
  padding: 0 var(--sp-4); color: white; font-size: var(--text-sm);
}
.story-reactions input::placeholder { color: rgba(255,255,255,0.6); }
.story-reaction-emoji {
  font-size: 24px; cursor: pointer;
  transition: transform 150ms var(--ease-spring);
}
.story-reaction-emoji:hover { transform: scale(1.3); }

/* === LOVE CONNECT === */
.love-hero {
  text-align: center; padding: var(--sp-8);
  background: linear-gradient(135deg, #FF6B6B22, #FF6B6B08);
  border-radius: var(--r-xl); margin: var(--sp-4);
  border: 1px solid rgba(255,107,107,0.2);
}
.love-hero .love-icon { font-size: 64px; margin-bottom: var(--sp-4); }
.love-hero h2 { color: var(--accent-coral); margin-bottom: var(--sp-2); }
.love-steps {
  display: flex; flex-direction: column; gap: var(--sp-4);
  padding: var(--sp-4);
}
.love-step {
  display: flex; gap: var(--sp-4); padding: var(--sp-4);
  background: var(--bg-surface); border-radius: var(--r-md);
  border: 1px solid var(--border);
}
.love-step-number {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-coral); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
}
.love-form {
  padding: var(--sp-4); max-width: 480px; margin: 0 auto;
}

/* ── Love Connect Status Cards ── */
.love-status-card {
  border-radius: var(--r-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border);
}

.love-status-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.love-status-icon.waiting {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(251, 191, 36, 0.05));
}

.love-status-icon.active {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(255, 107, 107, 0.05));
  animation: love-pulse 2s ease-in-out infinite;
}

.love-status-icon.review {
  background: linear-gradient(135deg, rgba(61, 126, 255, 0.2), rgba(61, 126, 255, 0.05));
}

.love-status-icon.approved {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.05));
}

@keyframes love-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.love-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--divider);
}

.love-detail-row:last-of-type {
  border-bottom: none;
}

.love-detail-row span:first-child {
  font-weight: 600;
  color: var(--text-muted);
}

/* ── Countdown Timer ── */
.love-countdown-card {
  position: relative;
  overflow: hidden;
}

.love-countdown-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.04), rgba(238, 90, 36, 0.02));
  pointer-events: none;
}

.love-countdown-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 16px 0;
  padding: 16px;
  background: var(--bg-sunken);
  border-radius: 16px;
}

.love-timer-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
}

.love-timer-num {
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  line-height: 1;
  font-family: 'DM Mono', 'SF Mono', monospace;
}

.love-timer-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.love-timer-sep {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-muted);
  opacity: 0.4;
  margin-bottom: 16px;
}

/* ── Progress Bar ── */
.love-progress-wrap {
  margin: 12px 0 16px;
}

.love-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-sunken);
  border-radius: 4px;
  overflow: hidden;
}

.love-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-coral), var(--accent-amber), var(--accent-green));
  border-radius: 4px;
  transition: width 1s ease;
}

.love-progress-label {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 600;
}

/* ── Love Connect Chat Card ── */
.love-connect-card {
  border: 1px solid rgba(255, 107, 107, 0.2) !important;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.06), rgba(255, 107, 107, 0.02)) !important;
}

/* === POST COMPOSER === */
.composer-overlay {
  position: fixed; inset: 0; z-index: 600;
  background: var(--bg-surface); display: flex; flex-direction: column;
  animation: sheet-up 350ms var(--ease-spring);
}
.composer-header {
  display: flex; align-items: center; padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
}
.composer-header .composer-title {
  flex: 1; text-align: center; font-weight: 700;
}
.composer-body {
  flex: 1; overflow-y: auto; padding: var(--sp-4);
}
.composer-body .identity-row {
  display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4);
}
.composer-body .compose-area {
  width: 100%; border: none; outline: none; resize: none;
  min-height: 120px; font-size: var(--text-md);
  font-family: var(--font-body); color: var(--text-primary);
  background: transparent; line-height: 1.5;
}
.composer-body .compose-area::placeholder { color: var(--text-placeholder); }
.composer-toolbar {
  display: flex; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--border); overflow-x: auto;
}
.composer-toolbar button {
  padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm);
  border: none; background: var(--bg-sunken); cursor: pointer;
  font-size: var(--text-sm); display: flex; align-items: center;
  gap: var(--sp-1); color: var(--text-secondary); white-space: nowrap;
}
.composer-toolbar button:hover { background: var(--primary-pale); color: var(--primary); }

/* === LANGUAGE FILTER === */
.language-filter {
  padding: var(--sp-3) var(--sp-4);
}
.language-grid {
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
}
.lang-chip {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-3); border-radius: var(--r-full);
  background: var(--bg-sunken); color: var(--text-secondary);
  font-size: var(--text-sm); font-weight: 600;
  cursor: pointer; border: 1.5px solid transparent;
  transition: all 150ms;
}
.lang-chip:hover { border-color: var(--primary-light); }
.lang-chip.selected {
  background: var(--primary); color: white; border-color: var(--primary);
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* === CALL UI === */
.call-ui {
  position: relative;
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.call-ui .call-timer {
  font-variant-numeric: tabular-nums;
}
.call-ctrl-btn:hover {
  filter: brightness(1.2);
}
.call-ctrl-btn:active {
  transform: scale(0.92);
}
.call-end-btn:hover {
  background: #DC2626 !important;
}
.call-end-btn:active {
  transform: scale(0.88) !important;
}

/* === SETTINGS MODAL OPTIONS === */
.settings-option-row:hover {
  border-color: var(--primary-light) !important;
  background: var(--primary-ghost) !important;
}
.settings-toggle-row .toggle {
  flex-shrink: 0;
}

/* ======================== */
/* MEDIA CAROUSEL           */
/* ======================== */
.post-media-container {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.post-carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: var(--bg-sunken);
  touch-action: pan-y pinch-zoom;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  cursor: grab;
  will-change: transform;
}

.carousel-track:active {
  cursor: grabbing;
}

.carousel-slide-item {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.carousel-slide-item img,
.carousel-slide-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-lazy-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-sunken);
}

.carousel-dots-indicator {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
  padding: 4px 8px;
  background: rgba(0,0,0,0.3);
  border-radius: var(--r-full);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.carousel-dot-item {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transition: all 200ms var(--ease-out);
  cursor: pointer;
}

.carousel-dot-item.active {
  width: 18px;
  border-radius: 3px;
  background: #fff;
}

.carousel-counter {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  background: rgba(0,0,0,0.5);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--r-full);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  letter-spacing: 0.5px;
}

.post-single-media {
  width: 100%;
  overflow: hidden;
  background: var(--bg-sunken);
}

.post-single-media img {
  width: 100%;
  max-height: 600px;
  object-fit: contain;
  display: block;
}

.post-single-media video {
  width: 100%;
  max-width: 100%;
  max-height: 80vh;
  display: block;
  background: #000;
  object-fit: contain;
}

.carousel-video-wrapper {
  position: relative;
  width: 100%;
  background: #000;
}

.carousel-video-wrapper video {
  width: 100%;
  max-width: 100%;
  max-height: 80vh;
  display: block;
  object-fit: contain;
}

.carousel-media {
  content-visibility: auto;
}

/* Carousel Navigation Arrows (desktop) */
.carousel-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 15;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.45);
  color: white;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 200ms, background 200ms;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.post-carousel:hover .carousel-nav-arrow {
  opacity: 1;
}
.carousel-nav-arrow:hover {
  background: rgba(0,0,0,0.7);
}
.carousel-nav-prev { left: 8px; }
.carousel-nav-next { right: 8px; }

/* Hide arrows on touch devices */
@media (hover: none) {
  .carousel-nav-arrow { display: none !important; }
}

/* ======================== */
/* MEDIA EDITOR             */
/* ======================== */
.media-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--bg-app);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in 200ms var(--ease-out);
}

.media-editor-container {
  width: 100%;
  height: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
}

.media-editor-header {
  display: flex;
  align-items: center;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
}

.media-editor-header .editor-title {
  flex: 1;
  text-align: center;
  font-weight: 700;
  font-size: var(--text-base);
}

.media-editor-preview {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  overflow: hidden;
  background: #000;
  min-height: 0;
}

.editor-canvas-wrap {
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: aspect-ratio 300ms var(--ease-out);
}

.editor-canvas-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  transition: filter 200ms, transform 200ms;
}

.media-editor-tabs {
  display: flex;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.editor-tab {
  flex: 1;
  padding: var(--sp-3);
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 150ms;
}

.editor-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.editor-tab:hover {
  color: var(--text-primary);
}

.media-editor-panel {
  padding: var(--sp-4);
  overflow-y: auto;
  max-height: 280px;
  min-height: 200px;
}

/* Filter presets grid */
.filter-presets-grid {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  padding-bottom: var(--sp-2);
  scrollbar-width: none;
}

.filter-presets-grid::-webkit-scrollbar { display: none; }

.filter-preset-item {
  flex-shrink: 0;
  width: 72px;
  cursor: pointer;
  text-align: center;
  transition: transform 150ms;
}

.filter-preset-item:hover {
  transform: scale(1.05);
}

.filter-preset-item.active .filter-preview-thumb {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary);
}

.filter-preset-item.active .filter-name {
  color: var(--primary);
  font-weight: 700;
}

.filter-preview-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 2px solid var(--border);
  margin: 0 auto var(--sp-1);
  transition: border-color 150ms;
}

.filter-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.filter-name {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Adjust panel */
.adjust-panel {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.adjust-row {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.adjust-label {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
}

.adjust-value {
  font-variant-numeric: tabular-nums;
  color: var(--primary);
  font-weight: 700;
}

.adjust-slider {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border);
  border-radius: var(--r-full);
  outline: none;
}

.adjust-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-surface);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.adjust-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-surface);
  cursor: pointer;
}

.transform-buttons {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
}

/* Crop panel */
.crop-panel {
  padding: var(--sp-2) 0;
}

.crop-ratios {
  display: flex;
  gap: var(--sp-3);
  justify-content: center;
}

.crop-ratio-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3);
  border-radius: var(--r-md);
  border: 2px solid var(--border);
  background: var(--bg-sunken);
  cursor: pointer;
  transition: all 150ms;
  min-width: 70px;
}

.crop-ratio-btn:hover {
  border-color: var(--primary-light);
}

.crop-ratio-btn.active {
  border-color: var(--primary);
  background: var(--primary-ghost);
}

.crop-ratio-btn span {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
}

.crop-ratio-btn.active span {
  color: var(--primary);
}

.crop-ratio-icon {
  width: 36px;
  max-height: 48px;
  border: 2px solid var(--border-strong);
  border-radius: 4px;
  background: var(--bg-surface);
}

.crop-ratio-btn.active .crop-ratio-icon {
  border-color: var(--primary);
}

/* ======================== */
/* COMPOSER MEDIA PREVIEW   */
/* ======================== */
.compose-media-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
}

.compose-media-item {
  position: relative;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--bg-sunken);
  border: 2px solid transparent;
  transition: border-color 150ms, transform 150ms, opacity 150ms;
}

.compose-media-item.dragging {
  opacity: 0.5;
  transform: scale(0.95);
}

.compose-media-item.drag-over {
  border-color: var(--primary);
  transform: scale(1.02);
}

.compose-media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compose-media-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border-strong);
  cursor: pointer;
  color: var(--text-muted);
  transition: all 150ms;
}

.compose-media-add:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-ghost);
}

.media-order-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.media-edit-btn,
.media-remove-btn {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  z-index: 5;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: transform 150ms;
}

.media-edit-btn:hover,
.media-remove-btn:hover {
  transform: scale(1.1);
}

.media-remove-btn {
  top: 6px;
  right: 6px;
  background: rgba(239,68,68,0.8);
  color: white;
}

.media-edit-btn {
  bottom: 6px;
  right: 6px;
  background: rgba(0,0,0,0.6);
  color: white;
}

/* Aspect ratio bar */
.aspect-ratio-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.ratio-btn {
  padding: 4px 12px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--border);
  background: var(--bg-sunken);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 150ms;
}

.ratio-btn:hover {
  border-color: var(--primary-light);
}

.ratio-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--text-inverse);
}

