/* ============================================================
   FutiaSpace – Premium + Animated Professional Stylesheet
   Dark Mode, Mobile-First, Violet × Amber, Lucide Icons
   Refined • Premium • Addictive
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

:root {
  /* ── Core Palette ── */
  --color-bg: #06080F;
  --color-surface: #0D1321;
  --color-surface-hover: #151F35;
  --color-surface-glass: rgba(13, 19, 33, 0.82);

  /* ── Violet System ── */
  --color-primary: #B89EFF;
  --color-primary-bg: #7C3AED;
  --color-primary-bright: #A78BFA;
  --color-primary-glow: rgba(124, 58, 237, 0.45);
  --color-primary-subtle: rgba(167, 139, 250, 0.08);
  --color-primary-border: rgba(167, 139, 250, 0.2);

  /* ── Amber Accent ── */
  --color-accent: #FBBF24;
  --color-accent-dim: #F59E0B;
  --color-accent-glow: rgba(251, 191, 36, 0.3);
  --color-accent-subtle: rgba(251, 191, 36, 0.08);

  /* ── Text ── */
  --color-text: #F0F4FF;
  --color-text-secondary: #8A9BBC;
  --color-text-muted: #3E4F68;

  /* ── Semantic ── */
  --color-success: #34D399;
  --color-success-bg: rgba(52, 211, 153, 0.1);
  --color-danger: #F87171;
  --color-danger-bg: rgba(248, 113, 113, 0.1);

  /* ── Shape ── */
  --border-radius: 16px;
  --border-radius-sm: 10px;
  --border-radius-lg: 22px;
  --border-radius-xl: 28px;

  /* ── Layout ── */
  --max-app-width: 480px;
  --nav-height: 68px;
  --header-height: 60px;

  /* ── Borders ── */
  --border-subtle: 1px solid rgba(255, 255, 255, 0.05);
  --border-active: 1px solid rgba(167, 139, 250, 0.35);
  --border-card: 1px solid rgba(255, 255, 255, 0.04);

  /* ── Shadows ── */
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.7);
  --shadow-violet: 0 4px 28px rgba(124, 58, 237, 0.35);
  --shadow-violet-lg: 0 8px 40px rgba(124, 58, 237, 0.45);
  --shadow-amber: 0 4px 20px rgba(251, 191, 36, 0.25);
  --shadow-inner: inset 0 1px 0 rgba(255, 255, 255, 0.06);

  /* ── Gradients ── */
  --gradient-surface: linear-gradient(180deg, #0D1321 0%, #080C18 100%);
  --gradient-primary: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
  --gradient-primary-vivid: linear-gradient(135deg, #9D6EFF 0%, #6D28D9 100%);
  --gradient-card: linear-gradient(180deg, rgba(21, 31, 53, 0.7) 0%, rgba(13, 19, 33, 0.95) 100%);
  --gradient-amber: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
  --gradient-overlay: linear-gradient(180deg, transparent 0%, rgba(6, 8, 15, 0.95) 100%);

  /* ── Transitions ── */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 220ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ========== RESET & BASE ANIMATIONS ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--color-bg);
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -5%, rgba(109, 40, 217, 0.14) 0%, transparent 65%),
    radial-gradient(ellipse 45% 35% at 85% 85%, rgba(251, 191, 36, 0.05) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 10% 60%, rgba(124, 58, 237, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--color-text);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.012em;
  font-size: 16px;
  line-height: 1.5;
  animation: bodyFadeIn 0.6s ease;
}

@keyframes bodyFadeIn {
  from { opacity: 0.8; }
  to { opacity: 1; }
}

#app {
  width: 100%;
  max-width: var(--max-app-width);
  min-height: 100vh;
  background: rgba(6, 8, 15, 0.98);
  position: relative;
  overflow-x: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 0 100px rgba(0, 0, 0, 0.9),
    0 0 140px rgba(109, 40, 217, 0.07);
  animation: appSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes appSlideUp {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ========== TOP BAR ========== */
.app-header {
  height: var(--header-height);
  background: rgba(6, 8, 15, 0.90);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: var(--border-subtle);
  box-shadow:
    0 1px 0 rgba(167, 139, 250, 0.04),
    0 4px 24px rgba(0, 0, 0, 0.35),
    var(--shadow-inner);
  transition: background var(--transition-base);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hamburger-btn {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--border-radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast), transform var(--transition-spring);
  display: flex;
  align-items: center;
}

.hamburger-btn:hover {
  color: var(--color-text);
  background: var(--color-primary-subtle);
  transform: scale(1.08);
}

.hamburger-btn:active {
  transform: scale(0.95);
}

.logo-container {
  width: 38px;
  height: 38px;
  background: var(--gradient-primary-vivid);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-violet), var(--shadow-inner);
  border: 1px solid rgba(167, 139, 250, 0.2);
  transition: box-shadow var(--transition-base), transform var(--transition-spring);
  animation: logoPulse 3s infinite;
}

