/* ═══════════════════════════════════════════════════════════════════════════
   MyQuotIQ — style.css
   Luxury dark glassmorphic UI · Deep cosmos aesthetic
   Prospero Universe & Prospero Webworks
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────
   1. CUSTOM PROPERTIES
───────────────────────────────────────────────────────────────────────── */
:root {
  /* ── Brand palette ── */
  --violet:         #7c3aed;
  --violet-light:   #a78bfa;
  --violet-dark:    #5b21b6;
  --violet-xdark:   #3b0d99;
  --rose:           #f43f5e;
  --rose-light:     #fb7185;
  --rose-dark:      #be123c;
  --amber:          #f59e0b;
  --amber-light:    #fbbf24;
  --cyan:           #06b6d4;
  --cyan-light:     #22d3ee;
  --emerald:        #10b981;
  --emerald-light:  #34d399;
  --fuchsia:        #d946ef;

  /* ── Base surfaces (deep cosmos) ── */
  --base:     #06060f;
  --base-2:   #09091a;
  --base-3:   #0d0d22;
  --base-4:   #12122e;
  --base-5:   #17173a;
  --base-6:   #1e1e48;

  /* ── Glass ── */
  --glass-bg:           rgba(255, 255, 255, 0.032);
  --glass-bg-med:       rgba(255, 255, 255, 0.058);
  --glass-bg-strong:    rgba(8, 8, 24, 0.88);
  --glass-bg-card:      rgba(12, 12, 30, 0.72);
  --glass-border:       rgba(255, 255, 255, 0.08);
  --glass-border-med:   rgba(255, 255, 255, 0.13);
  --glass-border-light: rgba(255, 255, 255, 0.20);

  /* ── Text ── */
  --text-primary:   #f0efff;
  --text-secondary: rgba(210, 208, 255, 0.80);
  --text-muted:     rgba(160, 155, 220, 0.55);
  --text-dim:       rgba(110, 105, 175, 0.40);
  --text-accent:    var(--violet-light);

  /* ── Glows ── */
  --glow-violet:      0 0 24px rgba(124, 58, 237, 0.60), 0 0 56px rgba(124, 58, 237, 0.22);
  --glow-violet-sm:   0 0 14px rgba(124, 58, 237, 0.50);
  --glow-rose:        0 0 24px rgba(244, 63, 94, 0.55), 0 0 56px rgba(244, 63, 94, 0.18);
  --glow-cyan:        0 0 20px rgba(6, 182, 212, 0.45);
  --glow-amber:       0 0 20px rgba(245, 158, 11, 0.45);
  --glow-card:        0 8px 40px rgba(0, 0, 0, 0.70), 0 0 0 1px rgba(255, 255, 255, 0.055);
  --glow-card-hover:  0 20px 60px rgba(0, 0, 0, 0.80), 0 0 0 1px rgba(124, 58, 237, 0.40), 0 0 50px rgba(124, 58, 237, 0.12);

  /* ── Gradients ── */
  --grad-brand:   linear-gradient(135deg, #7c3aed 0%, #c026d3 50%, #f43f5e 100%);
  --grad-brand-v: linear-gradient(180deg, #7c3aed 0%, #c026d3 60%, #f43f5e 100%);
  --grad-violet:  linear-gradient(135deg, #7c3aed, #a78bfa);
  --grad-rose:    linear-gradient(135deg, #f43f5e, #fb7185);
  --grad-warm:    linear-gradient(135deg, #f59e0b, #f43f5e);
  --grad-cool:    linear-gradient(135deg, #06b6d4, #7c3aed);
  --grad-cosmic:  linear-gradient(135deg, #0d0d22 0%, #12122e 50%, #17173a 100%);

  /* ── Layout ── */
  --sidebar-w:   244px;
  --tabbar-h:    66px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top:    env(safe-area-inset-top, 0px);
  --card-radius: 18px;
  --modal-radius: 26px;
  --panel-radius: 20px;

  /* ── Easing ── */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:    cubic-bezier(0, 0, 0.2, 1);
  --ease-in:     cubic-bezier(0.4, 0, 1, 1);
  --ease-back:   cubic-bezier(0.68, -0.55, 0.27, 1.55);

  /* ── Z-index stack ── */
  --z-base:    1;
  --z-card:    10;
  --z-sticky:  100;
  --z-tabbar:  200;
  --z-sidebar: 200;
  --z-modal:   500;
  --z-drawer:  510;
  --z-toast:   1000;
}

/* ─────────────────────────────────────────────────────────────────────────
   2. RESET & BASE
───────────────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--base);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
}

img,
svg { display: block; max-width: 100%; }

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  line-height: inherit;
}

input,
textarea,
select {
  font-family: inherit;
  outline: none;
  border: none;
  background: none;
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }

/* Scrollbar */
::-webkit-scrollbar              { width: 4px; height: 4px; }
::-webkit-scrollbar-track        { background: transparent; }
::-webkit-scrollbar-thumb        { background: rgba(124, 58, 237, 0.35); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover  { background: rgba(124, 58, 237, 0.65); }

::selection { background: rgba(124, 58, 237, 0.38); color: #fff; }

/* Focus ring */
:focus-visible {
  outline: 2px solid rgba(124, 58, 237, 0.85);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ─────────────────────────────────────────────────────────────────────────
   3. AURORA / ANIMATED BACKGROUND
───────────────────────────────────────────────────────────────────────── */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: var(--base);
}

.aurora-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(124, 58, 237, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(244, 63, 94, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

/* Grain texture */
.aurora-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  pointer-events: none;
  opacity: 0.6;
}

.aurora-layer {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform, opacity;
}

.aurora-layer--1 {
  width: min(75vw, 680px);
  height: min(75vw, 680px);
  background: radial-gradient(ellipse, rgba(124, 58, 237, 0.28) 0%, transparent 68%);
  top: -18%; left: -12%;
  animation: auroraFloat1 22s ease-in-out infinite alternate;
}

.aurora-layer--2 {
  width: min(65vw, 580px);
  height: min(65vw, 580px);
  background: radial-gradient(ellipse, rgba(244, 63, 94, 0.18) 0%, transparent 68%);
  bottom: -12%; right: -12%;
  animation: auroraFloat2 28s ease-in-out infinite alternate-reverse;
}

.aurora-layer--3 {
  width: min(55vw, 480px);
  height: min(55vw, 480px);
  background: radial-gradient(ellipse, rgba(6, 182, 212, 0.12) 0%, transparent 68%);
  top: 45%; left: 42%;
  animation: auroraFloat3 19s ease-in-out infinite alternate;
}

@keyframes auroraFloat1 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(7%, 14%) scale(1.08); }
  66%  { transform: translate(-4%, 9%) scale(0.96); }
  100% { transform: translate(11%, -7%) scale(1.04); }
}
@keyframes auroraFloat2 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-9%, -11%) scale(1.12); }
  100% { transform: translate(6%, -14%) scale(0.92); }
}
@keyframes auroraFloat3 {
  0%   { transform: translate(0, 0) scale(1) rotate(0deg); }
  100% { transform: translate(-7%, 12%) scale(1.18) rotate(25deg); }
}

/* ─────────────────────────────────────────────────────────────────────────
   4. GLASSMORPHISM UTILITIES
───────────────────────────────────────────────────────────────────────── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(22px) saturate(1.9);
  -webkit-backdrop-filter: blur(22px) saturate(1.9);
  border: 1px solid var(--glass-border);
}

.glass-med {
  background: var(--glass-bg-med);
  backdrop-filter: blur(26px) saturate(2.1);
  -webkit-backdrop-filter: blur(26px) saturate(2.1);
  border: 1px solid var(--glass-border-med);
}

.glass-strong {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(44px) saturate(2.6) brightness(1.04);
  -webkit-backdrop-filter: blur(44px) saturate(2.6) brightness(1.04);
  border: 1px solid var(--glass-border);
}

/* ─────────────────────────────────────────────────────────────────────────
   5. TYPOGRAPHY UTILITIES
───────────────────────────────────────────────────────────────────────── */
.wm-my {
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: -0.025em;
}
.wm-quot {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.035em;
}
.wm-iq {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.no-scroll { overflow: hidden !important; }

/* ─────────────────────────────────────────────────────────────────────────
   6. APP SHELL
───────────────────────────────────────────────────────────────────────── */
#main-app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  position: relative;
  z-index: var(--z-base);
}

#main-content {
  flex: 1;
  position: relative;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 24px);
}

/* ─────────────────────────────────────────────────────────────────────────
   7. SIDEBAR (desktop ≥ 1024px)
───────────────────────────────────────────────────────────────────────── */
#sidebar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100dvh;
  z-index: var(--z-sidebar);
  flex-direction: column;
  padding: 28px 0 24px;
  border-right: 1px solid var(--glass-border);
  border-radius: 0;
  overflow: hidden;
}

/* Subtle sidebar shimmer line */
#sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(124, 58, 237, 0.6) 30%,
    rgba(244, 63, 94, 0.4) 70%,
    transparent 100%
  );
  pointer-events: none;
}

