/* ==================== BASE ==================== */
:root {
  --bg-1: #0a0e27;
  --bg-2: #131841;
  --bg-3: #1a1f4d;
  --card: rgba(255,255,255,0.06);
  --card-hover: rgba(255,255,255,0.1);
  --border: rgba(255,255,255,0.1);
  --text: #ffffff;
  --text-2: #b8bcd6;
  --text-3: #7a7f9e;
  --primary: #ff4b7d;
  --primary-2: #c44dff;
  --accent: #4facfe;
  --accent-2: #00f2fe;
  --success: #43e97b;
  --warning: #fee140;
  --danger: #f5576c;
  --grad-primary: linear-gradient(135deg, #ff4b7d, #c44dff);
  --grad-accent: linear-gradient(135deg, #4facfe, #00f2fe);
  --grad-warm: linear-gradient(135deg, #fa709a, #fee140);
  --shadow: 0 20px 60px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 40px rgba(255,75,125,0.4);
  --radius: 18px;
  --radius-sm: 12px;
  --transition: cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
html { overflow-x: hidden; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; }
body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  background: var(--bg-1);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  max-width: 100vw;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,75,125,0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(196,77,255,0.15) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(79,172,254,0.08) 0%, transparent 60%);
  z-index: -1;
  pointer-events: none;
}
.hidden { display: none !important; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; }
input, select, textarea { font-family: inherit; }

.gradient-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gradient-text-2 {
  background: var(--grad-warm);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ==================== FLASH LOADER ==================== */
.flash-loader {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at center, #1a1f4d 0%, #0a0e27 100%);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.flash-loader.done {
  opacity: 0; transform: scale(1.1); pointer-events: none;
}
.flash-inner { text-align: center; z-index: 2; }
.flash-logo { animation: floatIn 1s var(--transition); }
.heart-orbit {
  position: relative; width: 120px; height: 120px; margin: 0 auto 30px;
}
.heart-orbit i {
  position: absolute; top: 50%; left: 50%;
  font-size: 40px;
  animation: orbit 2s linear infinite;
}
.heart-orbit i:nth-child(1) { color: #ff4b7d; animation-delay: 0s; }
.heart-orbit i:nth-child(2) { color: #c44dff; animation-delay: -0.66s; }
.heart-orbit i:nth-child(3) { color: #4facfe; animation-delay: -1.33s; }
@keyframes orbit {
  0% { transform: translate(-50%,-50%) rotate(0deg) translateX(45px) rotate(0deg) scale(1); }
  50% { transform: translate(-50%,-50%) rotate(180deg) translateX(45px) rotate(-180deg) scale(1.3); }
  100% { transform: translate(-50%,-50%) rotate(360deg) translateX(45px) rotate(-360deg) scale(1); }
}
.flash-title {
  font-size: 3rem; font-weight: 900; letter-spacing: -1px;
  background: linear-gradient(135deg, #fff 0%, #ffd6e0 50%, #c44dff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.flash-title span { background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; color: transparent; }
.flash-tagline { color: var(--text-2); margin-top: 8px; font-size: 1.1rem; }
.flash-bar {
  width: 260px; height: 6px; background: rgba(255,255,255,0.08);
  border-radius: 999px; margin: 40px auto 15px; overflow: hidden;
}
.flash-bar-fill {
  height: 100%; width: 0%;
  background: var(--grad-primary);
  border-radius: 999px;
  animation: fill 0.85s ease-out forwards;
  box-shadow: 0 0 20px rgba(255,75,125,0.6);
}
@keyframes fill { to { width: 100%; } }
.flash-status { color: var(--text-3); font-size: 0.9rem; letter-spacing: 1px; }
@keyframes floatIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.floating-hearts {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.floating-hearts span {
  position: absolute; font-size: 1.5rem;
  bottom: -30px;
  animation: float-up linear infinite;
  opacity: 0.6;
}
.floating-hearts span:nth-child(1) { left: 10%; animation-duration: 8s; animation-delay: 0s; }
.floating-hearts span:nth-child(2) { left: 20%; animation-duration: 10s; animation-delay: 1s; }
.floating-hearts span:nth-child(3) { left: 35%; animation-duration: 7s; animation-delay: 2s; }
.floating-hearts span:nth-child(4) { left: 50%; animation-duration: 9s; animation-delay: 0.5s; }
.floating-hearts span:nth-child(5) { left: 65%; animation-duration: 11s; animation-delay: 1.5s; }
.floating-hearts span:nth-child(6) { left: 75%; animation-duration: 8.5s; animation-delay: 2.5s; }
.floating-hearts span:nth-child(7) { left: 85%; animation-duration: 9.5s; animation-delay: 3s; }
.floating-hearts span:nth-child(8) { left: 95%; animation-duration: 7.5s; animation-delay: 3.5s; }
.floating-hearts span:nth-child(9) { left: 5%; animation-duration: 12s; animation-delay: 4s; }
.floating-hearts span:nth-child(10) { left: 45%; animation-duration: 10.5s; animation-delay: 4.5s; }
@keyframes float-up {
  0% { transform: translateY(0) scale(0.7); opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.8; }
  100% { transform: translateY(-110vh) scale(1.4); opacity: 0; }
}

/* ==================== NAV ==================== */
.nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 5%;
  background: rgba(10,14,39,0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-logo { font-size: 1.4rem; font-weight: 800; }
.nav-logo i { color: var(--primary); animation: heartbeat 1.5s ease-in-out infinite; }
@keyframes heartbeat {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a {
  color: var(--text-2); font-weight: 500; position: relative;
  transition: color 0.3s;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -6px; left: 50%;
  width: 0; height: 2px; background: var(--grad-primary);
  transition: all 0.3s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; left: 0; }
.nav-toggle {
  background: transparent; color: var(--text); font-size: 1.4rem; display: none;
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s var(--transition);
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--grad-primary);
  color: white;
  box-shadow: 0 8px 25px rgba(255,75,125,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 35px rgba(255,75,125,0.5); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  background: transparent; color: var(--text); border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--card-hover); }
.btn-outline {
  background: transparent; color: var(--text);
  border: 2px solid transparent;
  background-image: linear-gradient(var(--bg-1), var(--bg-1)), var(--grad-primary);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}
.btn-outline:hover { background-image: var(--grad-primary), var(--grad-primary); }
.btn-big { padding: 16px 32px; font-size: 1.05rem; }
.btn-full { width: 100%; }
.btn-round { padding: 12px; width: 44px; height: 44px; border-radius: 50%; }
.btn-icon {
  background: var(--card); color: var(--text);
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
}
.btn-icon:hover { background: var(--danger); }

/* ==================== HERO ==================== */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 60px 5% 100px;
  align-items: center;
  min-height: 85vh;
}
.hero-blobs { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.blob {
  position: absolute; border-radius: 50%; filter: blur(80px);
  opacity: 0.5;
  animation: blob 15s ease-in-out infinite;
}
.b1 { width: 400px; height: 400px; background: #ff4b7d; top: -100px; left: -100px; }
.b2 { width: 350px; height: 350px; background: #c44dff; bottom: -80px; right: -50px; animation-delay: -5s; }
.b3 { width: 300px; height: 300px; background: #4facfe; top: 40%; left: 45%; animation-delay: -10s; }
@keyframes blob {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(50px,-50px) scale(1.1); }
  66% { transform: translate(-30px,40px) scale(0.9); }
}
.hero-content { position: relative; z-index: 1; animation: slideUp 1s var(--transition); }
.badge-18 {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px;
  background: rgba(67,233,123,0.15);
  color: var(--success); font-size: 0.85rem; font-weight: 600;
  border: 1px solid rgba(67,233,123,0.3);
  margin-bottom: 24px;
}
.hero-title {
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}
.hero-sub {
  font-size: 1.15rem; color: var(--text-2); line-height: 1.6;
  margin-bottom: 32px; max-width: 540px;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats { display: flex; gap: 40px; }
.hero-stats > div { display: flex; flex-direction: column; }
.hero-stats strong {
  font-size: 2rem; font-weight: 800;
  background: var(--grad-primary);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-stats span { color: var(--text-3); font-size: 0.85rem; }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero visual - phone cards */
.hero-visual { position: relative; height: 500px; z-index: 1; }
.phone-card {
  position: absolute;
  width: 220px; height: 300px;
  background: var(--card);
  border-radius: 24px;
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: cardFloat 6s ease-in-out infinite;
}
.card-1 { top: 40px; left: 20%; z-index: 3; transform: rotate(-8deg); animation-delay: 0s; }
.card-2 { top: 80px; right: 15%; z-index: 2; transform: rotate(6deg); animation-delay: -2s; }
.card-3 { bottom: 20px; left: 40%; z-index: 1; transform: rotate(-3deg); animation-delay: -4s; }
@keyframes cardFloat {
  0%,100% { transform: rotate(var(--r,-8deg)) translateY(0); }
  50% { transform: rotate(var(--r,-8deg)) translateY(-20px); }
}
.card-1 { --r: -8deg; }
.card-2 { --r: 6deg; }
.card-3 { --r: -3deg; }
.pc-img { height: 65%; }
.pc-info { padding: 12px 16px; }
.pc-info strong { display: block; font-size: 1.1rem; }
.pc-info small { color: var(--text-2); font-size: 0.75rem; }
.pc-actions {
  position: absolute; bottom: 12px; right: 12px; display: flex; gap: 8px;
}
.pc-actions span {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: white; color: var(--danger);
  font-size: 1rem;
}
.pc-heart { color: var(--primary) !important; }

/* ==================== SECTIONS ==================== */
.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 60px;
  letter-spacing: -1px;
}
.features { padding: 100px 5%; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1200px; margin: 0 auto;
}
.feature-card {
  padding: 32px 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.4s var(--transition);
  position: relative; overflow: hidden;
}
.feature-card::before {
  content: ''; position: absolute; inset: 0;
  background: var(--grad-primary);
  opacity: 0; transition: opacity 0.4s;
  z-index: -1;
}
.feature-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255,75,125,0.3);
  box-shadow: var(--shadow);
}
.fc-icon {
  width: 60px; height: 60px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: white;
  margin-bottom: 20px;
}
.feature-card h3 { font-size: 1.25rem; margin-bottom: 12px; }
.feature-card p { color: var(--text-2); line-height: 1.6; }

.how { padding: 80px 5%; background: rgba(255,255,255,0.02); }
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  max-width: 1200px; margin: 0 auto;
}
.step {
  padding: 32px 24px;
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
  transition: transform 0.3s;
}
.step:hover { transform: scale(1.03); }
.step-n {
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--grad-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 800;
  margin: 0 auto 20px;
  box-shadow: var(--shadow-glow);
}
.step h3 { margin-bottom: 10px; }
.step p { color: var(--text-2); font-size: 0.9rem; }

.safety { padding: 80px 5%; }
.safety-inner { max-width: 800px; margin: 0 auto; }
.safety ul { list-style: none; margin-top: 20px; }
.safety li {
  padding: 16px 20px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 14px;
}
.safety li i { color: var(--success); }

.footer {
  padding: 40px 5%; text-align: center; color: var(--text-3);
  border-top: 1px solid var(--border);
}
.footer .small { font-size: 0.8rem; margin-top: 6px; opacity: 0.7; }

/* ==================== MODALS ==================== */
.modal {
  position: fixed; inset: 0;
  background: rgba(10,14,39,0.85);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  z-index: 500;
  padding: 20px;
  animation: fadeIn 0.3s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  background: linear-gradient(135deg, #1a1f4d 0%, #131841 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  max-width: 440px; width: 100%;
  position: relative;
  animation: modalPop 0.4s var(--transition);
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow);
}
.modal-card.wide { max-width: 560px; }
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: transparent; color: var(--text-2);
  font-size: 1.4rem; width: 36px; height: 36px; border-radius: 50%;
  transition: all 0.3s;
}
.modal-close:hover { background: var(--card-hover); color: var(--text); }
.modal-logo {
  font-weight: 800; font-size: 1.2rem; text-align: center;
  margin-bottom: 20px;
}
.modal-logo i { color: var(--primary); }
.modal-card h2 { font-size: 1.6rem; margin-bottom: 8px; }
.modal-icon-warn {
  width: 60px; height: 60px; border-radius: 50%;
  background: rgba(254,225,64,0.2); color: var(--warning);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 20px;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(254,225,64,0.4); }
  50% { box-shadow: 0 0 0 20px rgba(254,225,64,0); }
}
.modal-actions {
  display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px;
}

/* ==================== FORMS ==================== */
.field {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  transition: all 0.3s;
}
.field:focus-within {
  border-color: var(--primary);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 4px rgba(255,75,125,0.15);
}
.field i { color: var(--text-3); }
.field input, .field select {
  flex: 1;
  background: transparent; border: none; outline: none;
  color: var(--text); font-size: 0.95rem;
}
.field select { cursor: pointer; }
.field select option { background: #1a1f4d; }
.field.select select { appearance: none; }
.field.select::after {
  content: '\f078'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
  color: var(--text-3); font-size: 0.75rem;
  pointer-events: none;
}
.toggle-eye { cursor: pointer; }
textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  color: var(--text); font-size: 0.95rem;
  resize: vertical; outline: none;
  transition: all 0.3s;
}
textarea:focus { border-color: var(--primary); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lbl {
  display: block; margin: 14px 0 8px;
  color: var(--text-2); font-size: 0.9rem; font-weight: 500;
}
.lbl small { color: var(--text-3); font-weight: 400; }
.muted { color: var(--text-2); font-size: 0.9rem; margin-bottom: 20px; }
.muted.center { text-align: center; margin: 20px 0 0; }
.muted a { color: var(--primary); font-weight: 600; }
.checkbox {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin: 14px 0;
  font-size: 0.9rem; line-height: 1.5;
  transition: all 0.3s;
}
.checkbox:hover { background: rgba(255,255,255,0.05); }
.checkbox input { display: none; }
.checkbox span {
  min-width: 22px; width: 22px; height: 22px;
  border: 2px solid var(--border);
  border-radius: 6px;
  position: relative;
  transition: all 0.3s;
}
.checkbox input:checked + span {
  background: var(--grad-primary);
  border-color: transparent;
}
.checkbox input:checked + span::after {
  content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
  color: white; font-size: 0.8rem;
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
}
.error-msg {
  color: var(--danger);
  background: rgba(245,87,108,0.1);
  border: 1px solid rgba(245,87,108,0.3);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 12px;
  display: none;
}
.error-msg.show { display: block; animation: shake 0.4s; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* Registration steps */
.step-bar {
  display: flex; align-items: center; justify-content: center;
  gap: 4px; margin: 20px 0 28px;
}
.sb {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--card);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
  color: var(--text-3);
  transition: all 0.4s;
}
.sb.active {
  background: var(--grad-primary); color: white;
  box-shadow: var(--shadow-glow);
}
.sb.done { background: var(--success); color: white; }
.sb-line { width: 40px; height: 2px; background: var(--border); }
.reg-step { display: none; animation: fadeIn 0.4s; }
.reg-step.active { display: block; }
.reg-actions {
  display: flex; gap: 12px; justify-content: space-between; margin-top: 20px;
}
.reg-actions .btn { flex: 1; }

/* Vibe cards */
.vibe-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin: 16px 0;
}
.vibe-card { cursor: pointer; }
.vibe-card input { display: none; }
.vibe-inner {
  padding: 20px 12px; text-align: center;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.3s;
}
.vibe-card input:checked + .vibe-inner {
  border-color: var(--primary);
  background: rgba(255,75,125,0.1);
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}
.vibe-icon {
  width: 50px; height: 50px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: white;
  margin: 0 auto 12px;
}
.vibe-inner h3 { font-size: 1rem; margin-bottom: 4px; }
.vibe-inner p { font-size: 0.75rem; color: var(--text-2); }

/* Interest tags */
.interest-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 8px 0 12px;
}
.itag {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s;
  user-select: none;
}
.itag:hover { border-color: var(--primary); }
.itag.active {
  background: var(--grad-primary);
  border-color: transparent;
  color: white;
  transform: scale(1.05);
}

/* ==================== APP ==================== */
.app-screen { min-height: 100vh; padding-bottom: 80px; }
.app-header {
  position: sticky; top: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 16px 3%;
  background: rgba(10,14,39,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.app-logo { font-weight: 800; font-size: 1.15rem; }
.app-logo i { color: var(--primary); }
.app-nav {
  display: flex; gap: 4px;
  background: var(--card); border-radius: 999px;
  padding: 4px;
  overflow-x: auto; max-width: 100%;
  scrollbar-width: none; -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.app-nav::-webkit-scrollbar { display: none; }
.app-nav-btn {
  background: transparent;
  padding: 10px 20px; border-radius: 999px;
  color: var(--text-2); font-weight: 600; font-size: 0.9rem;
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0; white-space: nowrap;
  transition: all 0.3s;
}
.app-nav-btn:hover { color: var(--text); }
.app-nav-btn.active {
  background: var(--grad-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(255,75,125,0.4);
}
.tab { display: none; padding: 24px 3%; animation: fadeIn 0.4s; }
.tab.active { display: block; }
.tab-title {
  font-size: 1.6rem; margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.tab-title i { color: var(--primary); }

/* Filter bar */
.filter-bar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}
.filter-bar h3 {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.05rem; margin-bottom: 14px;
}
.filter-bar h3 i { color: var(--primary); }
.filter-chips {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px;
}
.chip {
  padding: 8px 16px; border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.85rem; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  transition: all 0.3s;
}
.chip:hover { color: var(--text); border-color: var(--primary); }
.chip.active {
  background: var(--grad-primary); color: white; border-color: transparent;
  box-shadow: 0 4px 12px rgba(255,75,125,0.3);
}
.filter-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.filter-row select {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text); font-size: 0.9rem;
  outline: none;
  cursor: pointer;
}
.filter-row select option { background: #1a1f4d; }

/* Discover grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.user-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.4s var(--transition);
  cursor: pointer;
  position: relative;
  animation: cardIn 0.5s var(--transition) backwards;
}
.user-card:nth-child(1) { animation-delay: 0.05s; }
.user-card:nth-child(2) { animation-delay: 0.1s; }
.user-card:nth-child(3) { animation-delay: 0.15s; }
.user-card:nth-child(4) { animation-delay: 0.2s; }
.user-card:nth-child(5) { animation-delay: 0.25s; }
.user-card:nth-child(6) { animation-delay: 0.3s; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.user-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(255,75,125,0.3);
}
.uc-photo {
  height: 280px;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem; font-weight: 800; color: white;
  position: relative;
}
.uc-photo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.7) 100%);
}
.uc-badge {
  position: absolute; top: 12px; right: 12px;
  padding: 5px 12px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: white; z-index: 1;
  backdrop-filter: blur(8px);
}
.uc-badge.dating { background: rgba(255,75,125,0.85); }
.uc-badge.friendship { background: rgba(79,172,254,0.85); }
.uc-badge.hookup { background: rgba(250,112,154,0.85); }
.uc-body { padding: 16px; }
.uc-name {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.uc-name strong { font-size: 1.1rem; }
.uc-name .age { color: var(--text-2); font-size: 0.95rem; }
.uc-meta { color: var(--text-2); font-size: 0.85rem; margin-bottom: 8px; }
.uc-meta i { color: var(--primary); margin-right: 4px; }
.uc-bio {
  color: var(--text-2); font-size: 0.85rem; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 10px;
}
.uc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.uc-tag {
  font-size: 0.7rem; padding: 3px 10px; border-radius: 999px;
  background: rgba(255,75,125,0.15);
  color: var(--primary);
}
.uc-actions {
  display: flex; gap: 8px; padding: 0 16px 16px;
}
.uc-actions button {
  flex: 1; padding: 10px;
  border-radius: 999px;
  font-weight: 600; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all 0.3s;
}
.uc-skip {
  background: rgba(255,255,255,0.05); color: var(--text-2);
  border: 1px solid var(--border);
}
.uc-skip:hover { background: rgba(255,255,255,0.08); }
.uc-like {
  background: var(--grad-primary); color: white;
  box-shadow: 0 4px 15px rgba(255,75,125,0.3);
}
.uc-like:hover { transform: scale(1.05); }
.match-badge {
  position: absolute; inset: 0;
  background: rgba(10,14,39,0.95); backdrop-filter: blur(10px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: white; text-align: center;
  animation: matchBoom 0.6s var(--transition);
  z-index: 5;
}
@keyframes matchBoom {
  0% { opacity: 0; transform: scale(0.5); }
  50% { transform: scale(1.1); }
  100% { opacity: 1; transform: scale(1); }
}
.match-badge i { font-size: 4rem; color: var(--primary); animation: heartbeat 1s infinite; }
.match-badge h3 { font-size: 2rem; margin: 10px 0; }

.empty {
  text-align: center; padding: 60px 20px; color: var(--text-2);
}
.empty i { font-size: 3rem; color: var(--text-3); margin-bottom: 16px; }
.empty h3 { margin-bottom: 8px; color: var(--text); }

/* Matches */
.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}
.match-card {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden; cursor: pointer;
  transition: all 0.3s;
}
.match-card:hover { transform: scale(1.05); border-color: var(--primary); }
.mc-photo {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; font-weight: 800; color: white;
}
.mc-body { padding: 10px 12px; }
.mc-body strong { font-size: 0.9rem; display: block; }
.mc-body small { color: var(--text-2); font-size: 0.75rem; }

/* Chat */
.chat-wrap {
  display: grid; grid-template-columns: 280px 1fr; gap: 16px;
  height: calc(100vh - 180px); min-height: 500px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.chat-list { border-right: 1px solid var(--border); overflow-y: auto; padding: 16px; }
.chat-list h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-size: 1.05rem; }
.chat-list h3 i { color: var(--primary); }
.chat-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.3s;
  margin-bottom: 4px;
}
.chat-item:hover { background: var(--card-hover); }
.chat-item.active { background: rgba(255,75,125,0.15); }
.chat-item .avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700;
}
.chat-item strong { display: block; font-size: 0.9rem; }
.chat-item small { color: var(--text-2); font-size: 0.75rem; }
.chat-main { display: flex; flex-direction: column; }
.chat-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--text-3); gap: 12px;
}
.chat-empty i { font-size: 3rem; }
.chat-active { flex: 1; display: flex; flex-direction: column; }
.chat-active header {
  padding: 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.chat-active header .avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700;
}
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.msg {
  max-width: 70%; padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.9rem; line-height: 1.5;
  animation: msgIn 0.3s;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.msg.mine { align-self: flex-end; background: var(--grad-primary); color: white; border-bottom-right-radius: 4px; }
.msg.theirs { align-self: flex-start; background: rgba(255,255,255,0.08); border-bottom-left-radius: 4px; }
.chat-input {
  display: flex; gap: 10px; padding: 14px;
  border-top: 1px solid var(--border);
}
.chat-input input {
  flex: 1; background: rgba(255,255,255,0.05);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 12px 18px; color: var(--text); outline: none;
}
.chat-input input:focus { border-color: var(--primary); }

/* Profile */
.profile-card {
  max-width: 500px; margin: 0 auto;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden; text-align: center;
  padding-bottom: 30px;
}
.profile-cover {
  height: 140px;
  background: var(--grad-primary);
}
.profile-avatar {
  width: 100px; height: 100px; border-radius: 50%;
  margin: -50px auto 16px;
  background: var(--grad-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; font-weight: 800;
  border: 4px solid var(--bg-1);
}
.profile-card h2 { margin-bottom: 4px; }
.profile-info {
  display: flex; justify-content: center; gap: 20px;
  margin: 20px 0; flex-wrap: wrap;
  color: var(--text-2); font-size: 0.9rem;
}
.profile-info i { color: var(--primary); margin-right: 4px; }
.bio { padding: 0 30px; margin-bottom: 16px; color: var(--text-2); font-style: italic; }
.tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; padding: 0 30px 20px;
}
.tags span {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255,75,125,0.15);
  color: var(--primary);
  font-size: 0.8rem; font-weight: 500;
}

/* Chatbot */
.bot-toggle {
  position: fixed; bottom: 24px; right: 24px;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--grad-primary);
  color: white;
  font-size: 1.5rem;
  box-shadow: 0 10px 30px rgba(255,75,125,0.4);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.3s;
}
.bot-toggle:hover { transform: scale(1.1) rotate(15deg); }
.bot-pulse {
  position: absolute; inset: 0; border-radius: 50%;
  background: var(--primary);
  animation: botPulse 2s infinite;
  z-index: -1;
}
@keyframes botPulse {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.5); opacity: 0; }
}
.bot-window {
  position: fixed; bottom: 100px; right: 24px;
  width: 360px; max-width: calc(100vw - 32px);
  height: 500px; max-height: calc(100vh - 140px);
  background: linear-gradient(135deg, #1a1f4d 0%, #131841 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
  z-index: 200;
  animation: botIn 0.4s var(--transition);
}
@keyframes botIn {
  from { opacity: 0; transform: translateY(20px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.bot-header {
  padding: 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.bot-header > div { display: flex; align-items: center; gap: 12px; }
.bot-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--grad-primary); color: white;
  display: flex; align-items: center; justify-content: center;
}
.bot-header strong { display: block; }
.bot-header small { color: var(--success); font-size: 0.75rem; }
.bot-header button {
  background: transparent; color: var(--text-2); font-size: 1.2rem;
  width: 32px; height: 32px; border-radius: 50%;
}
.bot-header button:hover { background: var(--card-hover); color: var(--text); }
.bot-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.bot-msg { display: flex; }
.bot-msg span {
  padding: 10px 14px; border-radius: 16px;
  font-size: 0.88rem; line-height: 1.5;
  max-width: 85%;
  animation: msgIn 0.3s;
}
.bot-msg.bot { justify-content: flex-start; }
.bot-msg.bot span {
  background: rgba(255,255,255,0.08);
  border-bottom-left-radius: 4px;
}
.bot-msg.user { justify-content: flex-end; }
.bot-msg.user span {
  background: var(--grad-primary); color: white;
  border-bottom-right-radius: 4px;
}
.bot-msg.typing span {
  background: rgba(255,255,255,0.08);
  padding: 14px 18px;
}
.bot-msg.typing span::after {
  content: '...';
  animation: typing 1.2s infinite;
}
@keyframes typing {
  0% { content: '.'; }
  33% { content: '..'; }
  66% { content: '...'; }
}
.bot-input {
  display: flex; gap: 8px; padding: 12px;
  border-top: 1px solid var(--border);
}
.bot-input input {
  flex: 1; background: rgba(255,255,255,0.05);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 10px 16px; color: var(--text); outline: none; font-size: 0.9rem;
}
.bot-input input:focus { border-color: var(--primary); }

/* Toast */
.toast {
  position: fixed; top: 20px; left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: linear-gradient(135deg, #1a1f4d, #131841);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 24px;
  color: var(--text);
  font-weight: 500;
  z-index: 1000;
  box-shadow: var(--shadow);
  transition: transform 0.4s var(--transition);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
  .nav-links {
    position: fixed; top: 70px; left: 0; right: 0;
    background: rgba(10,14,39,0.98);
    backdrop-filter: blur(20px);
    flex-direction: column; padding: 30px;
    gap: 20px;
    transform: translateY(-120%);
    transition: transform 0.4s var(--transition);
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-toggle { display: block; }
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 40px; }
  .hero-visual { height: 400px; margin-top: 20px; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .card-1 { left: 5%; }
  .card-2 { right: 5%; }
  .card-3 { left: 30%; }
  .app-nav-btn span { display: none; }
  .app-nav-btn { padding: 10px 14px; }
  .chat-wrap { grid-template-columns: 1fr; }
  .chat-list { border-right: none; border-bottom: 1px solid var(--border); max-height: 200px; }
  .vibe-grid { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
  .modal-card { padding: 28px 22px; }
  .filter-row { grid-template-columns: 1fr; }
}

@media (max-width: 500px) {
  .hero-title { font-size: 2.2rem; }
  .btn-big { padding: 14px 24px; font-size: 0.95rem; }
  .hero-stats { gap: 20px; }
  .hero-stats strong { font-size: 1.5rem; }
  .app-header { padding: 12px 3%; }
  .app-nav { padding: 3px; }
  .app-nav-btn { padding: 8px 12px; font-size: 0.85rem; }
  .cards-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .uc-photo { height: 200px; font-size: 3rem; }
  .uc-body { padding: 12px; }
  .uc-actions { padding: 0 12px 12px; }
  .matches-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .bot-window { width: calc(100vw - 24px); right: 12px; bottom: 90px; height: 70vh; }
  .bot-toggle { bottom: 16px; right: 16px; width: 54px; height: 54px; }
  .flash-title { font-size: 2.2rem; }
  .modal { padding: 12px; }
  .modal-card { padding: 24px 18px; }
  .feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .cards-grid { grid-template-columns: 1fr; }
}

/* ==================== DASHBOARD (HOME) ==================== */
.dash-hero {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 24px 28px; margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(255,75,125,0.16), rgba(196,77,255,0.10) 55%, rgba(79,172,254,0.10));
  border: 1px solid rgba(255,75,125,0.25);
  border-radius: var(--radius);
}
.dash-hero h2 { font-size: 1.6rem; letter-spacing: -0.5px; }
.dash-hero .muted { margin-bottom: 0; }
.dash-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dash-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px;
}
.stat-card {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer; transition: all 0.3s var(--transition);
}
.stat-card:hover { transform: translateY(-4px); border-color: rgba(255,75,125,0.35); box-shadow: var(--shadow); }
.stat-ic {
  width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.2rem;
}
.stat-card strong { display: block; font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.stat-card span { color: var(--text-2); font-size: 0.8rem; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-panel {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.dash-panel h3 {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.05rem; margin-bottom: 16px;
}
.dash-panel h3 i { color: var(--primary); }
.mini-members { display: flex; flex-wrap: wrap; gap: 14px; }
.mini-member { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; transition: transform 0.25s; width: 64px; text-align: center; }
.mini-member:hover { transform: translateY(-4px); }
.mini-avatar-wrap { position: relative; }
.mini-member small { color: var(--text-2); font-size: 0.72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 64px; }
.trend-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px; border-radius: var(--radius-sm);
  cursor: pointer; transition: background 0.25s;
}
.trend-item:hover { background: var(--card-hover); }
.trend-body { flex: 1; min-width: 0; }
.trend-body strong { font-size: 0.9rem; }
.trend-body p { color: var(--text-2); font-size: 0.83rem; margin: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trend-body small { color: var(--text-3); font-size: 0.75rem; }
.trend-body small i { color: var(--primary); }

/* ==================== NOTIFICATION BAR ==================== */
.header-right { display: flex; align-items: center; gap: 10px; }
.notif-wrap { position: relative; }
.notif-bell { position: relative; }
.notif-bell:hover { background: var(--card-hover); }
.notif-count {
  position: absolute; top: -5px; right: -5px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px;
  background: var(--grad-primary); color: #fff;
  font-size: 0.65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 10px rgba(255,75,125,0.6);
  animation: notifPop 0.4s var(--transition);
}
@keyframes notifPop { from { transform: scale(0); } to { transform: scale(1); } }
.notif-panel {
  position: absolute; top: 52px; right: 0;
  width: 340px; max-width: calc(100vw - 24px);
  max-height: 420px; overflow-y: auto;
  background: linear-gradient(135deg, #1a1f4d 0%, #131841 100%);
  border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); z-index: 300;
  animation: modalPop 0.25s var(--transition);
}
.notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: inherit; border-radius: 16px 16px 0 0;
}
.notif-head i { color: var(--primary); }
.notif-clear { background: transparent; color: var(--accent-2); font-size: 0.75rem; font-weight: 600; }
.notif-clear:hover { text-decoration: underline; }
.notif-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.25s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--card-hover); }
.notif-item.unread { background: rgba(255,75,125,0.07); }
.notif-item.unread .notif-body p { font-weight: 600; }
.notif-ic {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,75,125,0.15); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 0.85rem;
}
.notif-body { flex: 1; min-width: 0; }
.notif-body p { font-size: 0.85rem; line-height: 1.4; }
.notif-body small { color: var(--text-3); font-size: 0.72rem; }

/* ==================== NAV BADGE ==================== */
.nav-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--danger); color: #fff;
  font-size: 0.65rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ==================== FEED / POSTS ==================== */
.composer {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 20px;
  max-width: 720px; margin-left: auto; margin-right: auto; margin-bottom: 20px;
}
.composer-top { display: flex; gap: 12px; align-items: flex-start; }
.composer-top textarea { flex: 1; }
.composer-preview { margin: 12px 0 0; position: relative; }
.composer-preview img, .composer-preview video {
  max-width: 100%; max-height: 280px; border-radius: var(--radius-sm);
  display: block;
}
.preview-remove {
  position: absolute; top: 8px; right: 8px;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(0,0,0,0.65); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.composer-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.composer-tools { display: flex; gap: 8px; }
.tool-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  color: var(--text-2); font-size: 0.82rem; font-weight: 600;
  transition: all 0.25s;
}
.tool-btn:hover { color: var(--text); border-color: var(--primary); }
.tool-btn .fa-image { color: var(--success); }
.tool-btn .fa-video { color: var(--accent); }
.feed-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.post-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  animation: cardIn 0.4s var(--transition) backwards;
}
.post-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.post-head .avatar { cursor: pointer; }
.ph-info { flex: 1; min-width: 0; }
.ph-info strong { display: block; font-size: 0.95rem; }
.ph-info small { color: var(--text-3); font-size: 0.75rem; }
.post-text { color: var(--text); font-size: 0.95rem; line-height: 1.6; margin-bottom: 10px; white-space: pre-wrap; }
.post-media { margin: 8px 0; border-radius: var(--radius-sm); overflow: hidden; }
.post-media img { width: 100%; display: block; cursor: zoom-in; }
.post-media video { width: 100%; max-height: 420px; display: block; background: #000; }
.post-actions { display: flex; gap: 6px; border-top: 1px solid var(--border); padding-top: 8px; margin-top: 8px; }
.pa-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-2);
  font-size: 0.85rem; font-weight: 600; transition: all 0.25s;
}
.pa-btn:hover { background: var(--card-hover); color: var(--text); }
.pa-btn.liked { color: var(--primary); }
.pa-btn.liked i { animation: heartbeat 0.6s; }
.comment-list { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.comment { display: flex; gap: 10px; align-items: flex-start; }
.comment-av {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.7rem; font-weight: 700;
}
.comment-body { background: rgba(255,255,255,0.05); border-radius: 12px; padding: 8px 12px; flex: 1; }
.comment-body strong { font-size: 0.8rem; }
.comment-body p { font-size: 0.85rem; color: var(--text-2); margin-top: 1px; }
.comment-body small { color: var(--text-3); font-size: 0.68rem; }
.comment-input { display: flex; gap: 8px; margin-top: 10px; }
.comment-input input {
  flex: 1; background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  border-radius: 999px; padding: 9px 16px; color: var(--text); outline: none; font-size: 0.85rem;
}
.comment-input input:focus { border-color: var(--primary); }
.btn-round.sm { width: 38px; height: 38px; padding: 8px; font-size: 0.85rem; }
.btn-icon.sm { width: 34px; height: 34px; font-size: 0.85rem; }

/* ==================== EDIT PROFILE ==================== */
.ep-avatar-row { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.ep-avatar-row .btn { margin-bottom: 4px; }
.ep-avatar { margin: 0 !important; width: 84px; height: 84px; font-size: 1.8rem; flex-shrink: 0; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.pg-item {
  aspect-ratio: 1; border-radius: var(--radius-sm);
  background-size: cover; background-position: center;
  cursor: zoom-in; position: relative;
  border: 1px solid var(--border);
  transition: transform 0.25s;
}
.pg-item:hover { transform: scale(1.03); }
.pg-remove {
  position: absolute; top: 5px; right: 5px;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0,0,0,0.7); color: #fff; font-size: 0.7rem;
  display: flex; align-items: center; justify-content: center;
}
.pg-remove:hover { background: var(--danger); }
.photo-add {
  aspect-ratio: 1; border-radius: var(--radius-sm);
  border: 2px dashed var(--border); background: rgba(255,255,255,0.03);
  color: var(--text-3); font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s;
}
.photo-add:hover { border-color: var(--primary); color: var(--primary); }
.profile-section { padding: 0 26px; margin-top: 22px; text-align: left; }
.profile-section h3 {
  display: flex; align-items: center; gap: 10px;
  font-size: 1rem; margin-bottom: 12px;
}
.profile-section h3 i { color: var(--primary); }
.profile-section .post-card { margin-bottom: 12px; }

/* ==================== USER PROFILE VIEW ==================== */
.upv-card { max-width: 620px; padding: 0 0 26px; overflow-x: hidden; }
.upv-card .modal-close { z-index: 5; background: rgba(0,0,0,0.4); color: #fff; }
.upv-cover { height: 120px; background: var(--grad-primary); border-radius: 24px 24px 0 0; }
.upv-avatar-wrap { position: relative; width: 96px; margin: -48px auto 0; }
.upv-avatar {
  width: 96px; height: 96px; border-radius: 50%;
  background: var(--grad-primary);
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; font-weight: 800; color: #fff;
  border: 4px solid var(--bg-1);
}
.upv-card h2, .upv-card > .bio, .upv-card .muted { text-align: center; }
#userProfileBody h2 { text-align: center; }
#userProfileBody > .muted, #userProfileBody > .bio { text-align: center; display: block; }
#userProfileBody .tags { justify-content: center; }
.upv-actions { display: flex; gap: 10px; justify-content: center; margin: 6px 0 8px; padding: 0 20px; }
.upv-actions .btn { flex: 1; max-width: 220px; }
.upv-sub { text-align: left; padding: 16px 22px 0; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.upv-sub i { color: var(--primary); }
#userProfileBody .photo-grid { padding: 12px 22px 0; }
#upvPosts { padding: 12px 22px 0; display: flex; flex-direction: column; gap: 12px; }

/* ==================== LIGHTBOX ==================== */
.lightbox {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(5,7,20,0.92); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: fadeIn 0.25s;
  cursor: zoom-out;
}
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 14px; box-shadow: var(--shadow); }
.lightbox video { max-width: 92vw; max-height: 88vh; border-radius: 14px; }
.lightbox-close {
  position: absolute; top: 18px; right: 18px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.1); color: #fff; font-size: 1.2rem;
}

/* ==================== ONLINE / CHAT PRO ==================== */
.online-dot {
  position: absolute; bottom: 4px; right: 4px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--success); border: 2px solid var(--bg-1);
  box-shadow: 0 0 8px rgba(67,233,123,0.8);
  z-index: 2;
}
.online-dot.sm { width: 10px; height: 10px; bottom: 0; right: 0; }
.uc-photo .online-dot { top: 12px; bottom: auto; left: 12px; right: auto; }
.online-txt { color: var(--success); font-weight: 600; }
.ci-avatar-wrap { position: relative; flex-shrink: 0; }
.ci-body { flex: 1; min-width: 0; }
.ci-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ci-top small { color: var(--text-3); font-size: 0.7rem; flex-shrink: 0; }
.ci-preview {
  color: var(--text-3); font-size: 0.78rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ci-preview.unread { color: var(--text); font-weight: 600; }
.unread-badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--grad-primary); color: #fff;
  font-size: 0.68rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.avatar.sm { width: 34px; height: 34px; font-size: 0.8rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; flex-shrink: 0; background-size: cover; background-position: center; }
.chat-item .avatar { background-size: cover; background-position: center; flex-shrink: 0; }
.ch-info { flex: 1; min-width: 0; }
.ch-actions { display: flex; gap: 8px; }
.msg { display: flex; flex-direction: column; }
.msg-meta { font-size: 0.65rem; opacity: 0.7; margin-top: 3px; align-self: flex-end; }
.tick-read { color: #8be9fd; }
.mc-actions {
  display: flex; gap: 6px; padding: 0 10px 10px;
}
.mc-actions button {
  flex: 1; padding: 7px; border-radius: 999px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  color: var(--text-2); font-size: 0.78rem; transition: all 0.25s;
}
.mc-actions button:hover { color: #fff; border-color: var(--primary); background: rgba(255,75,125,0.15); }
.uc-view {
  background: rgba(79,172,254,0.15); color: var(--accent);
  border: 1px solid rgba(79,172,254,0.35);
}
.uc-view:hover { background: rgba(79,172,254,0.28); }
.uc-photo { background-size: cover; background-position: center; cursor: pointer; }

/* ==================== RESPONSIVE EXTRAS ==================== */
@media (max-width: 900px) {
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-hero { padding: 18px; }
  .notif-panel { position: fixed; top: 64px; right: 12px; left: 12px; width: auto; }
}
@media (max-width: 500px) {
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .upv-actions { flex-direction: column; }
  .upv-actions .btn { max-width: none; }
  .ep-avatar-row { flex-direction: column; align-items: flex-start; }
  .composer-actions { flex-direction: column; gap: 10px; align-items: stretch; }
  .composer-tools { justify-content: center; }
}

/* ==================== UPGRADES: Settings, Dislike, Views ==================== */
.dash-stats { grid-template-columns: repeat(5, 1fr); }
.settings-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 18px; }
.settings-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.settings-card h3 {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.05rem; margin-bottom: 16px; color: var(--text);
}
.settings-card h3 i { color: var(--primary); }
.switch-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--border);
  cursor: pointer; font-size: 0.9rem; color: var(--text-2);
}
.switch-row:last-of-type { border-bottom: none; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; margin-left: 12px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i {
  position: absolute; cursor: pointer; inset: 0;
  background: rgba(255,255,255,0.12); border-radius: 26px;
  transition: background 0.3s var(--transition);
}
.switch i::before {
  content: ''; position: absolute; height: 20px; width: 20px;
  left: 3px; top: 3px; border-radius: 50%;
  background: #fff; transition: transform 0.3s var(--transition);
}
.switch input:checked + i { background: var(--grad-primary); }
.switch input:checked + i::before { transform: translateX(20px); }
.settings-card .field { margin-bottom: 12px; }
.danger-btn { background: rgba(245,87,108,0.15); color: var(--danger); border: 1px solid rgba(245,87,108,0.4); margin-top: 8px; }
.danger-btn:hover { background: rgba(245,87,108,0.3); }
.pa-btn.disliked { color: #f5a65b; }
.pa-btn.disliked i { animation: heartbeat 0.5s; }
.comment-del { color: var(--text-3); opacity: 0; transition: opacity 0.2s; }
.comment:hover .comment-del { opacity: 1; }
.comment-del:hover { color: var(--danger); }
.post-edit { color: var(--text-3); }
.post-edit:hover { color: var(--accent); }
.dash-panel .small { font-size: 0.78rem; margin: -8px 0 12px; }
.mic-btn { flex-shrink: 0; }
.mic-btn.listening { color: var(--danger); animation: pulse 1s infinite; }
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(245,87,108,0.5); }
  50% { box-shadow: 0 0 0 8px rgba(245,87,108,0); }
}
@media (max-width: 1100px) { .dash-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .dash-stats { grid-template-columns: repeat(2, 1fr); } }

/* ==================== RESPONSIVE FIT (desktop + mobile) ====================
   Guarantees every screen shows ALL content — nothing clipped,
   cut off, hidden or overflowing on any device. */

/* Small laptops / large tablets: icon-only nav so the whole header fits on one row */
@media (max-width: 1180px) {
  .app-logo { font-size: 1rem; }
  .app-nav-btn span { display: none; }
  .app-nav-btn { padding: 10px 13px; }
}

@media (max-width: 900px) {
  .hero { min-height: auto; padding: 40px 5% 70px; }
  .hero-visual { height: 340px; }
  .phone-card { width: 180px; height: 250px; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .app-header { gap: 8px; }

  /* Chat: full-screen conversation pane on mobile — nothing squashed or hidden.
     Use dynamic viewport (dvh) so the input never hides behind the mobile URL bar. */
  #tab-chat { padding: 12px 3% 16px; }
  .chat-wrap {
    display: block;
    height: calc(100dvh - 130px);
    min-height: 380px;
    border-radius: var(--radius);
  }
  .chat-list { border-right: none; max-height: none; height: 100%; overflow-y: auto; }
  .chat-main { display: none; height: 100%; }
  .chat-wrap.chat-open .chat-list { display: none; }
  .chat-wrap.chat-open .chat-main { display: flex; }
  .chat-active { height: 100%; min-height: 0; }
  .chat-active header {
    position: sticky; top: 0; z-index: 3;
    background: linear-gradient(180deg, rgba(21,26,69,0.98), rgba(19,24,65,0.96));
    backdrop-filter: blur(14px);
    padding: 12px 14px;
  }
  .chat-messages {
    min-height: 0; flex: 1 1 auto;
    padding: 14px 12px 12px;
    -webkit-overflow-scrolling: touch;
  }
  .chat-input {
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
    gap: 8px;
    background: rgba(10,14,39,0.65);
    position: sticky; bottom: 0; z-index: 2;
  }
  .chat-input input { padding: 12px 16px; font-size: 16px; }
  .msg { max-width: 85%; }

  /* Back-to-conversations button, mobile only */
  .chat-back-btn { display: inline-flex !important; }

  /* Hide floating bot while chat is active or a drawer is open, so it never covers the input */
  .chat-wrap.chat-open ~ * .bot-toggle,
  body.chat-open .bot-toggle,
  body.menu-open .bot-toggle { display: none !important; }
}

@media (max-width: 500px) {
  /* Modals use the full screen so every word, field and option stays visible */
  .modal { padding: 0; align-items: stretch; }
  .modal-card {
    max-width: none; width: 100%; min-height: 100%;
    max-height: none; border-radius: 0; border-left: none; border-right: none;
    padding: 56px 18px 28px; overflow-y: auto;
  }
  .upv-card { padding-bottom: 24px; }
  .upv-cover { border-radius: 0; }

  /* Grids adapt instead of clipping cards */
  .matches-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }

  /* Header & tabs breathe on small screens */
  .tab { padding: 16px 3%; }
  .app-header { padding: 10px 3%; }
  .app-nav-btn { padding: 9px 11px; }

  .msg { max-width: 88%; }
  .toast { max-width: calc(100vw - 32px); text-align: center; }
  .notif-panel { top: 60px; }
  .chat-wrap { height: calc(100dvh - 120px); border-radius: var(--radius-sm); }
  .settings-wrap { grid-template-columns: 1fr; }

  /* Tighter chat header on very small screens so the name never gets clipped */
  .chat-active header { padding: 10px 12px; gap: 8px; }
  .chat-active header .ch-info strong { font-size: 0.95rem; }
  .chat-active header .ch-actions { gap: 6px; }
  .chat-active header .btn-icon.sm { width: 32px; height: 32px; font-size: 0.8rem; }

  /* Notification panel becomes full-width on tiny screens */
  .notif-panel { left: 8px; right: 8px; width: auto; }
}

@media (max-width: 380px) {
  .app-logo { font-size: 0.95rem; }
  .btn-icon { width: 36px; height: 36px; }
}

/* Safe-area padding for notched phones */
@supports (padding: max(0px)) {
  .app-screen { padding-bottom: max(80px, env(safe-area-inset-bottom)); }
}

/* ==================== PROFESSIONAL MOBILE NAV & PERFECT MOBILE FIT ==================== */
.row.one, .filter-row.one { grid-template-columns: 1fr; }

/* Hamburger / close buttons (desktop: hidden) */
.app-menu-toggle, .app-menu-close, .nav-close { display: none; }
.menu-scrim {
  position: fixed; inset: 0;
  background: rgba(5,7,20,0.6);
  backdrop-filter: blur(3px);
  z-index: 650;
  animation: fadeIn 0.25s;
  cursor: pointer;
}
body.menu-open { overflow: hidden; }

@media (max-width: 900px) {
  /* --- Landing nav becomes a full-height slide-down drawer with a close button --- */
  .nav-links {
    top: 0; bottom: 0; left: 0; right: 0;
    height: 100dvh;
    padding: 90px 30px 34px;
    justify-content: flex-start;
    align-items: center;
    transform: translateY(-100%);
    z-index: 600;
    overflow-y: auto;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { font-size: 1.1rem; }
  .nav-links .btn { width: 100%; max-width: 320px; }
  .nav-close {
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: 18px; right: 18px;
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--card); border: 1px solid var(--border);
    color: var(--text); font-size: 1.25rem;
    transition: all 0.25s;
  }
  .nav-close:hover { background: var(--danger); color: #fff; transform: rotate(90deg); }
  .nav { z-index: 650; }
  .nav-toggle { position: relative; z-index: 651; }

  /* --- Dashboard nav: NO hamburger — an always-visible Facebook-style tab bar.
         Every tab button stays on screen, none hidden, none overflowing. --- */
  .app-header { flex-wrap: wrap; row-gap: 10px; }
  .app-nav {
    order: 3;
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 4px;
    overflow-x: visible;
  }
  .app-nav-btn {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    padding: 10px 4px;
  }
  .app-nav-btn span { display: none; }
}

/* ==================== MOBILE FIT: nothing clipped, squashed or hidden ==================== */
@media (max-width: 600px) {
  /* Discover cards: one full-width card per row — every button & word visible */
  .cards-grid { grid-template-columns: 1fr; gap: 16px; }
  .uc-photo { height: 280px; font-size: 3.4rem; }
  .uc-body { padding: 14px 16px; }
  .uc-actions { padding: 0 16px 16px; gap: 8px; }
  .uc-actions button { padding: 12px 10px; font-size: 0.88rem; }

  /* Dashboard buttons never overflow the screen */
  .dash-hero-actions { width: 100%; }
  .dash-hero-actions .btn { flex: 1; }
  .stat-card { padding: 14px; }
  .stat-ic { width: 42px; height: 42px; font-size: 1.05rem; }

  /* Prevent iOS auto-zoom & keep everything readable */
  .field input, .field select, textarea,
  .chat-input input, .comment-input input, .bot-input input,
  .filter-row select { font-size: 16px; }
}

/* ==================== INSTAGRAM-STYLE POSTS ==================== */
.post-card { max-width: 540px; width: 100%; margin-left: auto; margin-right: auto; }
.feed-list { align-items: center; }
.feed-list .post-card { width: 100%; }
.post-media {
  margin: 8px -16px;
  border-radius: 0;
  background: #05070f;
}
.post-media img {
  width: 100%; display: block; cursor: zoom-in;
  aspect-ratio: 4 / 5; object-fit: cover;
}
.post-media video { width: 100%; max-height: 480px; display: block; background: #000; }

/* ==================== CHAT BACK / MOBILE POLISH ==================== */
.chat-back-btn {
  display: none;
  align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--border);
  color: var(--text); font-size: 0.95rem;
  margin-right: 4px; flex-shrink: 0;
  transition: all 0.25s;
}
.chat-back-btn:hover { background: var(--primary); color: #fff; border-color: transparent; transform: translateX(-2px); }

/* Prevent iOS input auto-zoom in composer / bot on tiny devices */
@media (max-width: 500px) {
  .composer textarea, .comment-input input, .bot-input input,
  #chatText { font-size: 16px; }
  .composer-actions { gap: 10px; }
  .composer-tools { flex-wrap: wrap; }
  .tab-title { font-size: 1.35rem; }
  .dash-hero h2 { font-size: 1.35rem; }
  .dash-hero { padding: 16px; }
  .filter-bar { padding: 16px; }
  .profile-card { padding-bottom: 22px; }
  .profile-section { padding: 0 16px; }
  .bio { padding: 0 16px; }
  .tags { padding: 0 16px 16px; }
  /* keep hero visual from pushing content on very small screens */
  .hero-visual { height: 300px; }
  .card-1, .card-2, .card-3 { transform: scale(0.85) rotate(var(--r)); }
}

/* Reveal the back button only when we're inside an open chat, on small screens */
@media (max-width: 900px) {
  .chat-wrap.chat-open .chat-back-btn { display: inline-flex; }
}

/* ==================== CHAT: IMAGE MESSAGES + ATTACHMENT ==================== */
.chat-input {
  position: relative;
}
.chat-input .chat-attach-btn {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-2); font-size: 1rem;
  cursor: pointer; flex-shrink: 0;
  transition: all 0.25s;
}
.chat-input .chat-attach-btn:hover { color: var(--primary); border-color: var(--primary); background: rgba(255,75,125,0.08); }
.chat-input .chat-attach-btn.has-img { color: var(--primary); border-color: var(--primary); }

.chat-attach-preview {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px); left: 12px;
  width: 92px; height: 92px;
  border-radius: 12px;
  background-size: cover; background-position: center;
  border: 2px solid var(--primary);
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  overflow: hidden;
  z-index: 5;
}
.chat-attach-preview.show { display: block; }
.chat-attach-preview .cap-remove {
  position: absolute; top: 4px; right: 4px;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0,0,0,0.65); color: #fff;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
}
.chat-attach-preview .cap-remove:hover { background: var(--danger); }

.msg.has-image { padding: 6px 6px 8px 6px; }
.msg .msg-image {
  display: block;
  max-width: 260px;
  width: 100%;
  border-radius: 12px;
  cursor: zoom-in;
  margin-bottom: 4px;
}
.msg .msg-image + .msg-text:empty { display: none; }
.msg .msg-text { padding: 0 8px; word-wrap: break-word; overflow-wrap: anywhere; }
.msg .msg-meta { padding: 0 8px; }

/* Chat input error/blocked feedback (numbers blocked) */
.chat-input.blocked input {
  border-color: var(--danger) !important;
  animation: shakeX 0.35s;
  background: rgba(245,87,108,0.08);
}
@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.chat-input .chat-hint {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 12px;
  background: rgba(245,87,108,0.95);
  color: #fff;
  font-size: 0.78rem; font-weight: 600;
  padding: 6px 12px; border-radius: 20px;
  box-shadow: 0 4px 12px rgba(245,87,108,0.35);
  opacity: 0; pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.25s, transform 0.25s;
}
.chat-input .chat-hint.show { opacity: 1; transform: translateY(0); }

/* ==================== HEADER FIT ON EVERY SCREEN ==================== */
@media (max-width: 900px) {
  /* The dashboard nav is now an always-visible tab bar inside the header —
     every tab stays clickable and nothing can cover it. */
  .app-header { position: sticky; z-index: 500; }
  .app-nav .app-nav-btn { pointer-events: auto !important; }
}

/* Very small phones: shrink header text so the whole bar still fits on screen */
@media (max-width: 420px) {
  .app-logo { font-size: 0.9rem; }
  .app-nav-btn { padding: 8px 2px; }
}

/* ==================== SUBSCRIPTION / WALLET / VERIFIED BADGE ==================== */
/* Verified (Instagram-style) blue tick */
.verified-tick {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1em; height: 1em; margin-left: 4px;
  background: linear-gradient(135deg,#1da1f2,#0d8ddc);
  color: #fff; border-radius: 50%;
  font-size: 0.72em; line-height: 1;
  box-shadow: 0 2px 6px rgba(29,161,242,0.5);
  vertical-align: middle;
}
.verified-tick i { font-size: 0.62em; }
.verified-tick.lg { width: 22px; height: 22px; font-size: 14px; }

/* ---- Subscription tab ---- */
.sub-hero {
  border-radius: var(--radius);
  padding: 22px 20px;
  background: linear-gradient(135deg, rgba(255,75,125,0.18), rgba(196,77,255,0.18)), var(--card);
  border: 1px solid var(--border);
  margin-bottom: 18px;
}
.sub-hero-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sub-hero-crown {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg,#ffd166,#ff8c42);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff; flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(255,140,66,0.4);
}
.sub-hero-body { flex: 1; min-width: 200px; }
.sub-hero-body h2 { font-size: 1.35rem; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sub-hero-body p { color: var(--text-2); font-size: 0.9rem; line-height: 1.5; }
.sub-status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600;
  background: rgba(67,233,123,0.15); color: var(--success);
  border: 1px solid rgba(67,233,123,0.3);
}
.sub-status-pill.inactive { background: rgba(184,188,214,0.1); color: var(--text-2); border-color: var(--border); }

/* Wallet */
.wallet-card {
  border-radius: var(--radius);
  padding: 18px 18px;
  background: linear-gradient(135deg, rgba(79,172,254,0.15), rgba(0,242,254,0.08)), var(--card);
  border: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.wallet-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--grad-accent);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px; flex-shrink: 0;
}
.wallet-body { flex: 1; min-width: 140px; }
.wallet-body strong { font-size: 1.7rem; display: block; line-height: 1; }
.wallet-body small { color: var(--text-2); font-size: 0.85rem; }
.wallet-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Plans */
.plans-title, .credits-title {
  margin: 8px 0 12px; font-size: 1.05rem;
  display: flex; align-items: center; gap: 8px;
}
.plans-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 18px;
}
.plan-card {
  border-radius: var(--radius-sm);
  padding: 16px 14px;
  background: var(--card);
  border: 2px solid var(--border);
  transition: all 0.2s var(--transition);
  cursor: pointer;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.plan-card:hover { border-color: var(--primary); background: var(--card-hover); transform: translateY(-2px); }
.plan-card.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,75,125,0.15); }
.plan-card.recommended::before {
  content: 'BEST VALUE'; position: absolute; top: 0; right: 0;
  padding: 2px 8px; font-size: 0.62rem; font-weight: 700;
  background: var(--grad-warm); color: #0a0e27;
  border-bottom-left-radius: 8px;
}
.plan-name { font-size: 0.85rem; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.06em; }
.plan-price { font-size: 1.6rem; font-weight: 800; margin: 4px 0; background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; color: transparent; }
.plan-per { font-size: 0.75rem; color: var(--text-3); }
.plan-perks { list-style: none; margin: 10px 0 0; padding: 0; text-align: left; font-size: 0.78rem; color: var(--text-2); }
.plan-perks li { padding: 3px 0; display: flex; align-items: flex-start; gap: 6px; }
.plan-perks li i { color: var(--success); margin-top: 3px; flex-shrink: 0; }