@keyframes logoPulse {
  0% { box-shadow: var(--shadow-violet); }
  50% { box-shadow: var(--shadow-violet-lg); }
  100% { box-shadow: var(--shadow-violet); }
}

.logo-container:hover {
  box-shadow: var(--shadow-violet-lg), var(--shadow-inner);
  transform: scale(1.06);
}

.logo-container img {
  width: 24px;
  height: 24px;
}

.avatar-mini {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-surface-hover);
  border: 2px solid rgba(167, 139, 250, 0.25);
  transition: border-color var(--transition-base), transform var(--transition-spring), box-shadow var(--transition-base);
}

.avatar-mini:hover {
  border-color: var(--color-primary-bright);
  transform: scale(1.08);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15);
}

.logo-text {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #F0F4FF 0%, #C4B5FD 60%, #A78BFA 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-left: 8px;
  animation: textShine 2s infinite alternate;
}

@keyframes textShine {
  from { background-position: 0% center; }
  to { background-position: 200% center; }
}

/* ========== MAIN CONTENT ========== */
.main-content {
  padding-bottom: calc(var(--nav-height) + 20px);
  min-height: calc(100vh - var(--header-height));
  animation: contentFadeIn 0.4s ease;
}

@keyframes contentFadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== BOTTOM NAVIGATION ========== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: var(--max-app-width);
  height: var(--nav-height);
  background: rgba(6, 8, 15, 0.95);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: var(--border-subtle);
  box-shadow:
    0 -6px 32px rgba(0, 0, 0, 0.5),
    0 -1px 0 rgba(167, 139, 250, 0.05),
    var(--shadow-inner);
  z-index: 100;
  padding: 0 8px;
  margin: 0 auto;
}

@media (min-width: 481px) {
  .bottom-nav {
    left: 50%;
    transform: translateX(-50%);
    width: var(--max-app-width);
  }
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 14px;
  transition:
    color var(--transition-base),
    background var(--transition-base),
    transform var(--transition-spring);
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
}

.nav-item i {
  width: 22px;
  height: 22px;
  transition: transform var(--transition-spring), filter var(--transition-base);
}

.nav-item:hover {
  color: var(--color-text-secondary);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-2px);
}

.nav-item:hover i {
  transform: translateY(-1px) scale(1.1);
}

.nav-item:active {
  transform: scale(0.94);
}

.nav-item.active {
  color: var(--color-primary-bright);
  background: rgba(167, 139, 250, 0.06);
}

.nav-item.active i {
  filter: drop-shadow(0 0 8px rgba(167, 139, 250, 0.65));
  transform: scale(1.08);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 8px var(--color-primary-glow);
  animation: dotPulse 1.5s infinite;
}

@keyframes dotPulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.8); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

.compose-btn {
  background: var(--gradient-primary-vivid);
  color: white;
  border-radius: 50%;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -26px;
  border: 3px solid var(--color-bg);
  box-shadow:
    var(--shadow-violet),
    0 0 0 1px rgba(167, 139, 250, 0.18),
    var(--shadow-inner);
  transition: transform var(--transition-spring), box-shadow var(--transition-base);
  cursor: pointer;
}

.compose-btn:hover {
  transform: translateY(-4px) scale(1.07);
  box-shadow:
    var(--shadow-violet-lg),
    0 0 0 1px rgba(167, 139, 250, 0.3),
    var(--shadow-inner);
}

.compose-btn:active {
  transform: scale(0.96);
}

.compose-btn i {
  color: white;
  transition: transform var(--transition-spring);
}

.compose-btn:hover i {
  transform: rotate(90deg);
}

/* ========== DRAWER (Hamburger) ========== */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100%;
  background: linear-gradient(180deg, #0A1020 0%, #06080F 100%);
  border-right: 1px solid rgba(167, 139, 250, 0.08);
  z-index: 201;
  padding: 32px 16px 28px;
  transition: left 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 8px 0 48px rgba(0, 0, 0, 0.7), 1px 0 0 rgba(167, 139, 250, 0.05);
}

.drawer.open {
  left: 0;
}

.drawer-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background var(--transition-base),
    color var(--transition-base),
    transform var(--transition-spring),
    border-color var(--transition-base);
  border: 1px solid transparent;
}

.drawer-item:hover {
  background: rgba(167, 139, 250, 0.07);
  color: var(--color-text);
  border-color: rgba(167, 139, 250, 0.1);
  transform: translateX(4px);
}

.drawer-item:active {
  transform: translateX(2px) scale(0.98);
}

/* ========== LANDING PAGE ========== */
.landing-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 36px 28px;
  text-align: center;
}