.sidebar-logo {
  padding: 0 22px 30px;
  display: flex;
  align-items: center;
  gap: 11px;
}

.sidebar-wordmark {
  font-size: 21px;
  letter-spacing: -0.025em;
  line-height: 1;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 12px;
  flex: 1;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 16px;
  border-radius: 15px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.22s var(--ease-smooth);
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
}

.sidebar-nav-item:hover {
  color: var(--text-primary);
  background: var(--glass-bg-med);
  border-color: var(--glass-border);
}

.sidebar-nav-item.active {
  color: #fff;
  background: rgba(124, 58, 237, 0.18);
  border-color: rgba(124, 58, 237, 0.38);
  box-shadow: inset 0 0 24px rgba(124, 58, 237, 0.08), 0 0 20px rgba(124, 58, 237, 0.10);
}

.sidebar-nav-item.active svg {
  filter: drop-shadow(0 0 7px rgba(167, 139, 250, 0.90));
  color: var(--violet-light);
}

.sidebar-nav-item svg {
  flex-shrink: 0;
  transition: transform 0.22s var(--ease-spring), color 0.2s;
}

.sidebar-nav-item span {
  position: relative;
  z-index: 1;
}

.sidebar-nav-item:hover svg   { transform: scale(1.12); }
.sidebar-nav-item:active      { transform: scale(0.97); }

.sidebar-bottom {
  padding: 12px 12px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--glass-border);
  margin-top: 12px;
}

.sidebar-notif-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 16px;
  border-radius: 15px;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s var(--ease-smooth);
  position: relative;
  border: 1px solid transparent;
}
.sidebar-notif-btn:hover {
  background: var(--glass-bg-med);
  border-color: var(--glass-border);
  color: var(--text-primary);
}

.sidebar-signout-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 16px;
  border-radius: 15px;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.sidebar-signout-btn:hover {
  background: rgba(244, 63, 94, 0.10);
  border-color: rgba(244, 63, 94, 0.25);
  color: var(--rose-light);
}

/* ─────────────────────────────────────────────────────────────────────────
   8. BOTTOM TAB BAR (mobile)
───────────────────────────────────────────────────────────────────────── */
.bottom-tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  z-index: var(--z-tabbar);
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-top: 1px solid var(--glass-border);
  border-radius: 0;
}

.tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 18px;
  border-radius: 16px;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  transition: all 0.26s var(--ease-spring);
  position: relative;
  min-width: 60px;
}

.tab-btn::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--grad-brand);
  border-radius: 0 0 2px 2px;
  transition: width 0.3s var(--ease-spring);
}

.tab-btn.active {
  color: var(--violet-light);
}
.tab-btn.active::after { width: 28px; }
.tab-btn.active svg {
  filter: drop-shadow(0 0 9px rgba(167, 139, 250, 0.80));
  transform: scale(1.08) translateY(-1px);
}
.tab-btn:active { transform: scale(0.92); }

.tab-create-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: var(--grad-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--glow-violet);
  transition: all 0.26s var(--ease-spring);
  position: relative;
  overflow: hidden;
}

.tab-create-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), transparent 55%);
  pointer-events: none;
}

.tab-btn.active .tab-create-icon,
.tab-btn:hover .tab-create-icon {
  box-shadow: var(--glow-violet), 0 6px 24px rgba(124, 58, 237, 0.45);
  transform: scale(1.07) translateY(-2px);
}

/* ─────────────────────────────────────────────────────────────────────────
   9. NOTIFICATION BADGE
───────────────────────────────────────────────────────────────────────── */
.notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--rose);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 700;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.65);
  animation: badgePop 0.4s var(--ease-spring);
  line-height: 1;
}

@keyframes badgePop {
  0%   { transform: scale(0); }
  65%  { transform: scale(1.28); }
  100% { transform: scale(1); }
}

/* ─────────────────────────────────────────────────────────────────────────
   10. SPLASH / LOGIN SCREEN
───────────────────────────────────────────────────────────────────────── */
#splash-screen {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--base);
}

.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  text-align: center;
  animation: splashReveal 0.9s var(--ease-out) both;
}

@keyframes splashReveal {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}

.splash-logo-wrap {
  position: relative;
  width: 108px;
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

.splash-logo-mark {
  filter:
    drop-shadow(0 0 28px rgba(124, 58, 237, 0.75))
    drop-shadow(0 0 60px rgba(244, 63, 94, 0.30));
  animation: logoBreath 4s ease-in-out infinite;
}

@keyframes logoBreath {
  0%, 100% {
    filter:
      drop-shadow(0 0 28px rgba(124, 58, 237, 0.75))
      drop-shadow(0 0 60px rgba(244, 63, 94, 0.30));
  }
  50% {
    filter:
      drop-shadow(0 0 48px rgba(124, 58, 237, 0.95))
      drop-shadow(0 0 90px rgba(244, 63, 94, 0.50));
  }
}

/* Orbiting particles */
.splash-logo-particles {
  position: absolute;
  inset: -20px;
  animation: orbitSpin 8s linear infinite;
}

.particle {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

.particle.p1 {
  width: 9px; height: 9px;
  background: var(--violet-light);
  top: 0; left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.95);
}
.particle.p2 {
  width: 7px; height: 7px;
  background: var(--rose);
  top: 50%; right: 0;
  transform: translateY(-50%);
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.95);
}
.particle.p3 {
  width: 6px; height: 6px;
  background: var(--amber);
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.95);
}
.particle.p4 {
  width: 7px; height: 7px;
  background: var(--cyan);
  top: 50%; left: 0;
  transform: translateY(-50%);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.95);
}

@keyframes orbitSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.splash-wordmark {
  font-size: clamp(42px, 11vw, 68px);
  letter-spacing: -0.042em;
  line-height: 1;
  margin-bottom: 14px;
  animation: fadeUp 1s var(--ease-out) 0.15s both;
}

.splash-tagline {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(16px, 4vw, 20px);
  color: var(--text-secondary);
  margin-bottom: 52px;
  animation: fadeUp 1s var(--ease-out) 0.30s both;
  letter-spacing: 0.01em;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* Google Sign-In button */
.btn-google {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 34px;
  background: #ffffff;
  color: #1a1830;
  border-radius: 50px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  box-shadow:
    0 4px 28px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: all 0.26s var(--ease-spring);
  animation: fadeUp 1s var(--ease-out) 0.45s both;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: none;
}

.btn-google::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.06), rgba(244, 63, 94, 0.06));
  opacity: 0;
  transition: opacity 0.26s;
  pointer-events: none;
}