/* Credit bundles */
.credit-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin-bottom: 12px;
}
.credit-card {
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  background: var(--card);
  border: 2px solid var(--border);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s var(--transition);
}
.credit-card:hover { border-color: var(--accent); background: var(--card-hover); transform: translateY(-2px); }
.credit-card.selected { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,172,254,0.15); }
.credit-amount { font-size: 1.3rem; font-weight: 800; background: var(--grad-accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.credit-count { font-size: 0.78rem; color: var(--text-2); margin-top: 2px; }

.sub-info-note {
  padding: 12px 14px; margin: 14px 0 0;
  border-radius: var(--radius-sm);
  background: rgba(79,172,254,0.08);
  border: 1px solid rgba(79,172,254,0.2);
  font-size: 0.82rem; color: var(--text-2); line-height: 1.5;
}
.sub-info-note strong { color: var(--accent); }
.sub-info-note i { color: var(--accent); margin-right: 4px; }

.sub-benefits-list {
  list-style: none; padding: 0; margin: 10px 0 0;
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.sub-benefits-list li {
  padding: 8px 10px; border-radius: 8px;
  background: rgba(255,255,255,0.04);
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem;
}
.sub-benefits-list li i { color: var(--success); }

/* ---- STK Push panel (payment modal) ---- */
.stk-panel {
  position: fixed; inset: 0;
  background: rgba(10,14,39,0.85);
  backdrop-filter: blur(8px);
  z-index: 5000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.stk-panel.hidden { display: none; }
.stk-card {
  background: linear-gradient(180deg,#1a1f4d,#131841);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  max-width: 420px; width: 100%;
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
  max-height: 90vh; overflow-y: auto;
}
.stk-close {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,255,255,0.08);
  color: #fff; width: 34px; height: 34px;
  border-radius: 50%; font-size: 14px;
}
.stk-logo {
  width: 66px; height: 66px; margin: 0 auto 12px;
  border-radius: 18px;
  background: linear-gradient(135deg,#00a651,#008542);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 30px;
  box-shadow: 0 10px 30px rgba(0,166,81,0.4);
}
.stk-card h2 { font-size: 1.15rem; margin-bottom: 4px; }
.stk-card .muted { font-size: 0.85rem; }
.stk-amount-row {
  display: flex; justify-content: space-around; align-items: center;
  margin: 14px 0; padding: 12px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
}
.stk-amount-row > div { text-align: center; }
.stk-amount-row small { color: var(--text-3); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.stk-amount-row strong { display: block; font-size: 1.1rem; margin-top: 2px; }
.stk-field {
  position: relative; margin: 10px 0;
}
.stk-field input {
  width: 100%; padding: 12px 14px 12px 44px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: #fff; font-size: 0.95rem;
}
.stk-field i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-3);
}
.stk-status {
  margin-top: 14px; padding: 12px; border-radius: var(--radius-sm);
  font-size: 0.88rem;
}
.stk-status.pending {
  background: rgba(254,225,64,0.1); color: var(--warning);
  border: 1px solid rgba(254,225,64,0.2);
}
.stk-status.pending .spin {
  display: inline-block; margin-right: 6px;
  animation: sp 0.9s linear infinite;
}
@keyframes sp { to { transform: rotate(360deg); } }
.stk-status.success { background: rgba(67,233,123,0.1); color: var(--success); border: 1px solid rgba(67,233,123,0.3); }
.stk-status.cancelled { background: rgba(245,87,108,0.1); color: var(--danger); border: 1px solid rgba(245,87,108,0.3); }
.stk-status.timeout { background: rgba(184,188,214,0.1); color: var(--text-2); border: 1px solid var(--border); }
.stk-actions { display: flex; gap: 8px; margin-top: 14px; }
.stk-actions .btn { flex: 1; }

/* Locked feature overlay */
.locked-hint {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(255,140,66,0.15); color: #ff8c42;
  font-size: 0.7rem; font-weight: 600;
  border: 1px solid rgba(255,140,66,0.3);
  margin-left: 6px;
}
.credit-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(79,172,254,0.15); color: var(--accent);
  font-size: 0.75rem; font-weight: 700;
  border: 1px solid rgba(79,172,254,0.3);
  cursor: pointer;
}
.credit-badge:hover { background: rgba(79,172,254,0.25); }

/* Settings — Get Verified row */
.settings-verify-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(29,161,242,0.1), rgba(13,141,220,0.05));
  border: 1px solid rgba(29,161,242,0.2);
  margin-top: 10px;
  gap: 10px; flex-wrap: wrap;
}
.settings-verify-row > div { flex: 1; min-width: 180px; }
.settings-verify-row strong { display: flex; align-items: center; gap: 6px; font-size: 0.95rem; }
.settings-verify-row small { color: var(--text-2); font-size: 0.8rem; }
.settings-verify-row .btn { flex-shrink: 0; }

/* Header credit chip (small wallet indicator) */
.header-credits {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(79,172,254,0.12);
  color: var(--accent);
  font-size: 0.78rem; font-weight: 700;
  border: 1px solid rgba(79,172,254,0.25);
  cursor: pointer;
  margin-right: 6px;
}
.header-credits:hover { background: rgba(79,172,254,0.2); }
.header-credits i { font-size: 0.85em; }

/* Mobile: subscription tab tightens up */
@media (max-width: 640px) {
  .sub-hero { padding: 16px 14px; }
  .sub-hero-body h2 { font-size: 1.15rem; }
  .wallet-card { padding: 14px; }
  .wallet-body strong { font-size: 1.4rem; }
  .plans-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .plan-card { padding: 14px 10px; }
  .plan-price { font-size: 1.35rem; }
  .credit-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .credit-card { padding: 12px 6px; }
  .stk-card { padding: 22px 16px; }
  .stk-amount-row { flex-wrap: wrap; gap: 8px; }
  .header-credits { padding: 4px 8px; font-size: 0.7rem; }
  .header-credits span.label { display: none; }
}
@media (max-width: 400px) {
  .plans-grid { grid-template-columns: 1fr; }
  .credit-grid { grid-template-columns: 1fr 1fr; }
}

/* ==================== MOBILE FIT — PROFESSIONAL FINAL PASS ====================
   Surgical, additive rules only. Do not modify logic, flow, or unrelated UI.
   Goal: on mobile (≤900px), everything fits inside the viewport, no pinch-zoom
   jitter, no horizontal overflow, and the chat send button always stays visible
   above the mobile URL/nav bar. */

/* Kill any residual horizontal overflow anywhere on the page */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}
img, video, canvas, iframe { max-width: 100%; height: auto; }
.app-screen, .screen, .tab { max-width: 100vw; overflow-x: hidden; }