.landing-logo {
  width: 104px;
  height: 104px;
  background: var(--gradient-primary-vivid);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  box-shadow:
    var(--shadow-violet-lg),
    0 0 0 1px rgba(167, 139, 250, 0.15),
    var(--shadow-inner);
  animation: logoFloat 4s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

.landing-logo img {
  width: 58px;
  height: 58px;
}

.landing-title {
  font-family: 'Sora', sans-serif;
  font-size: 38px;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #F0F4FF 0%, #C4B5FD 45%, #A78BFA 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.landing-subtitle {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.landing-description {
  font-size: 14.5px;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 300px;
}

.landing-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 280px;
}

.btn-lg {
  padding: 17px 28px;
  font-size: 16px;
  border-radius: 16px;
}

/* ========== AUTH FORMS ========== */
.auth-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 40px 26px 28px;
  background-image:
    radial-gradient(ellipse 75% 50% at 50% 0%, rgba(109, 40, 217, 0.16) 0%, transparent 60%);
  animation: authSlideUp 0.5s ease;
}

@keyframes authSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.auth-logo {
  width: 88px;
  height: 88px;
  background: var(--gradient-primary-vivid);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 30px auto;
  overflow: hidden;
  box-shadow:
    var(--shadow-violet),
    0 0 0 1px rgba(167, 139, 250, 0.18),
    var(--shadow-inner);
}

.auth-logo img {
  width: 50px;
  height: 50px;
}

.auth-title {
  font-family: 'Sora', sans-serif;
  font-size: 31px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #F0F4FF 0%, #C4B5FD 50%, #A78BFA 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.auth-subtitle {
  color: var(--color-text-secondary);
  text-align: center;
  margin-bottom: 36px;
  font-size: 14.5px;
  line-height: 1.65;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 9px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-text-secondary);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  padding-right: 48px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(13, 19, 33, 0.85);
  color: var(--color-text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  outline: none;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background var(--transition-base);
  backdrop-filter: blur(10px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(167, 139, 250, 0.45);
  background: rgba(13, 19, 33, 0.98);
  box-shadow:
    0 0 0 3px rgba(109, 40, 217, 0.14),
    0 2px 12px rgba(0, 0, 0, 0.25);
}

.form-group select option {
  background: #0D1321;
  color: var(--color-text);
}

.password-toggle {
  position: absolute;
  right: 14px;
  top: 41px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: color var(--transition-fast), transform var(--transition-spring);
  display: flex;
  align-items: center;
}

.password-toggle:hover {
  color: var(--color-text-secondary);
  transform: scale(1.1);
}

.password-toggle i {
  width: 18px;
  height: 18px;
}

/* ── Buttons ── */
.btn {
  width: 100%;
  padding: 15px;
  border-radius: 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition:
    opacity var(--transition-fast),
    transform var(--transition-spring),
    box-shadow var(--transition-base);
  letter-spacing: 0.02em;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--gradient-primary-vivid);
  color: white;
  box-shadow: var(--shadow-violet), var(--shadow-inner);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.12) 0%, transparent 60%);
  pointer-events: none;
  border-radius: inherit;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  transition: background var(--transition-base);
  border-radius: inherit;
}

.btn-primary:hover:not(:disabled) {
  box-shadow: var(--shadow-violet-lg), var(--shadow-inner);
  transform: translateY(-2px);
}

.btn-primary:hover:not(:disabled)::after {
  background: rgba(255,255,255,0.05);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition:
    background var(--transition-base),
    color var(--transition-base),
    transform var(--transition-spring),
    border-color var(--transition-base);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.12);
}

.auth-link {
  text-align: center;
  margin-top: 28px;
  color: var(--color-text-secondary);
  font-size: 14px;
}

.auth-link a {
  color: var(--color-primary-bright);
  text-decoration: none;
  font-weight: 700;
  transition: opacity var(--transition-fast), text-decoration var(--transition-fast);
}

.auth-link a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Step indicator */
.step-indicator {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition:
    background var(--transition-base),
    width var(--transition-base),
    border-radius var(--transition-base);
}

.step-dot.active {
  background: var(--color-primary-bright);
  width: 24px;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(167, 139, 250, 0.55);
}

.step-buttons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.auth-footer {
  margin-top: auto;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 12px;
  padding: 28px 0 18px;
}

/* ========== SPINNER ========== */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.65s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========== PLACEHOLDER PAGES ========== */
.page-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50vh;
  font-size: 15px;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
}

/* ========== DIRECTORY ========== */
.directory-header {
  padding: 18px 18px 0;
}

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.search-input,
.filter-select {
  background: rgba(13, 19, 33, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--color-text);
  border-radius: 12px;
  padding: 10px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  flex: 1;
  min-width: 80px;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

.search-input::placeholder {
  color: var(--color-text-muted);
}

.search-input:focus,
.filter-select:focus {
  border-color: rgba(167, 139, 250, 0.4);
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.12);
  outline: none;
}