.btn-google:hover {
  transform: translateY(-3px) scale(1.025);
  box-shadow:
    0 10px 44px rgba(0, 0, 0, 0.55),
    0 0 32px rgba(124, 58, 237, 0.22);
}
.btn-google:hover::before { opacity: 1; }
.btn-google:active { transform: scale(0.96); }

.btn-google svg {
  flex-shrink: 0;
}

.splash-legal {
  margin-top: 22px;
  font-size: 12px;
  color: var(--text-dim);
  animation: fadeUp 1s var(--ease-out) 0.60s both;
  line-height: 1.7;
}
.splash-legal a {
  color: var(--violet-light);
  transition: color 0.2s;
}
.splash-legal a:hover { color: var(--rose-light); text-decoration: underline; }

/* ─────────────────────────────────────────────────────────────────────────
   11. MODAL BASE
───────────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(3, 3, 14, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: modalBgIn 0.24s var(--ease-out);
}

@keyframes modalBgIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (min-width: 640px) {
  .modal-overlay {
    align-items: center;
    padding: 24px;
  }
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: min(96vw, 540px);
  max-height: 92dvh;
  border-radius: var(--modal-radius) var(--modal-radius) 0 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px 22px 32px;
  animation: modalSlideUp 0.38s var(--ease-spring);
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 58, 237, 0.3) transparent;
}

@media (min-width: 640px) {
  .modal-card {
    border-radius: var(--modal-radius);
    max-height: 88dvh;
    animation: modalScaleIn 0.32s var(--ease-spring);
  }
}

@keyframes modalSlideUp {
  from { transform: translateY(64px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

@keyframes modalScaleIn {
  from { transform: scale(0.90); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--glass-bg-med);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease-smooth);
  z-index: 2;
  flex-shrink: 0;
  cursor: pointer;
}
.modal-close:hover {
  background: rgba(244, 63, 94, 0.14);
  color: var(--rose-light);
  border-color: rgba(244, 63, 94, 0.30);
  transform: rotate(90deg);
}
.modal-close:active { transform: scale(0.88) rotate(90deg); }

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 22px;
  padding-right: 44px;
}

/* ─────────────────────────────────────────────────────────────────────────
   12. ONBOARDING MODAL
───────────────────────────────────────────────────────────────────────── */
.onboarding-card { max-width: 500px; }

.onboard-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  margin-bottom: 28px;
}

.onboard-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.onboard-sub {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.65;
}

/* ─────────────────────────────────────────────────────────────────────────
   13. FORM COMPONENTS
───────────────────────────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-label-opt {
  font-weight: 400;
  opacity: 0.6;
  text-transform: none;
  letter-spacing: 0;
}

.input-wrap {
  display: flex;
  align-items: center;
  background: var(--glass-bg-med);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 0 14px;
  transition: border-color 0.22s, box-shadow 0.22s;
}
.input-wrap:focus-within {
  border-color: rgba(124, 58, 237, 0.65);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12), 0 0 22px rgba(124, 58, 237, 0.08);
}

.input-prefix {
  font-size: 16px;
  color: var(--violet-light);
  font-weight: 700;
  margin-right: 3px;
  flex-shrink: 0;
}

.form-input {
  flex: 1;
  padding: 14px 0;
  font-size: 15px;
  color: var(--text-primary);
  background: transparent;
  min-width: 0;
}
.form-input::placeholder { color: var(--text-dim); }

.input-status {
  font-size: 18px;
  min-width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.form-hint {
  font-size: 12px;
  color: var(--text-dim);
  padding: 0 2px;
  line-height: 1.6;
}

.form-textarea {
  width: 100%;
  background: var(--glass-bg-med);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 15px;
  color: var(--text-primary);
  resize: none;
  white-space: pre-wrap;
  line-height: 1.65;
  transition: border-color 0.22s, box-shadow 0.22s;
}
.form-textarea:focus {
  border-color: rgba(124, 58, 237, 0.65);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}
.form-textarea::placeholder { color: var(--text-dim); }

.form-counter {
  font-size: 11px;
  color: var(--text-dim);
  text-align: right;
}

/* ─────────────────────────────────────────────────────────────────────────
   14. AVATAR GRID
───────────────────────────────────────────────────────────────────────── */
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

@media (max-width: 375px) {
  .avatar-grid { grid-template-columns: repeat(4, 1fr); }
}

.avatar-option {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.24s var(--ease-spring);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg-med);
  position: relative;
}

.avatar-option:hover {
  transform: scale(1.10);
  border-color: var(--violet-light);
  box-shadow: 0 0 22px rgba(124, 58, 237, 0.52);
}

.avatar-option.selected {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.30), var(--glow-violet-sm);
  transform: scale(1.08);
}
.avatar-option:active { transform: scale(0.94); }

/* ─────────────────────────────────────────────────────────────────────────
   15. BUTTONS
───────────────────────────────────────────────────────────────────────── */

/* Primary button */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 16px 26px;
  background: var(--grad-brand);
  color: #fff;
  border-radius: 50px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.012em;
  box-shadow: var(--glow-violet);
  transition: all 0.26s var(--ease-spring);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: none;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, transparent 55%);
  pointer-events: none;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.022);
  box-shadow: var(--glow-violet), 0 10px 36px rgba(124, 58, 237, 0.42);
}
.btn-primary:active { transform: scale(0.96); }
.btn-full { width: 100%; }

/* Spinner */
.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.30);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Follow button */
.btn-follow {
  padding: 8px 20px;
  border-radius: 50px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 13px;
  background: var(--grad-violet);
  color: #fff;
  box-shadow: 0 4px 18px rgba(124, 58, 237, 0.38);
  transition: all 0.24s var(--ease-spring);
  white-space: nowrap;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-follow:hover { transform: scale(1.06); box-shadow: var(--glow-violet); }
.btn-follow:active { transform: scale(0.94); }
.btn-follow.following {
  background: transparent;
  border: 1.5px solid var(--glass-border-med);
  color: var(--text-muted);
  box-shadow: none;
}
.btn-follow.following:hover { border-color: var(--rose); color: var(--rose); }
.btn-follow-large { padding: 10px 26px; font-size: 14px; }

/* Post button */
.btn-post {
  width: 100%;
  padding: 18px 24px;
  border-radius: 18px;
  background: var(--grad-brand);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.012em;
  box-shadow: var(--glow-violet), 0 8px 36px rgba(124, 58, 237, 0.32);
  transition: all 0.26s var(--ease-spring);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
}
.btn-post::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.16) 0%, transparent 52%);
  pointer-events: none;
}
.btn-post:hover {
  transform: translateY(-3px);
  box-shadow: var(--glow-violet), 0 18px 52px rgba(124, 58, 237, 0.48);
}
.btn-post:active { transform: scale(0.97); }

/* Icon button */
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transition: all 0.2s;
  position: relative;
  cursor: pointer;
}
.icon-btn:hover { background: var(--glass-bg-med); color: var(--text-primary); }
.icon-btn:active { transform: scale(0.90); }

/* Edit profile button */
.btn-edit-profile {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 50px;
  background: var(--glass-bg-med);
  border: 1px solid var(--glass-border-med);
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s var(--ease-smooth);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}
.btn-edit-profile:hover {
  background: rgba(124, 58, 237, 0.14);
  border-color: rgba(124, 58, 237, 0.40);
  color: var(--violet-light);
}
.btn-edit-profile:active { transform: scale(0.95); }

/* Reset button */
.btn-reset {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.12);
  color: var(--text-secondary);
  border: 1px solid rgba(124, 58, 237, 0.24);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s var(--ease-smooth);
  cursor: pointer;
}
.btn-reset:hover {
  transform: translateY(-1px);
  background: rgba(124, 58, 237, 0.20);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.18);
}
.btn-reset:active { transform: scale(0.96); }