/* Prevent iOS/Android from auto-zooming when focusing ANY input on small screens
   (browsers only zoom when computed input font-size < 16px). */
@media (max-width: 900px) {
  input, select, textarea, button {
    font-size: 16px;
  }
  /* Keep existing visual sizes for elements that should stay small — only enforce
     16px where a form input triggers the zoom bug. */
  .btn, .chip, .app-nav-btn, .tool-btn, .btn-icon,
  .stat-card span, .stat-card strong,
  .mini-member small, .mc-body small,
  .trend-body small, .trend-body p,
  small, .muted, .small { font-size: revert; }
}

/* ---------- CHAT: keep the send button ALWAYS on-screen ---------- */
@media (max-width: 900px) {
  /* Use dynamic viewport height and pin the input to the visible bottom via
     safe-area padding + sticky positioning. The wrap sits inside the tab,
     never below the fold. */
  #tab-chat {
    padding: 10px 3% 0;
    /* Reserve full remaining height inside the app screen */
    min-height: calc(100dvh - 120px);
  }
  .chat-wrap {
    height: calc(100dvh - 140px);
    max-height: calc(100dvh - 140px);
    min-height: 0;
    display: block;
    overflow: hidden;
  }
  .chat-wrap.chat-open .chat-main,
  .chat-active {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  /* The composer is a real flex child (not sticky) so the send button
     is anchored to the bottom of the chat pane, not the document. */
  .chat-input {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(10,14,39,0.85);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
  }
  .chat-input input {
    flex: 1 1 auto;
    min-width: 0;              /* allows the input to shrink so the send button never gets pushed off */
    font-size: 16px;           /* prevents iOS focus-zoom */
    padding: 12px 16px;
  }
  .chat-input .btn-round,
  .chat-input .btn-primary {
    flex: 0 0 auto;
    width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    padding: 0;
  }
  .chat-input .chat-attach-btn {
    flex: 0 0 auto;
  }
}