/* ── Profile Cards ── */
.profile-card {
  background: var(--gradient-card);
  border: var(--border-card);
  border-radius: var(--border-radius);
  padding: 16px;
  margin: 8px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition:
    background var(--transition-base),
    border-color var(--transition-base),
    transform var(--transition-spring),
    box-shadow var(--transition-base);
  position: relative;
  overflow: hidden;
}

.profile-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(167,139,250,0.03) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.profile-card:hover {
  background: linear-gradient(180deg, rgba(21, 31, 55, 0.95) 0%, rgba(13, 19, 33, 1) 100%);
  border-color: rgba(167, 139, 250, 0.14);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(167, 139, 250, 0.08);
}

.profile-card:hover::before {
  opacity: 1;
}

.profile-card:active {
  transform: translateY(0) scale(0.99);
}

.card-avatar {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.avatar-img,
.avatar-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 17px;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.06);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.profile-card:hover .avatar-img,
.profile-card:hover .avatar-placeholder {
  border-color: rgba(167, 139, 250, 0.2);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.08);
}

.card-info {
  flex: 1;
  overflow: hidden;
}

.card-info h3 {
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.015em;
}

.dept-level {
  font-size: 12.5px;
  color: var(--color-text-secondary);
  margin-bottom: 3px;
  font-weight: 500;
}

.bio-snippet {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 5px;
  line-height: 1.45;
}

.social-proof {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--color-primary-bright);
  font-weight: 600;
}

.card-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.card-action {
  flex-shrink: 0;
}

.btn-friend {
  background: var(--gradient-primary-vivid);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 9px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 12px rgba(124, 58, 237, 0.35);
  transition:
    box-shadow var(--transition-base),
    transform var(--transition-spring);
}

.btn-friend:hover:not(.pending) {
  box-shadow: 0 5px 20px rgba(124, 58, 237, 0.5);
  transform: translateY(-2px) scale(1.03);
}

.btn-friend:active {
  transform: scale(0.96);
}

.btn-friend.pending {
  background: rgba(167, 139, 250, 0.1);
  color: var(--color-primary-bright);
  box-shadow: none;
  border: 1px solid rgba(167, 139, 250, 0.18);
  cursor: default;
}

.friend-request-actions {
  display: flex;
  gap: 7px;
}

.btn-accept,
.btn-decline {
  padding: 8px 14px;
  border-radius: 10px;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform var(--transition-spring),
    opacity var(--transition-fast),
    box-shadow var(--transition-base);
}

.btn-accept:hover,
.btn-decline:hover {
  transform: scale(1.05);
}

.btn-accept:active,
.btn-decline:active {
  transform: scale(0.97);
}

.btn-accept {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid rgba(52, 211, 153, 0.22);
}

.btn-decline {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid rgba(248, 113, 113, 0.22);
}

.friend-badge {
  color: var(--color-success);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Invite CTA */
.invite-cta {
  border: 1px dashed rgba(167, 139, 250, 0.25);
  background: rgba(109, 40, 217, 0.04);
  border-radius: var(--border-radius);
}

.btn-micro {
  background: var(--gradient-primary-vivid);
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-top: 4px;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.45);
  transition: transform var(--transition-spring), box-shadow var(--transition-base);
}

.btn-micro:hover {
  transform: scale(1.12);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.55);
}

.btn-micro i {
  width: 14px;
  height: 14px;
}

/* ========== SKELETON LOADERS ========== */
.skeleton .skeleton-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.03) 0%,
    rgba(255,255,255,0.07) 50%,
    rgba(255,255,255,0.03) 100%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

.skeleton .skeleton-lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.skeleton .line {
  height: 11px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.03) 0%,
    rgba(255,255,255,0.07) 50%,
    rgba(255,255,255,0.03) 100%);
  background-size: 200% 100%;
  border-radius: 8px;
  animation: shimmer 2s infinite;
}

@keyframes pulse {
  0% { opacity: 0.3; }
  50% { opacity: 0.6; }
  100% { opacity: 0.3; }
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-notif {
  height: 64px;
  margin: 8px 0;
  border-radius: 12px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.03) 0%,
    rgba(255,255,255,0.07) 50%,
    rgba(255,255,255,0.03) 100%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* ========== SUGGESTION BOXES ========== */
.suggestion-box {
  margin: 10px 16px;
}

.suggestion-box h4 {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
  color: var(--color-text-muted);
}

.horizontal-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
  display: none;
}

.suggestion-card {
  background: var(--gradient-card);
  border: var(--border-card);
  border-radius: 16px;
  padding: 16px 14px;
  text-align: center;
  min-width: 94px;
  cursor: pointer;
  transition:
    background var(--transition-base),
    border-color var(--transition-base),
    transform var(--transition-spring),
    box-shadow var(--transition-base);
  flex-shrink: 0;
}