/* ─────────────────────────────────────────────────────────────────────────
   16. APP SECTIONS & TRANSITIONS
───────────────────────────────────────────────────────────────────────── */
.app-section {
  min-height: 100dvh;
  position: relative;
}

.app-section.slide-in-right {
  animation: slideInRight 0.34s var(--ease-spring) both;
}
.app-section.slide-in-left {
  animation: slideInLeft 0.34s var(--ease-spring) both;
}

@keyframes slideInRight {
  from { transform: translateX(44px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
@keyframes slideInLeft {
  from { transform: translateX(-44px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* ─────────────────────────────────────────────────────────────────────────
   17. FEED — TOP BAR
───────────────────────────────────────────────────────────────────────── */
.feed-topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(34px) saturate(2.2);
  -webkit-backdrop-filter: blur(34px) saturate(2.2);
  border-bottom: 1px solid var(--glass-border);
  padding: calc(var(--safe-top) + 10px) 16px 0;
}

.feed-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
}

.feed-logo-mobile {
  font-size: 23px;
  letter-spacing: -0.032em;
  line-height: 1;
}

.feed-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Search bar */
.search-bar-wrap { margin-bottom: 13px; }

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 50px;
  padding: 0 16px;
  height: 44px;
  transition: border-color 0.22s, box-shadow 0.22s;
}
.search-bar:focus-within {
  border-color: rgba(124, 58, 237, 0.55);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.10);
}

.search-icon { color: var(--text-muted); flex-shrink: 0; }

.search-input {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
  background: transparent;
  border: none;
  outline: none;
  min-width: 0;
}
.search-input::placeholder { color: var(--text-dim); }

/* Clear search X button */
.search-clear {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--glass-bg-med);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.18s;
  flex-shrink: 0;
  cursor: pointer;
  border: none;
}
.search-clear:hover { background: rgba(244, 63, 94, 0.20); color: var(--rose); }

/* Feed sub-tabs */
.feed-tabs {
  display: flex;
  gap: 4px;
  padding-bottom: 13px;
}

.feed-tab {
  padding: 8px 18px;
  border-radius: 50px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.22s var(--ease-spring);
  white-space: nowrap;
  cursor: pointer;
}
.feed-tab:hover { color: var(--text-primary); background: var(--glass-bg); }
.feed-tab.active {
  background: rgba(124, 58, 237, 0.16);
  border-color: rgba(124, 58, 237, 0.38);
  color: var(--violet-light);
  box-shadow: 0 0 18px rgba(124, 58, 237, 0.14);
}
.feed-tab:active { transform: scale(0.94); }

/* New-quotes pill */
.new-quotes-pill {
  position: fixed;
  top: 148px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 50px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--violet-light);
  border-color: rgba(124, 58, 237, 0.42);
  box-shadow: var(--glow-violet);
  animation: pillBounce 0.4s var(--ease-spring);
  white-space: nowrap;
  cursor: pointer;
}
@keyframes pillBounce {
  from { transform: translateX(-50%) translateY(-22px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0); opacity: 1; }
}
.new-quotes-pill:hover { background: rgba(124, 58, 237, 0.16); }

/* ─────────────────────────────────────────────────────────────────────────
   18. FEED GRID (masonry-style)
───────────────────────────────────────────────────────────────────────── */
.feed-grid {
  column-count: 2;
  column-gap: 11px;
  padding: 14px 12px 28px;
}

@media (min-width: 600px)  { .feed-grid { column-count: 2; padding: 14px 16px 28px; } }
@media (min-width: 768px)  { .feed-grid { column-count: 3; column-gap: 12px; } }
@media (min-width: 1100px) { .feed-grid { column-count: 4; } }
@media (min-width: 1400px) { .feed-grid { column-count: 5; } }

.feed-sentinel { height: 48px; }

/* ─────────────────────────────────────────────────────────────────────────
   19. FEED CARD WRAPPER
───────────────────────────────────────────────────────────────────────── */
.feed-card-wrap {
  break-inside: avoid;
  margin-bottom: 12px;
  cursor: pointer;
  position: relative;
  animation: cardEnter 0.42s var(--ease-out) both;
}

@keyframes cardEnter {
  from { transform: translateY(36px) scale(0.97); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* ─────────────────────────────────────────────────────────────────────────
   20. QUOTE CARD (the actual card element)
───────────────────────────────────────────────────────────────────────── */
.quote-card {
  aspect-ratio: 4 / 5;
  min-height: 180px;
  position: relative;
  overflow: hidden;
  border-radius: var(--card-radius);
  box-shadow: var(--glow-card);
  transition: transform 0.32s var(--ease-spring), box-shadow 0.32s;
  will-change: transform;
  display: block;
  width: 100%;
}

.feed-card-wrap:hover .quote-card {
  transform: translateY(-5px) scale(1.016);
  box-shadow: var(--glow-card-hover);
}

/* Inner layers */
.card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  border-radius: inherit;
}

.card-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
}

.card-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  padding: 20px;
  overflow: visible;
}

.card-content-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: visible;
}

/* Quote text — responsive auto-fit */
.card-text {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  overflow: visible;
  line-height: 1.38;
  letter-spacing: -0.008em;
  transition: font-size 0.12s ease, line-height 0.12s ease;
  display: block;
  max-width: 100%;
}

/* Author line */
.card-author {
  font-size: clamp(10px, 2.2vw, 14px);
  opacity: 0.82;
  margin-top: 6px;
  letter-spacing: 0.02em;
  line-height: 1.35;
  display: block;
  word-break: break-word;
}

/* Draggable text / author */
.card-text,
.card-author {
  cursor: grab;
  position: relative;
  will-change: transform;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  border-radius: 4px;
  transition: outline 0.16s ease, transform 0.05s;
}

.card-text:hover,
.card-author:hover {
  outline: 2px dashed rgba(255, 255, 255, 0.32);
  outline-offset: 5px;
}

.card-text.is-dragging,
.card-author.is-dragging {
  cursor: grabbing;
  outline: 2px solid rgba(255, 255, 255, 0.65);
  outline-offset: 5px;
}

/* Subtle inner border glow */
.quote-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.10);
  pointer-events: none;
  z-index: 10;
  transition: border-color 0.32s;
}
.feed-card-wrap:hover .quote-card::after {
  border-color: rgba(124, 58, 237, 0.48);
  box-shadow: inset 0 0 36px rgba(124, 58, 237, 0.06);
}

/* Private badge */
.private-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 12;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: rgba(91, 33, 182, 0.90);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  letter-spacing: 0.04em;
}