/* ---------- APP-SCREEN: don't reserve giant bottom padding on mobile
              so the chat pane can use the full remaining height. ---------- */
@media (max-width: 900px) {
  .app-screen { padding-bottom: 0; }
}
@supports (padding: max(0px)) {
  @media (max-width: 900px) {
    .app-screen { padding-bottom: env(safe-area-inset-bottom, 0px); }
  }
}

/* ---------- Trending posts & New Members: never clip names ---------- */
@media (max-width: 900px) {
  .trend-body strong,
  .trend-body p { white-space: normal; overflow: visible; text-overflow: clip; }
  .mini-member { width: 72px; }
  .mini-member small { max-width: 72px; }
}

/* ---------- Header nav row: keep every tab touchable, none hidden ---------- */
@media (max-width: 900px) {
  .app-header { padding-left: 3%; padding-right: 3%; }
  .app-nav { padding: 3px; gap: 2px; }
  .app-nav-btn { padding: 9px 6px; min-width: 0; }
  .app-nav-btn i { font-size: 1rem; }
}

/* ---------- Extra-small phones (≤380px): tighten so nothing overflows ---------- */
@media (max-width: 380px) {
  .app-nav-btn { padding: 8px 3px; }
  .chat-input { gap: 6px; padding-left: 8px; padding-right: 8px; }
  .chat-input .btn-round, .chat-input .btn-primary { width: 40px; height: 40px; }
  .chat-input .chat-attach-btn { width: 40px; height: 40px; }
  .msg { max-width: 90%; }
}