.suggestion-card:hover {
  background: linear-gradient(180deg, rgba(21, 31, 55, 0.95) 0%, rgba(13, 19, 33, 1) 100%);
  border-color: rgba(167, 139, 250, 0.14);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.suggestion-card:active {
  transform: translateY(-1px) scale(0.98);
}

.suggestion-card .avatar-placeholder,
.suggestion-card .avatar-img {
  width: 50px;
  height: 50px;
  margin: 0 auto 10px;
}

.suggestion-card .name {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}

.suggestion-card .dept {
  font-size: 11px;
  color: var(--color-text-muted);
}

/* ========== FEED (kept for backward compatibility) ========== */
.feed-page {
  padding: 12px 16px;
}

.feed-post {
  background: var(--gradient-card);
  border: var(--border-card);
  border-radius: var(--border-radius);
  padding: 18px;
  margin-bottom: 10px;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-spring);
  position: relative;
  overflow: hidden;
}

.feed-post::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(167,139,250,0.08), transparent);
  pointer-events: none;
}

.feed-post:hover {
  border-color: rgba(167, 139, 250, 0.09);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.3);
}

.post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.post-avatar .avatar-img,
.post-avatar .avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.06);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.post-avatar:hover .avatar-img,
.post-avatar:hover .avatar-placeholder {
  border-color: rgba(167, 139, 250, 0.25);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.08);
}

.post-author-name {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: -0.015em;
  transition: color var(--transition-fast);
}

.post-author-name:hover {
  color: var(--color-primary-bright);
}

.post-time {
  font-size: 11.5px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.post-content {
  margin-bottom: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14.5px;
  color: rgba(240, 244, 255, 0.88);
}

.post-actions {
  display: flex;
  gap: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 12px;
}

.action-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 7px 11px;
  border-radius: 10px;
  transition:
    color var(--transition-fast),
    background var(--transition-fast),
    transform var(--transition-spring);
}

.action-btn:hover {
  color: var(--color-text-secondary);
  background: rgba(255, 255, 255, 0.05);
  transform: scale(1.04);
}

.action-btn:active {
  transform: scale(0.95);
}

.action-btn.liked {
  color: var(--color-danger);
  background: var(--color-danger-bg);
}

.action-btn i {
  width: 17px;
  height: 17px;
  transition: transform var(--transition-spring);
}

.action-btn:hover i {
  transform: scale(1.12);
}

/* ── Liked heart ── */
.like-btn.liked i {
  fill: #F87171;
  color: #F87171;
}

/* Comments */
.comments-section {
  margin-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 14px;
}

.comment-item {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.comment-avatar .avatar-img,
.comment-avatar .avatar-placeholder {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.comment-body {
  flex: 1;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 9px 12px;
}

.comment-author {
  font-weight: 700;
  font-size: 12.5px;
  color: var(--color-text);
  margin-bottom: 2px;
}

.comment-body p {
  margin: 2px 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(240, 244, 255, 0.82);
}

.comment-time {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 3px;
}

.comment-input-area,
.reply-input-area {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.comment-input,
.reply-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 9px 14px;
  color: var(--color-text);
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  transition:
    border-color var(--transition-base),
    background var(--transition-base),
    box-shadow var(--transition-base);
}

.comment-input:focus,
.reply-input:focus {
  outline: none;
  border-color: rgba(167, 139, 250, 0.38);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.1);
}

.comment-input::placeholder,
.reply-input::placeholder {
  color: var(--color-text-muted);
}

.btn-sm {
  padding: 8px 15px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
}

/* Load more */
#loadMoreBtn {
  display: block;
  margin: 4px auto 14px;
  padding: 11px 30px;
  width: auto;
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background var(--transition-base),
    color var(--transition-base),
    border-color var(--transition-base),
    transform var(--transition-spring);
}

#loadMoreBtn:hover {
  background: rgba(167, 139, 250, 0.08);
  color: var(--color-primary-bright);
  border-color: rgba(167, 139, 250, 0.2);
  transform: translateY(-1px);
}

#loadMoreBtn:active {
  transform: scale(0.98);
}

/* Add friend button */
.add-friend-btn {
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-weight: 700;
}

/* Report button */
.report-post-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  margin-left: auto;
  padding: 5px 7px;
  border-radius: 8px;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.report-post-btn:hover {
  color: var(--color-danger);
  background: var(--color-danger-bg);
}

/* ========== COMPOSE OVERLAY ========== */
.compose-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.compose-overlay.visible {
  opacity: 1;
}

.compose-container {
  background: linear-gradient(180deg, #121C2E 0%, #0A1020 100%);
  border: 1px solid rgba(167, 139, 250, 0.12);
  width: 92%;
  max-width: 400px;
  border-radius: var(--border-radius-xl);
  padding: 22px;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255,255,255,0.03),
    var(--shadow-inner);
  animation: composeIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes composeIn {
  from { transform: scale(0.90) translateY(16px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.compose-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.compose-cancel-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-spring);
  display: flex;
  align-items: center;
}

.compose-cancel-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--color-text);
  transform: scale(1.04);
}