/* Card meta row (below card) */
.card-meta {
  padding: 7px 2px 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.card-meta-author {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.card-meta-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.card-action-btn {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s var(--ease-spring);
  padding: 3px;
  cursor: pointer;
  background: none;
  border: none;
}
.card-action-btn:hover { color: var(--text-primary); transform: scale(1.14); }
.card-action-btn:active { transform: scale(0.84); }
.card-action-btn.liked { color: var(--rose); }
.card-action-btn.saved { color: var(--amber); }

/* Heart pop animation */
@keyframes heartPop {
  0%   { transform: scale(1); }
  38%  { transform: scale(1.55); }
  65%  { transform: scale(0.84); }
  100% { transform: scale(1); }
}
.heart-pop { animation: heartPop 0.36s var(--ease-spring); }

/* Hashtag pills in feed */
.card-hashtags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px 2px 2px;
}

.hashtag-pill {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 10px;
  background: rgba(124, 58, 237, 0.14);
  border: 1px solid rgba(124, 58, 237, 0.24);
  font-size: 10px;
  font-weight: 700;
  color: var(--violet-light);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  border: none;
  background: rgba(124, 58, 237, 0.14);
  border: 1px solid rgba(124, 58, 237, 0.24);
}
.hashtag-pill:hover {
  background: rgba(124, 58, 237, 0.28);
  border-color: rgba(124, 58, 237, 0.52);
  transform: translateY(-1px);
}
.hashtag-pill:active { transform: scale(0.92); }

/* ─────────────────────────────────────────────────────────────────────────
   21. SKELETON LOADERS
───────────────────────────────────────────────────────────────────────── */
.feed-skeleton {
  column-count: 2;
  column-gap: 11px;
  padding: 14px 12px 24px;
}

@media (min-width: 768px)  { .feed-skeleton { column-count: 3; } }
@media (min-width: 1100px) { .feed-skeleton { column-count: 4; } }

.skel-card {
  break-inside: avoid;
  margin-bottom: 12px;
  aspect-ratio: 4 / 5;
  border-radius: var(--card-radius);
  background: linear-gradient(
    90deg,
    var(--base-3) 25%,
    var(--base-5) 50%,
    var(--base-3) 75%
  );
  background-size: 240% 100%;
  animation: skelShimmer 1.7s ease-in-out infinite;
}
.skel-card:nth-child(even) { aspect-ratio: 4 / 5.6; }

@keyframes skelShimmer {
  0%   { background-position: 240% 0; }
  100% { background-position: -240% 0; }
}

/* ─────────────────────────────────────────────────────────────────────────
   22. EMPTY STATES
───────────────────────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
  gap: 12px;
}

.empty-icon {
  font-size: 38px;
  opacity: 0.38;
  animation: emptyPulse 3.2s ease-in-out infinite;
}

@keyframes emptyPulse {
  0%, 100% { transform: scale(1); opacity: 0.38; }
  50%       { transform: scale(1.12); opacity: 0.62; }
}

.empty-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-secondary);
}

.empty-sub {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 260px;
  line-height: 1.65;
}

/* ─────────────────────────────────────────────────────────────────────────
   23. SEARCH RESULTS
───────────────────────────────────────────────────────────────────────── */
.search-results {
  padding: 16px 12px;
  animation: fadeIn 0.3s var(--ease-out);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.search-results-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.user-result-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
}
.user-result-card:hover { background: var(--glass-bg-med); border-color: var(--glass-border-med); }

.user-result-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--base-5);
}

.user-result-info { flex: 1; min-width: 0; }
.user-result-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
}
.user-result-handle {
  font-size: 12px;
  color: var(--text-muted);
}

/* ─────────────────────────────────────────────────────────────────────────
   24. CREATE SECTION — LAYOUT
───────────────────────────────────────────────────────────────────────── */

/* ── Mobile (< 1024px): stacked, preview fixed top ── */
@media (max-width: 1023px) {
  #section-create {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
  }

  .create-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
  }

  .create-preview-wrap {
    position: relative;
    /* mobile: takes ~46% of viewport height */
    height: 46dvh;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: calc(var(--safe-top) + 10px) 20px 10px;
    background: linear-gradient(180deg, rgba(9, 9, 26, 0.95) 0%, transparent 100%);
    border-bottom: 1px solid var(--glass-border);
    overflow: hidden;
    gap: 8px;
  }

  /* Card sized by height on mobile, width derived from 4:5 ratio */
  #quote-card {
    height: calc(46dvh - calc(var(--safe-top) + 68px));
    width: auto !important;
    max-width: none !important;
    aspect-ratio: 4 / 5;
    flex-shrink: 0;
  }

  .create-edit-panel {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px 14px calc(var(--tabbar-h) + var(--safe-bottom) + 28px);
  }
}

/* ── Tablet (768–1023px): slightly taller preview ── */
@media (min-width: 768px) and (max-width: 1023px) {
  .create-preview-wrap {
    height: 50dvh;
  }

  #quote-card {
    height: calc(50dvh - 76px);
  }
}

/* ── Desktop (≥ 1024px): two-column layout ── */
@media (min-width: 1024px) {
  #section-create {
    display: block;
    min-height: 100dvh;
    padding-top: 28px;
  }

  .create-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 36px;
    padding: 0 36px 48px;
    align-items: start;
    min-height: 100%;
  }

  .create-preview-wrap {
    position: sticky;
    top: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px;
    gap: 12px;
  }

  #quote-card {
    width: 100%;
    max-width: 380px;
  }

  .create-edit-panel {
    overflow-y: auto;
    max-height: calc(100dvh - 56px);
    padding: 0 0 48px;
  }
}

/* Toolbar (reset button row) */
.create-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

/* Preview label */
.preview-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  align-self: flex-start;
}

/* Fit indicator chip */
.fit-indicator {
  font-size: 11px;
  color: var(--text-dim);
  font-family: 'Space Mono', monospace;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 4px 11px;
  border-radius: 50px;
}

.preview-meta-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─────────────────────────────────────────────────────────────────────────
   25. EDIT PANEL GROUPS
───────────────────────────────────────────────────────────────────────── */
.edit-group {
  margin-bottom: 14px;
  padding: 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--panel-radius);
  transition: border-color 0.22s;
}

.edit-group:focus-within {
  border-color: rgba(124, 58, 237, 0.28);
}

.edit-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.edit-group-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 10px;
}

.edit-group-hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.6;
  font-size: 10px;
}

/* Quote text textarea */
.edit-textarea {
  width: 100%;
  background: var(--base-4);
  border: 1px solid var(--glass-border);
  border-radius: 13px;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--text-primary);
  resize: none;
  line-height: 1.65;
  transition: border-color 0.22s, box-shadow 0.22s;
  min-height: 88px;
  white-space: pre-wrap;
}
.edit-textarea:focus {
  border-color: rgba(124, 58, 237, 0.55);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.10);
}
.edit-textarea::placeholder { color: var(--text-dim); }

.edit-input {
  width: 100%;
  background: var(--base-4);
  border: 1px solid var(--glass-border);
  border-radius: 13px;
  padding: 11px 14px;
  font-size: 14px;
  color: var(--text-primary);
  transition: border-color 0.22s, box-shadow 0.22s;
}
.edit-input:focus {
  border-color: rgba(124, 58, 237, 0.55);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.10);
}
.edit-input::placeholder { color: var(--text-dim); }

.edit-hint {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 6px;
  line-height: 1.5;
}

.edit-panel-bottom-pad { height: 48px; }

/* ─────────────────────────────────────────────────────────────────────────
   26. TOGGLE SWITCH
───────────────────────────────────────────────────────────────────────── */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-label {
  font-size: 12px;
  color: var(--text-muted);
}

.toggle-btn {
  width: 44px;
  height: 26px;
  border-radius: 13px;
  background: var(--base-5);
  border: 1px solid var(--glass-border);
  position: relative;
  transition: all 0.26s var(--ease-smooth);
  cursor: pointer;
  flex-shrink: 0;
}
.toggle-btn.active {
  background: var(--grad-violet);
  border-color: transparent;
  box-shadow: 0 0 14px rgba(124, 58, 237, 0.55);
}

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.50);
  transition: all 0.26s var(--ease-spring);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.toggle-btn.active .toggle-thumb {
  left: calc(100% - 21px);
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

/* ─────────────────────────────────────────────────────────────────────────
   27. VISIBILITY BUTTONS
───────────────────────────────────────────────────────────────────────── */
.visibility-btns {
  display: flex;
  gap: 8px;
}

.vis-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 14px;
  border-radius: 13px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--base-4);
  border: 1px solid var(--glass-border);
  transition: all 0.22s var(--ease-smooth);
  cursor: pointer;
}
.vis-btn:hover { color: var(--text-primary); border-color: var(--glass-border-med); }
.vis-btn.active {
  background: rgba(124, 58, 237, 0.16);
  border-color: rgba(124, 58, 237, 0.48);
  color: var(--violet-light);
  box-shadow: 0 0 18px rgba(124, 58, 237, 0.12);
}
.vis-btn:active { transform: scale(0.95); }