/* ---------- Bot toggle must NEVER cover the chat send button ---------- */
@media (max-width: 900px) {
  body.chat-open #botToggle,
  body.chat-open .bot-toggle,
  body.chat-open .bot-window {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

/* ==================== SURGICAL FIXES: MOBILE CHAT SEND, NOTIFICATIONS, FEED, STORIES, REELS ==================== */

/* --- Chat send button ALWAYS visible on mobile (keyboard-safe, no cutoff) --- */
@media (max-width: 900px) {
  .chat-input {
    padding-left: 8px !important;
    padding-right: 8px !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
  }
  .chat-input input {
    min-width: 0 !important;
    width: auto !important;
    flex: 1 1 auto !important;
  }
  .chat-input .btn-primary,
  .chat-input .btn-round,
  .chat-input .chat-attach-btn {
    flex: 0 0 auto !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
  }
  /* Bot window fix: send button in Cupid AI must stay visible on mobile too */
  .bot-window {
    width: calc(100vw - 20px) !important;
    right: 10px !important;
    left: 10px !important;
    max-width: none !important;
    height: 70dvh !important;
    max-height: 70dvh !important;
    bottom: 88px !important;
  }
  .bot-input {
    padding: 10px !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
  }
  .bot-input input {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    font-size: 16px !important;
    padding: 10px 14px !important;
  }
  .bot-input .btn-primary,
  .bot-input .btn-round,
  .bot-input .mic-btn {
    flex: 0 0 auto !important;
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

@media (max-width: 380px) {
  .chat-input .btn-primary,
  .chat-input .btn-round,
  .chat-input .chat-attach-btn,
  .bot-input .btn-primary,
  .bot-input .btn-round,
  .bot-input .mic-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
  }
  .bot-input { gap: 4px !important; padding: 8px !important; }
  .chat-input { gap: 6px !important; }
}

/* --- Notification dropdown fixed for mobile (text wraps, fits screen) --- */
@media (max-width: 640px) {
  .notif-panel {
    position: fixed !important;
    top: 62px !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: none !important;
    max-height: 70dvh !important;
    z-index: 900 !important;
  }
  .notif-item {
    padding: 12px 14px !important;
    gap: 10px !important;
  }
  .notif-body {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    overflow: hidden;
  }
  .notif-body p {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    line-height: 1.4 !important;
    font-size: 0.88rem !important;
  }
  .notif-body small {
    display: block;
    margin-top: 4px;
  }
  .notif-head { padding: 12px 14px !important; }
  .notif-head strong { font-size: 0.95rem !important; }
  .notif-clear { font-size: 0.72rem !important; white-space: nowrap; }
}

/* --- Persistent unread badge (never disappears until user marks read) --- */
.notif-count.persist {
  animation: notifPop 0.4s var(--transition), notifGlow 2s ease-in-out infinite alternate;
}
@keyframes notifGlow {
  0% { box-shadow: 0 0 8px rgba(255,75,125,0.5); }
  100% { box-shadow: 0 0 14px rgba(255,75,125,0.9); }
}

/* ==================== INSTAGRAM-STYLE STORIES RAIL ==================== */
.stories-rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 6px 4px 14px;
  margin: 0 auto 12px;
  max-width: 720px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.stories-rail::-webkit-scrollbar { display: none; }
.story-item {
  flex: 0 0 auto;
  width: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.2s;
}
.story-item:hover { transform: translateY(-2px); }
.story-ring {
  width: 68px; height: 68px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #ff4b7d, #c44dff, #4facfe);
  position: relative;
}
.story-ring.viewed {
  background: rgba(255,255,255,0.18);
}
.story-ring.add {
  background: rgba(255,255,255,0.1);
  border: 2px dashed var(--primary);
  padding: 2px;
}
.story-thumb {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--bg-2);
  background-size: cover;
  background-position: center;
  border: 2px solid var(--bg-1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.2rem;
  overflow: hidden;
  position: relative;
}
.story-add .story-thumb {
  background: rgba(255,75,125,0.12);
}
.story-item small {
  font-size: 0.72rem;
  color: var(--text-2);
  max-width: 74px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}
.story-item.mine .story-thumb::after {
  content: '\f00c';
  position: absolute;
  bottom: -2px; right: -2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.6rem;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-1);
}

/* ==================== STORY VIEWER (fullscreen, tap to advance) ==================== */
.story-viewer {
  position: fixed; inset: 0;
  z-index: 3000;
  background: #000;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.2s;
}
.story-viewer.hidden { display: none; }
.story-progress {
  position: absolute; top: 8px; left: 8px; right: 8px;
  display: flex; gap: 4px;
  z-index: 5;
}
.story-progress .sp-bar {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.25);
  border-radius: 999px;
  overflow: hidden;
}
.story-progress .sp-bar .sp-fill {
  height: 100%;
  width: 0%;
  background: #fff;
  border-radius: 999px;
  transition: width 0.1s linear;
}
.story-progress .sp-bar.done .sp-fill { width: 100%; }
.story-viewer-head {
  position: absolute; top: 22px; left: 12px; right: 60px;
  display: flex; align-items: center; gap: 10px;
  color: #fff;
  z-index: 5;
}
.story-viewer-head .avatar { width: 36px; height: 36px; }
.story-viewer-head strong { font-size: 0.9rem; display: block; }
.story-viewer-head small { color: rgba(255,255,255,0.75); font-size: 0.72rem; }
.story-viewer-head .story-del {
  margin-left: auto;
  background: rgba(0,0,0,0.4);
  color: #fff;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
}
.story-viewer-head .story-del:hover { background: var(--danger); }
.story-close {
  position: absolute; top: 22px; right: 14px;
  z-index: 6;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 1rem;
}
.story-viewer-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.story-viewer-body img,
.story-viewer-body video {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.story-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  color: #fff;
  z-index: 4;
  display: flex; align-items: center; justify-content: center;
}
.story-nav.prev { left: 10px; }
.story-nav.next { right: 10px; }
@media (max-width: 700px) {
  .story-nav { display: none; } /* tap-zones handle it */
}
.story-tap-zone {
  position: absolute; top: 0; bottom: 0;
  width: 40%;
  z-index: 3;
}
.story-tap-zone.left { left: 0; }
.story-tap-zone.right { right: 0; }

/* ==================== INSTAGRAM-STYLE FEED (professional refresh) ==================== */
.post-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 14px 16px 10px;
  transition: border-color 0.25s, transform 0.25s;
}
.post-card:hover { border-color: rgba(255,75,125,0.22); }
.post-head { align-items: center; }
.post-head .avatar { width: 42px; height: 42px; }
.ph-info strong { font-size: 0.98rem; letter-spacing: -0.2px; }
.ph-info small { font-size: 0.76rem; color: var(--text-3); }
.post-text { font-size: 0.95rem; line-height: 1.55; margin: 4px 0 10px; }
.post-media {
  margin: 6px -16px 8px;
  border-radius: 0;
  background: #05070f;
  position: relative;
  overflow: hidden;
}
.post-media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition: transform 0.35s ease;
}
.post-media:hover img { transform: scale(1.015); }
.post-media video {
  width: 100%;
  max-height: 560px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #000;
  display: block;
  cursor: pointer;
}
.post-media.video-post::after {
  content: '\f04b';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 0.25s, transform 0.25s;
}
.post-media.video-post:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.08);
}
.post-media.video-post .reels-tag {
  position: absolute;
  top: 10px; right: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(6px);
}
.post-media.video-post .reels-tag i { color: #ff4b7d; }
.post-actions {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 6px; margin-top: 6px;
  gap: 4px;
}
.pa-btn { font-size: 0.85rem; }
.pa-btn i { font-size: 1.05rem; }

/* Comments: edit/delete controls */
.comment {
  align-items: flex-start;
}
.comment-body {
  position: relative;
  padding-right: 44px;
}
.comment-tools {
  position: absolute;
  top: 6px; right: 6px;
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.2s;
}
.comment:hover .comment-tools,
.comment:focus-within .comment-tools { opacity: 1; }
.comment-tool-btn {
  background: transparent;
  width: 22px; height: 22px;
  border-radius: 50%;
  color: var(--text-3);
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.comment-tool-btn:hover { background: rgba(255,255,255,0.08); color: var(--text); }
.comment-tool-btn.del:hover { color: var(--danger); }
.comment-tool-btn.edit:hover { color: var(--accent); }
@media (max-width: 700px) {
  .comment-tools { opacity: 1; }
}

/* ==================== REELS VIEWER (vertical, TikTok-style swipe) ==================== */
.reels-viewer {
  position: fixed; inset: 0;
  z-index: 3200;
  background: #000;
  overflow: hidden;
  animation: fadeIn 0.2s;
}
.reels-viewer.hidden { display: none; }
.reels-close {
  position: absolute;
  top: 18px; right: 14px;
  z-index: 6;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
}
.reels-track {
  position: absolute; inset: 0;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.reels-track::-webkit-scrollbar { display: none; }
.reel-slide {
  width: 100%;
  height: 100dvh;
  scroll-snap-align: start;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
.reel-slide video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.reel-info {
  position: absolute;
  left: 14px; right: 80px; bottom: 30px;
  color: #fff;
  z-index: 3;
  text-shadow: 0 1px 6px rgba(0,0,0,0.7);
}
.reel-info .r-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.reel-info .r-head .avatar { width: 36px; height: 36px; }
.reel-info .r-head strong { font-size: 0.95rem; }
.reel-info .r-head small { color: rgba(255,255,255,0.75); font-size: 0.72rem; display: block; }
.reel-info p {
  font-size: 0.88rem;
  line-height: 1.45;
  max-height: 3.9em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.reel-side {
  position: absolute;
  right: 12px; bottom: 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 4;
  align-items: center;
}
.reel-side .r-act {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  transition: transform 0.2s;
}
.reel-side .r-act:hover { transform: scale(1.08); }
.reel-side .r-act.liked { color: var(--primary); }
.reel-side .r-count {
  color: #fff;
  font-size: 0.72rem;
  text-align: center;
  margin-top: -6px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.reels-hint {
  position: absolute;
  bottom: 12px; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,0.4);
  z-index: 5;
  animation: fadeOut 0.5s ease-in 3s forwards;
  pointer-events: none;
}
@keyframes fadeOut { to { opacity: 0; } }

/* Post-editing textarea in-line */
.post-edit-area {
  width: 100%;
  min-height: 60px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--primary);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  margin: 4px 0 8px;
  resize: vertical;
}
.post-edit-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 8px;
}
.post-edit-actions .btn { padding: 6px 14px; font-size: 0.82rem; }

/* Composer story shortcut */
.composer-tools .tool-btn.story { border-color: rgba(255,75,125,0.35); }
.composer-tools .tool-btn.story i { color: var(--primary); }