.compose-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.015em;
}

.compose-textarea {
  width: 100%;
  min-height: 136px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  color: var(--color-text);
  padding: 14px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.65;
  resize: none;
  outline: none;
  transition:
    border-color var(--transition-base),
    background var(--transition-base),
    box-shadow var(--transition-base);
}

.compose-textarea:focus {
  border-color: rgba(167, 139, 250, 0.32);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.1);
}

.compose-textarea::placeholder {
  color: var(--color-text-muted);
}

.compose-char-count {
  text-align: right;
  color: var(--color-text-muted);
  font-size: 11.5px;
  margin-top: 6px;
  letter-spacing: 0.03em;
  font-weight: 500;
}

/* ========== NOTIFICATION BADGE ========== */
.nav-item .badge {
  position: absolute;
  top: 3px;
  right: 3px;
  background: var(--color-danger);
  color: white;
  border-radius: 50%;
  width: 17px;
  height: 17px;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-bg);
  box-shadow: 0 2px 8px rgba(248, 113, 113, 0.45);
  animation: badgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes badgePop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

/* ========== NOTIFICATIONS PAGE ========== */
.notifications-page {
  padding: 0 16px;
}

.notification-item {
  display: flex;
  gap: 14px;
  padding: 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  cursor: pointer;
  border-radius: 12px;
  transition:
    background var(--transition-fast),
    transform var(--transition-spring);
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.025);
  transform: translateX(2px);
}

.notification-item.unread {
  background: rgba(167, 139, 250, 0.06);
  border-radius: 14px;
  padding: 16px 12px;
  margin: 3px 0;
  border-bottom: none;
  border-left: 3px solid rgba(167, 139, 250, 0.45);
}

.notif-avatar .avatar-img,
.notif-avatar .avatar-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.06);
}

.notif-content {
  flex: 1;
}

.notif-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(240, 244, 255, 0.88);
}

.notif-time {
  font-size: 11.5px;
  color: var(--color-text-muted);
  margin-top: 4px;
  display: block;
  font-weight: 500;
}

.notif-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

/* ========== PROFILE PAGE ========== */
.profile-page {
  text-align: center;
  padding: 28px 18px 24px;
}

.profile-header {
  text-align: center;
  padding: 26px 18px 18px;
}

.profile-name {
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin: 14px 0 5px;
  letter-spacing: -0.02em;
}

.profile-dept-level {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 4px;
  font-weight: 500;
}

.profile-gender-bio {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
  line-height: 1.6;
}

.profile-joined {
  font-size: 12px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-bottom: 14px;
  font-weight: 500;
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 0;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 16px;
  padding: 14px;
  margin: 18px 0;
  overflow: hidden;
}

.profile-stats > * + * {
  border-left: 1px solid rgba(255,255,255,0.05);
}

.profile-actions {
  margin-top: 14px;
}

.profile-avatar-large .avatar-img,
.profile-avatar-large .avatar-placeholder {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
  border: 3px solid rgba(167, 139, 250, 0.28);
  box-shadow:
    0 0 0 7px rgba(109, 40, 217, 0.08),
    var(--shadow-violet);
  transition: transform var(--transition-spring), box-shadow var(--transition-base);
}

.profile-avatar-large:hover .avatar-img,
.profile-avatar-large:hover .avatar-placeholder {
  transform: scale(1.04);
  box-shadow:
    0 0 0 8px rgba(109, 40, 217, 0.12),
    var(--shadow-violet-lg);
}

.profile-dept,
.profile-gender,
.profile-bio {
  color: var(--color-text-secondary);
  margin: 5px 0;
  font-size: 14px;
  line-height: 1.55;
}

/* Friends grid */
.profile-friends-section,
.profile-posts-section {
  padding: 0 16px;
  margin-top: 26px;
}