/* ─────────────────────────────────────────────────────────────────────────
   28. HASHTAG INPUT
───────────────────────────────────────────────────────────────────────── */
.hashtag-input-wrap {
  border-radius: 14px;
  padding: 10px 12px;
  min-height: 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  cursor: text;
  transition: border-color 0.22s;
}
.hashtag-input-wrap:focus-within { border-color: rgba(124, 58, 237, 0.52); }

.hashtag-pills-row { display: contents; }

.hashtag-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: 13px;
  background: rgba(124, 58, 237, 0.18);
  border: 1px solid rgba(124, 58, 237, 0.32);
  font-size: 12px;
  font-weight: 700;
  color: var(--violet-light);
  white-space: nowrap;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hashtag-tag-remove {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.16s;
  color: rgba(255, 255, 255, 0.70);
  line-height: 1;
  border: none;
}
.hashtag-tag-remove:hover { background: var(--rose); color: #fff; }

.hashtag-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 13px;
  flex: 1;
  min-width: 80px;
  font-family: inherit;
}
.hashtag-input::placeholder { color: var(--text-dim); }

/* ─────────────────────────────────────────────────────────────────────────
   29. TEMPLATES ROW
───────────────────────────────────────────────────────────────────────── */
.templates-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
  padding-left: 2px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 58, 237, 0.28) transparent;
}
.templates-row::-webkit-scrollbar         { height: 4px; }
.templates-row::-webkit-scrollbar-track  { background: transparent; }
.templates-row::-webkit-scrollbar-thumb  { background: rgba(124, 58, 237, 0.30); border-radius: 4px; }
.templates-row::-webkit-scrollbar-thumb:hover { background: rgba(124, 58, 237, 0.55); }

.template-thumb {
  scroll-snap-align: start;
  flex-shrink: 0;
  width: 76px;
  aspect-ratio: 4 / 5;
  border-radius: 11px;
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.24s var(--ease-spring);
  position: relative;
  background: var(--base-4);
}
.template-thumb:hover {
  transform: scale(1.09);
  border-color: var(--glass-border-med);
}
.template-thumb.selected {
  border-color: var(--violet);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.38), var(--glow-violet-sm);
  transform: scale(1.06);
}
.template-thumb:active { transform: scale(0.94); }

.template-name-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.66);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  padding: 4px 2px;
}

/* ─────────────────────────────────────────────────────────────────────────
   30. BACKGROUND TYPE TABS
───────────────────────────────────────────────────────────────────────── */
.bg-type-tabs {
  display: flex;
  gap: 3px;
  margin-bottom: 12px;
  background: var(--base-4);
  border-radius: 12px;
  padding: 4px;
}

.bg-type-tab {
  flex: 1;
  padding: 8px 4px;
  border-radius: 9px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 12px;
  color: var(--text-muted);
  transition: all 0.22s var(--ease-smooth);
  text-align: center;
  cursor: pointer;
  border: none;
  background: none;
}
.bg-type-tab.active {
  background: rgba(124, 58, 237, 0.22);
  color: var(--violet-light);
  box-shadow: 0 0 14px rgba(124, 58, 237, 0.14);
}
.bg-type-tab:active { transform: scale(0.94); }

.bg-panel { margin-top: 8px; }

/* Color pickers */
.color-pick-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.color-picker {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 2px solid var(--glass-border-med);
  padding: 3px;
  background: var(--base-4);
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
  -webkit-appearance: none;
  appearance: none;
}
.color-picker:hover { border-color: var(--violet-light); transform: scale(1.09); }
.color-picker::-webkit-color-swatch-wrapper { padding: 0; border-radius: 8px; }
.color-picker::-webkit-color-swatch        { border: none; border-radius: 8px; }

/* Image bg grid */
.image-bg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.image-bg-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: var(--base-4);
  cursor: pointer;
  transition: all 0.22s var(--ease-spring);
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
}
.image-bg-opt:hover { border-color: var(--glass-border-med); color: var(--text-primary); }
.image-bg-opt[aria-checked="true"] {
  border-color: var(--violet);
  box-shadow: 0 0 18px rgba(124, 58, 237, 0.28);
  color: var(--violet-light);
}
.image-bg-opt:active { transform: scale(0.95); }

.image-bg-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
}

/* CSS image bg presets */
.image-bg-forest {
  background: radial-gradient(ellipse at 60% 40%, #1a3a1a 0%, #0d1f0d 60%, #080f08 100%);
}
.image-bg-bokeh {
  background:
    radial-gradient(ellipse at 30% 50%, rgba(255, 140, 0, 0.60), transparent 50%),
    radial-gradient(ellipse at 70% 30%, rgba(255, 215, 0, 0.40), transparent 45%),
    radial-gradient(ellipse at 50% 70%, rgba(255, 100, 50, 0.30), transparent 45%),
    #0d0805;
}
.image-bg-marble {
  background:
    repeating-linear-gradient(60deg, transparent, transparent 28px, rgba(130,130,130,0.04) 28px, rgba(130,130,130,0.04) 29px),
    linear-gradient(135deg, #e8e4e0 0%, #f0ede8 40%, #d8d4d0 70%, #e4e0dc 100%);
}
.image-bg-stars {
  background: radial-gradient(ellipse at 50% 50%, #0a0a1a 0%, #000005 100%);
}

/* Upload button */
.upload-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--base-4);
  border: 1.5px dashed var(--glass-border-med);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
  margin-bottom: 10px;
  width: 100%;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
}
.upload-btn:hover {
  border-color: var(--violet-light);
  color: var(--violet-light);
  background: rgba(124, 58, 237, 0.08);
}

/* Overlay / gradient angle sliders */
.slider-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ─────────────────────────────────────────────────────────────────────────
   31. FONT PILLS
───────────────────────────────────────────────────────────────────────── */
.font-pills-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.font-pills-row::-webkit-scrollbar { display: none; }

.font-pill {
  flex-shrink: 0;
  padding: 8px 15px;
  border-radius: 50px;
  font-size: 14px;
  color: var(--text-muted);
  background: var(--base-4);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all 0.22s var(--ease-spring);
  white-space: nowrap;
  font-family: inherit;
}
.font-pill:hover { color: var(--text-primary); border-color: var(--glass-border-med); }
.font-pill.active {
  background: rgba(124, 58, 237, 0.18);
  border-color: rgba(124, 58, 237, 0.48);
  color: var(--violet-light);
}
.font-pill:active { transform: scale(0.93); }

/* ─────────────────────────────────────────────────────────────────────────
   32. SLIDERS
───────────────────────────────────────────────────────────────────────── */
.edit-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  cursor: pointer;
  transition: height 0.16s;
  background: linear-gradient(
    to right,
    var(--violet) 0%,
    var(--violet) var(--pct, 50%),
    var(--base-5) var(--pct, 50%),
    var(--base-5) 100%
  );
}
.edit-slider:hover { height: 8px; }

.edit-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.42), 0 0 0 2.5px rgba(124,58,237,0.65);
  cursor: pointer;
  transition: all 0.22s var(--ease-spring);
}
.edit-slider::-webkit-slider-thumb:hover { transform: scale(1.22); }
.edit-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.42), 0 0 0 2.5px rgba(124,58,237,0.65);
  cursor: pointer;
  border: none;
}

/* ─────────────────────────────────────────────────────────────────────────
   33. ALIGNMENT / SIZE MODE BUTTONS
───────────────────────────────────────────────────────────────────────── */
.align-btns,
.size-mode-btns {
  display: flex;
  gap: 6px;
}

.align-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: 11px;
  color: var(--text-muted);
  background: var(--base-4);
  border: 1px solid var(--glass-border);
  transition: all 0.2s var(--ease-smooth);
  cursor: pointer;
}
.align-btn:hover { color: var(--text-primary); border-color: var(--glass-border-med); }
.align-btn.active {
  background: rgba(124, 58, 237, 0.17);
  border-color: rgba(124, 58, 237, 0.48);
  color: var(--violet-light);
}
.align-btn:active { transform: scale(0.92); }