.section-title {
  font-family: 'Sora', sans-serif;
  font-size: 16px;
  margin-bottom: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.friends-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.friend-card {
  text-align: center;
  background: var(--color-surface);
  border: var(--border-card);
  border-radius: 14px;
  padding: 12px 8px;
  cursor: pointer;
  transition:
    background var(--transition-base),
    transform var(--transition-spring),
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

.friend-card:hover {
  background: var(--color-surface-hover);
  transform: translateY(-2px);
  border-color: rgba(167, 139, 250, 0.1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.friend-card:active {
  transform: scale(0.97);
}

.friend-card .avatar-img,
.friend-card .avatar-placeholder {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 8px;
  border: 2px solid rgba(255,255,255,0.05);
}

.friend-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
}

.empty-text {
  color: var(--color-text-muted);
  font-size: 14px;
  text-align: center;
  padding: 24px 0;
}

.profile-post-item {
  border-top: 1px solid rgba(255,255,255,0.04);
  padding: 14px 0;
}

.profile-post-item:last-child {
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.post-text {
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  margin-bottom: 5px;
}

.post-meta {
  font-size: 11px;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ========== SETTINGS PAGE ========== */
.settings-page {
  padding-bottom: 28px;
}

.avatar-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.avatar-img-large {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(167, 139, 250, 0.28);
  box-shadow: var(--shadow-violet);
  transition: transform var(--transition-spring), box-shadow var(--transition-base);
}

.avatar-img-large:hover {
  transform: scale(1.04);
  box-shadow: var(--shadow-violet-lg);
}

.avatar-placeholder-large {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1A2540 0%, #0D1321 100%);
  border: 2px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  color: var(--color-text-secondary);
}

/* ========== CONFIRM OVERLAY ========== */
.confirm-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
}

.confirm-box {
  background: linear-gradient(180deg, #121C2E 0%, #0A1020 100%);
  border: 1px solid rgba(167, 139, 250, 0.12);
  border-radius: var(--border-radius-xl);
  padding: 30px;
  text-align: center;
  width: 300px;
  box-shadow:
    0 28px 72px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255,255,255,0.03),
    var(--shadow-inner);
  animation: modalIn 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
  from { transform: scale(0.88); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.confirm-box p {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
  color: var(--color-text-secondary);
}

.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.btn-danger {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid rgba(248, 113, 113, 0.25);
  padding: 10px 22px;
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    transform var(--transition-spring),
    box-shadow var(--transition-base);
}

.btn-danger:hover {
  background: rgba(248, 113, 113, 0.18);
  transform: scale(1.04);
  box-shadow: 0 4px 16px rgba(248, 113, 113, 0.25);
}

.btn-danger:active {
  transform: scale(0.97);
}

/* ========== DELETE POST BUTTON (kept for legacy) ========== */
.delete-post-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  margin-left: auto;
  padding: 5px 7px;
  border-radius: 8px;
  transition:
    color var(--transition-fast),
    background var(--transition-fast),
    transform var(--transition-spring);
  display: flex;
  align-items: center;
}

.delete-post-btn:hover {
  color: var(--color-danger);
  background: var(--color-danger-bg);
  transform: scale(1.08);
}

/* ========== RESPONSIVE (default) ========== */
@media (min-width: 481px) {
  .bottom-nav {
    left: calc(50% - var(--max-app-width) / 2);
    transform: none;
    width: var(--max-app-width);
  }
}

/* ── Feed compose form ── */
.feed-compose {
  background: var(--gradient-card);
  border: var(--border-card);
  border-radius: var(--border-radius);
  padding: 16px;
  margin: 12px 16px;
}

.feed-compose-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  color: var(--color-text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  padding: 12px 16px;
  resize: none;
  min-height: 84px;
  outline: none;
  transition:
    border-color var(--transition-base),
    background var(--transition-base),
    box-shadow var(--transition-base);
}

.feed-compose-textarea:focus {
  border-color: rgba(167, 139, 250, 0.38);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.1);
}

.feed-compose-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

/* ── Three-dot menu ── */
.post-menu-wrapper {
  position: relative;
  margin-left: auto;
}

.post-menu-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 5px;
  border-radius: 8px;
  transition:
    color var(--transition-fast),
    background var(--transition-fast),
    transform var(--transition-spring);
}

.post-menu-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: scale(1.1);
}

.post-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.6), var(--shadow-inner);
  z-index: 10;
  min-width: 130px;
  overflow: hidden;
  animation: dropdownIn 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownIn {
  from { transform: scale(0.95) translateY(-4px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 11px 16px;
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  text-align: left;
}

.dropdown-item:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}

/* ── Feed empty state ── */
.feed-empty {
  text-align: center;
  padding: 36px 24px;
  color: var(--color-text-secondary);
  font-size: 16px;
  background: rgba(167, 139, 250, 0.04);
  border: 1px dashed rgba(167, 139, 250, 0.12);
  border-radius: var(--border-radius-lg);
  margin: 20px 16px;
}

/* ── Modal overlay ── */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 600;
}

.modal-box {
  background: linear-gradient(180deg, #121C2E 0%, #0A1020 100%);
  border: 1px solid rgba(167, 139, 250, 0.14);
  border-radius: var(--border-radius-xl);
  padding: 28px;
  width: 90%;
  max-width: 350px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.7), var(--shadow-inner);
  animation: modalIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-box h3 {
  margin-bottom: 12px;
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.modal-box p {
  color: var(--color-text-secondary);
  margin-bottom: 22px;
  font-size: 14px;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* ── Toast notifications ── */
#toastContainer {
  position: fixed;
  bottom: calc(var(--nav-height) + 14px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  max-width: 90%;
  pointer-events: none;
}

.toast {
  background: rgba(13, 19, 33, 0.98);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--color-text);
  padding: 13px 22px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), var(--shadow-inner);
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  transition:
    opacity 0.3s ease,
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
  backdrop-filter: blur(16px);
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast-success {
  border-left: 4px solid var(--color-success);
}

.toast-error {
  border-left: 4px solid var(--color-danger);
}

.toast-info {
  border-left: 4px solid var(--color-primary-bright);
}

/* ── Directory card details ── */
.card-details-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 5px 0;
}

.card-detail {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.card-bio {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 5px 0;
  line-height: 1.45;
}

.card-mutual {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--color-primary-bright);
  font-weight: 600;
}

/* ── Install banner ── */
.install-banner {
  position: fixed;
  bottom: 100px;
  left: 0;
  right: 0;
  width: calc(100% - 20px);
  max-width: 460px;
  background: var(--color-surface);
  border: 2px solid var(--color-primary);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 9999;
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.4);
  margin: 0 auto;
}

.install-actions {
  display: flex;
  gap: 8px;
}

/* ── Full-screen image viewer ── */
.image-viewer-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-viewer-container {
  position: relative;
  max-width: 95%;
  max-height: 95%;
}

.image-viewer-img {
  max-width: 100%;
  max-height: 95vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  animation: imageZoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes imageZoomIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.image-viewer-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.1);
  color: white;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    transform var(--transition-spring);
}