.size-mode-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--base-4);
  border: 1px solid var(--glass-border);
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.2s var(--ease-smooth);
  cursor: pointer;
}
.size-mode-btn.active {
  background: rgba(124, 58, 237, 0.17);
  border-color: rgba(124, 58, 237, 0.48);
  color: var(--violet-light);
}
.size-mode-btn:active { transform: scale(0.94); }

.post-btn-wrap { padding: 10px 0 0; }

/* ─────────────────────────────────────────────────────────────────────────
   34. PROFILE SECTION
───────────────────────────────────────────────────────────────────────── */
.profile-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 16px 18px;
  border-bottom: 1px solid var(--glass-border);
}

@media (min-width: 500px) {
  .profile-header { padding: 28px 24px 22px; }
}

.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: fit-content;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--base-5);
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 500px) {
  .profile-avatar { width: 96px; height: 96px; }
}

.profile-avatar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  background: var(--grad-brand) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  animation: ringPulse 3.2s ease-in-out infinite;
}

@keyframes ringPulse {
  0%, 100% { opacity: 0.55; }
  50%       { opacity: 1; box-shadow: 0 0 22px rgba(124, 58, 237, 0.65); }
}

.profile-info { width: 100%; }

.profile-display-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: clamp(18px, 5vw, 22px);
  letter-spacing: -0.025em;
  color: var(--text-primary);
  line-height: 1.2;
}

.profile-username {
  font-size: 14px;
  color: var(--violet-light);
  margin: 3px 0 8px;
  font-weight: 500;
}

.profile-bio {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  overflow-wrap: break-word;
  white-space: pre-wrap;
  display: block;
  width: 100%;
}

/* Stats row */
.profile-stats-row {
  display: flex;
  border-bottom: 1px solid var(--glass-border);
}

.profile-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 8px;
  gap: 4px;
  cursor: pointer;
  transition: background 0.2s;
  border-right: 1px solid var(--glass-border);
  background: transparent;
  border-top: none;
  border-bottom: none;
  border-left: none;
}
.profile-stat:last-child { border-right: none; }
.profile-stat:hover { background: var(--glass-bg); }
.profile-stat:active { transform: scale(0.97); }

.stat-num {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* Profile tabs */
.profile-tabs {
  display: flex;
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.profile-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 14px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all 0.22s var(--ease-smooth);
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.profile-tab:hover { color: var(--text-primary); background: var(--glass-bg); }
.profile-tab.active {
  color: var(--violet-light);
  border-bottom-color: var(--violet);
}

.profile-tab.owner-only { display: none; }
.profile-tab.private-only { display: none; }

.profile-grid { margin-top: 0; }

/* ─────────────────────────────────────────────────────────────────────────
   35. QUOTE DETAIL MODAL
───────────────────────────────────────────────────────────────────────── */
.detail-modal-card {
  max-width: 580px;
  padding: 20px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  max-height: 94dvh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(124,58,237,0.3) transparent;
}

@media (min-width: 640px) {
  .detail-modal-card {
    max-height: 90dvh;
    padding: 28px 24px 22px;
  }
}

.detail-card-wrap {
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}

.detail-card-wrap .quote-card {
  pointer-events: none;
  max-width: 100%;
  width: 100%;
}

.detail-author-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--base-5);
  flex-shrink: 0;
}

.detail-author-info { flex: 1; min-width: 0; }

.detail-display-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-username {
  font-size: 12px;
  color: var(--violet-light);
  font-weight: 500;
}

/* Action row */
.detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 13px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--glass-bg-med);
  border: 1px solid var(--glass-border);
  transition: all 0.22s var(--ease-spring);
  cursor: pointer;
}
.action-btn:hover {
  color: var(--text-primary);
  border-color: var(--glass-border-med);
  transform: translateY(-1px);
}
.action-btn:active { transform: scale(0.93); }

.action-btn.liked {
  color: var(--rose);
  background: rgba(244, 63, 94, 0.10);
  border-color: rgba(244, 63, 94, 0.28);
}
.action-btn.saved {
  color: var(--amber);
  background: rgba(245, 158, 11, 0.10);
  border-color: rgba(245, 158, 11, 0.28);
}

.heart-icon { transition: all 0.2s; }
.action-btn.liked .heart-icon { fill: var(--rose); stroke: var(--rose); }

/* Detail hashtags */
.detail-hashtags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Comments section */
.detail-comments-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comments-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(124,58,237,0.25) transparent;
}

.comments-empty {
  font-size: 13px;
  color: var(--text-dim);
  padding: 12px 0;
}

.comment-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: commentSlideIn 0.3s var(--ease-spring);
}

@keyframes commentSlideIn {
  from { transform: translateY(14px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.comment-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--base-5);
  flex-shrink: 0;
}

.comment-body { flex: 1; min-width: 0; }
.comment-author {
  font-size: 12px;
  font-weight: 700;
  color: var(--violet-light);
  margin-bottom: 2px;
}
.comment-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  word-break: break-word;
}
.comment-delete {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 12px;
  flex-shrink: 0;
  transition: all 0.16s;
  cursor: pointer;
  background: none;
  border: none;
}
.comment-delete:hover { background: rgba(244, 63, 94, 0.14); color: var(--rose); }

/* Comment input row */
.comment-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--glass-border);
  padding: 14px 0 0;
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(8, 8, 24, 0.94) 40%);
  z-index: 2;
}

.comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--base-5);
  flex-shrink: 0;
}

.comment-input {
  flex: 1;
  border-radius: 50px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-primary);
  min-width: 0;
  transition: border-color 0.22s;
  font-family: inherit;
}
.comment-input:focus { border-color: rgba(124, 58, 237, 0.52); }
.comment-input::placeholder { color: var(--text-dim); }

.comment-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--grad-violet);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.42);
  transition: all 0.22s var(--ease-spring);
  cursor: pointer;
  border: none;
}
.comment-send-btn:hover { transform: scale(1.12); box-shadow: var(--glow-violet); }
.comment-send-btn:active { transform: scale(0.90); }

/* ─────────────────────────────────────────────────────────────────────────
   36. FOLLOW MODAL
───────────────────────────────────────────────────────────────────────── */
.follow-modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 16px;
}

.follow-modal-tab {
  flex: 1;
  padding: 12px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all 0.22s var(--ease-smooth);
  text-align: center;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.follow-modal-tab.active {
  color: var(--violet-light);
  border-bottom-color: var(--violet);
}

.follow-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 52dvh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(124,58,237,0.25) transparent;
}

.follow-user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  transition: background 0.2s;
  cursor: pointer;
}
.follow-user-item:hover { background: var(--glass-bg); }

.follow-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--base-5);
  flex-shrink: 0;
}

.follow-user-info { flex: 1; min-width: 0; }
.follow-user-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
}
.follow-user-handle {
  font-size: 12px;
  color: var(--text-muted);
}

/* ─────────────────────────────────────────────────────────────────────────
   37. NOTIFICATION DRAWER
───────────────────────────────────────────────────────────────────────── */
.notif-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(370px, 92vw);
  z-index: var(--z-drawer);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--glass-border);
  border-radius: 0;
  animation: drawerSlideIn 0.32s var(--ease-spring);
}

@keyframes drawerSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.notif-backdrop {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-drawer) - 1);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.notif-drawer-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.notif-drawer-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
  flex: 1;
}

.notif-mark-read {
  font-size: 12px;
  font-weight: 700;
  color: var(--violet-light);
  padding: 5px 11px;
  border-radius: 50px;
  border: 1px solid rgba(124, 58, 237, 0.30);
  background: rgba(124, 58, 237, 0.10);
  transition: all 0.2s;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
}
.notif-mark-read:hover { background: rgba(124, 58, 237, 0.22); }