.image-viewer-close:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.1);
}

/* ================================================================
   MOBILE FULL-WIDTH + GRID + MARKETPLACE FINAL FIXES
   (merge these at the end)
   ================================================================ */

html, body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  overflow-x: hidden !important;
  background: var(--color-bg) !important;
}

#app {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

@media (min-width: 481px) {
  #app {
    max-width: var(--max-app-width) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.03),
      0 0 100px rgba(0, 0, 0, 0.9),
      0 0 140px rgba(109, 40, 217, 0.07) !important;
  }
}

#profileGridContainer {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 16px;
}

.profile-card {
  flex-direction: column;
  text-align: center;
  padding: 16px 10px 12px;
}

.card-avatar {
  margin: 0 auto 8px;
}

.card-info {
  text-align: center;
}

.card-action {
  margin-top: 10px;
}

.suggestion-product-img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 6px;
}

@media (min-width: 481px) {
  #profileGridContainer {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Marketplace additions */
.marketplace-page {
  padding: 12px 16px;
}

.marketplace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.marketplace-header h2 {
  font-size: 22px;
  font-weight: 700;
}

#marketplaceGrid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.product-card {
  background: var(--gradient-card);
  border: var(--border-card);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.product-card-img-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.product-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.product-card-img.placeholder {
  background: var(--color-surface-hover);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-status-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.product-status-badge.available {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.product-status-badge.sold {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.product-card-body {
  padding: 14px;
}

.product-title {
  font-family: 'Sora', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.product-description {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
  line-height: 1.4;
  white-space: pre-wrap;
}

.product-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.product-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-accent);
}

.product-location {
  font-size: 13px;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: 3px;
}

.product-seller {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.product-seller .avatar-img,
.product-seller .avatar-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.1);
}

.product-seller-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

.product-time {
  font-size: 11px;
  color: var(--color-text-muted);
}

.edited-label {
  font-style: italic;
  color: var(--color-text-muted);
}

.product-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.whatsapp-btn {
  background: #25D366 !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 10px;
}

.whatsapp-btn:hover {
  background: #20BD5A !important;
  transform: translateY(-1px);
}

.product-owner-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.product-owner-actions .btn {
  width: auto;
  padding: 6px 10px;
  font-size: 12px;
}

.product-form-container {
  background: linear-gradient(180deg, #121C2E 0%, #0A1020 100%);
  border: 1px solid rgba(167, 139, 250, 0.12);
  width: 92%;
  max-width: 420px;
  border-radius: var(--border-radius-xl);
  padding: 22px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.8);
  animation: composeIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.product-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.product-form-header h3 {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 18px;
}

.form-row {
  display: flex;
  gap: 10px;
}

.form-row .half {
  flex: 1;
}

.product-images-area {
  display: flex;
  gap: 10px;
}

.product-image-slot {
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.04);
  border: 2px dashed rgba(255,255,255,0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.product-image-slot:hover {
  border-color: var(--color-primary);
}

.product-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.product-form-actions .btn {
  flex: 1;
}

.product-card.skeleton .skeleton-img {
  height: 200px;
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.07) 50%, rgba(255,255,255,0.03) 100%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* Two‑image product card */
.product-card-img-wrapper.two {
  display: flex;
  gap: 4px;
  height: 200px;
}

.product-card-img-wrapper.two .product-card-img.dual {
  flex: 1;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.product-card-img-wrapper.single {
  height: 200px;
  overflow: hidden;
}

.product-card-img-wrapper.single .product-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}