.notif-close { position: static; flex-shrink: 0; }

.notif-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(124,58,237,0.25) transparent;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  transition: background 0.2s;
  cursor: pointer;
  position: relative;
}
.notif-item:hover { background: var(--glass-bg); }
.notif-item.unread::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.75);
}

.notif-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--base-5);
  flex-shrink: 0;
}

.notif-content { flex: 1; min-width: 0; }
.notif-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  word-break: break-word;
}
.notif-text strong { color: var(--text-primary); font-weight: 700; }
.notif-time {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 3px;
}

/* ─────────────────────────────────────────────────────────────────────────
   38. OTHER USER PROFILE MODAL
───────────────────────────────────────────────────────────────────────── */
.user-profile-modal-card {
  max-width: 640px;
  max-height: 90dvh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(124,58,237,0.25) transparent;
}

.up-profile-header {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.up-grid { margin-top: 8px; }

/* ─────────────────────────────────────────────────────────────────────────
   39. TOAST NOTIFICATIONS
───────────────────────────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
  align-items: center;
  width: min(400px, calc(100vw - 32px));
}

@media (min-width: 1024px) {
  #toast-container {
    bottom: 28px;
    left: calc(var(--sidebar-w) + 28px);
    transform: none;
    align-items: flex-start;
  }
}

.toast {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 18px;
  border-radius: 16px;
  background: rgba(10, 10, 28, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--glass-border);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  pointer-events: auto;
  white-space: nowrap;
  max-width: 100%;
  border-left: 3px solid var(--violet);
  animation: toastIn 0.36s var(--ease-spring) both;
  line-height: 1.4;
}

.toast.toast-success { border-left-color: var(--violet); }
.toast.toast-error   { border-left-color: var(--rose); }
.toast.toast-info    { border-left-color: var(--cyan); }
.toast.toast-warning { border-left-color: var(--amber); }

@keyframes toastIn {
  from { transform: translateY(22px) scale(0.92); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.toast.removing {
  animation: toastOut 0.26s var(--ease-in) forwards;
}

@keyframes toastOut {
  to { transform: translateY(18px) scale(0.90); opacity: 0; }
}

.toast-icon { font-size: 16px; flex-shrink: 0; }

/* ─────────────────────────────────────────────────────────────────────────
   40. HEART PARTICLES
───────────────────────────────────────────────────────────────────────── */
.heart-particle {
  position: fixed;
  pointer-events: none;
  z-index: calc(var(--z-modal) + 20);
  font-size: 13px;
  animation: heartFloat 0.72s var(--ease-out) forwards;
}

@keyframes heartFloat {
  from { transform: translate(0, 0) scale(1); opacity: 1; }
  to   { transform: translate(var(--dx, 20px), var(--dy, -42px)) scale(0.1); opacity: 0; }
}

/* ─────────────────────────────────────────────────────────────────────────
   41. CARD OVERLAY EFFECTS (injected by JS)
───────────────────────────────────────────────────────────────────────── */
.star-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.85) 0%, transparent 100%),
    radial-gradient(1px 1px at 30% 65%, rgba(255,255,255,0.65) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 70% 15%, rgba(255,255,255,0.75) 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 40%, rgba(255,255,255,0.55) 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 80%, rgba(255,255,255,0.65) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 20% 90%, rgba(255,255,255,0.45) 0%, transparent 100%),
    radial-gradient(1px 1px at 60% 50%, rgba(255,255,255,0.55) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 75%, rgba(255,255,255,0.75) 0%, transparent 100%),
    radial-gradient(1px 1px at 40% 35%, rgba(255,255,255,0.45) 0%, transparent 100%),
    radial-gradient(2px 2px at 75% 90%, rgba(255,255,255,0.35) 0%, transparent 100%);
  pointer-events: none;
}

.neon-grid {
  position: absolute;
  inset: 0;
  z-index: 3;
  background-image:
    linear-gradient(rgba(191, 95, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(191, 95, 255, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.wave-decoration {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 38%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 60' preserveAspectRatio='none'%3E%3Cpath d='M0,30 C100,10 200,50 400,20 L400,60 L0,60 Z' fill='rgba(127,255,255,0.08)'/%3E%3C/svg%3E") no-repeat bottom / 100% auto;
  pointer-events: none;
  z-index: 3;
}

/* ─────────────────────────────────────────────────────────────────────────
   42. DESKTOP OVERRIDES
───────────────────────────────────────────────────────────────────────── */
@media (min-width: 1024px) {
  #sidebar        { display: flex; }
  #bottom-tabbar  { display: none !important; }

  #main-content {
    margin-left: var(--sidebar-w);
    padding-bottom: 0;
  }

  .feed-logo-mobile  { display: none; }
  .btn-signout-mobile-wrap { display: none; }

  .feed-topbar {
    padding-top: 18px;
    padding-left: 28px;
    padding-right: 28px;
  }

  .feed-grid    { padding: 18px 28px 36px; }
  .feed-skeleton { padding: 18px 28px; }

  .profile-header { padding: 36px 36px 28px; }

  #toast-container { bottom: 28px; }

  .detail-modal-card { padding: 32px 28px 28px; }
  .detail-card-wrap  { max-width: 300px; }

  .edit-group    { padding: 18px 20px; border-radius: 22px; }
  .notif-drawer  { border-radius: 0; }
}

/* ─────────────────────────────────────────────────────────────────────────
   43. SMALL PHONE (< 375px)
───────────────────────────────────────────────────────────────────────── */
@media (max-width: 375px) {
  .feed-tab      { padding: 7px 11px; font-size: 12px; }
  .edit-group    { padding: 12px; }
  .template-thumb { width: 62px; }
  .detail-modal-card { padding: 18px 14px 16px; }
  .tab-btn       { padding: 8px 12px; min-width: 50px; }
}

/* ─────────────────────────────────────────────────────────────────────────
   44. ACCESSIBILITY — REDUCED MOTION
───────────────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .aurora-layer { animation: none; }
  .splash-logo-mark { animation: none; }
  .splash-logo-particles { animation: none; }
}

/* ─────────────────────────────────────────────────────────────────────────
   45. HIGH CONTRAST
───────────────────────────────────────────────────────────────────────── */
@media (prefers-contrast: high) {
  :root {
    --glass-border:       rgba(255, 255, 255, 0.38);
    --glass-border-med:   rgba(255, 255, 255, 0.55);
    --glass-border-light: rgba(255, 255, 255, 0.72);
    --text-muted:         rgba(200, 195, 255, 0.88);
    --text-dim:           rgba(160, 155, 225, 0.72);
  }
}

/* ─────────────────────────────────────────────────────────────────────────
   46. PRINT
───────────────────────────────────────────────────────────────────────── */
@media print {
  .aurora-bg,
  #sidebar,
  #bottom-tabbar,
  .feed-topbar,
  #toast-container,
  .notif-drawer,
  .notif-backdrop { display: none !important; }

  body { background: #fff; color: #000; }
  .quote-card { box-shadow: 0 0 0 1px #ccc; }
}
.qotd-banner {
  column-span: all;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(124,58,237,0.18), rgba(244,63,94,0.12));
  border: 1px solid rgba(124,58,237,0.32);
  border-radius: 20px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: all 0.24s;
}
.qotd-banner:hover { border-color: rgba(124,58,237,0.58); background: linear-gradient(135deg,rgba(124,58,237,0.26),rgba(244,63,94,0.18)); }
.qotd-label {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet-light);
  margin-bottom: 12px;
  text-align: center;
}
/* ═══════════════════════════════════════════════════════════════════════════
   END OF STYLE.CSS
   MyQuotIQ · Prospero Universe & Prospero Webworks
   ═══════════════════════════════════════════════════════════════════════════ */