/* ============================================================
   NIS Alumni — Custom Styles
   Premium "private club" aesthetic with deep blues & clean whites
   ============================================================ */

/* ── Design Tokens ───────────────────────────────────────── */
:root {
  --color-primary: #0B1D3A;
  /* deep navy */
  --color-primary-light: #15325E;
  --color-accent: #C8FF00;
  /* chartreuse / NIS green */
  --color-accent-soft: #D4FF4D;
  --color-white: #FFFFFF;
  --color-gray-50: #F8FAFC;
  --color-gray-100: #F1F5F9;
  --color-gray-200: #E2E8F0;
  --color-gray-400: #94A3B8;
  --color-gray-600: #475569;
  --color-gray-800: #1E293B;
  --color-danger: #EF4444;
  --color-success: #22C55E;

  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .08);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, .12);
  --shadow-glow: 0 0 60px rgba(200, 255, 0, .15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition: 0.3s cubic-bezier(.4, 0, .2, 1);
}

/* ── Reset & Globals ─────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  color: var(--color-gray-800);
  background: var(--color-white);
  overflow-x: hidden;
}

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .6;
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

.animate-slide-in-left {
  animation: slideInLeft 0.8s ease-out forwards;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Staggered delays */
.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

.delay-400 {
  animation-delay: 0.4s;
}

.delay-500 {
  animation-delay: 0.5s;
}

/* ── Scroll reveal (initially hidden) ────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Glass Card ──────────────────────────────────────────── */
.glass-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
}

.glass-card-light {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--color-accent);
  color: var(--color-primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  letter-spacing: -.01em;
}

.btn-primary:hover {
  background: var(--color-accent-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: transparent;
  color: var(--color-white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-secondary:hover {
  border-color: var(--color-white);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.btn-dark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-dark:hover {
  background: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ── Form Inputs ─────────────────────────────────────────── */
.form-input {
  width: 100%;
  padding: 14px 18px;
  background: var(--color-gray-50);
  border: 2px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-gray-800);
  transition: var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--color-accent);
  background: var(--color-white);
  box-shadow: 0 0 0 4px rgba(200, 255, 0, 0.15);
}

.form-input::placeholder {
  color: var(--color-gray-400);
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-gray-600);
  letter-spacing: .02em;
  text-transform: uppercase;
}

/* ── Toast Notifications ─────────────────────────────────── */
.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 9999;
  animation: fadeInUp 0.4s ease-out;
  box-shadow: var(--shadow-lg);
}

.toast-success {
  background: var(--color-success);
  color: var(--color-white);
}

.toast-error {
  background: var(--color-danger);
  color: var(--color-white);
}

/* ── Profile Card ────────────────────────────────────────── */
.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-accent);
  box-shadow: var(--shadow-md);
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-gray-100);
  color: var(--color-gray-600);
  font-size: 1.2rem;
  transition: var(--transition);
  text-decoration: none;
}

.social-btn:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* ── Map Overrides ───────────────────────────────────────── */
.map-container {
  width: 100%;
  height: calc(100vh - 72px);
  position: relative;
}

.map-sidebar {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 320px;
  max-height: calc(100% - 32px);
  overflow-y: auto;
  z-index: 10;
}

.marker-popup {
  padding: 12px;
  min-width: 200px;
  font-family: var(--font-body);
}

.marker-popup h4 {
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--color-primary);
}

.marker-popup p {
  font-size: 0.85rem;
  color: var(--color-gray-600);
  margin-bottom: 8px;
}

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-gray-400);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray-600);
}

/* ── Mobile nav overlay ──────────────────────────────────── */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--color-primary);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

/* ── Utility ─────────────────────────────────────────────── */
.gradient-bg {
  background: linear-gradient(135deg, var(--color-primary) 0%, #0F2847 50%, #132F5A 100%);
}

.gradient-animated {
  background: linear-gradient(270deg, var(--color-primary), #132F5A, #0B1D3A, #1A3A6B);
  background-size: 600% 600%;
  animation: gradientShift 8s ease infinite;
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-soft));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Like / Comment ─────────────────────────────────────── */
.fill-red-500 {
  fill: #EF4444;
  stroke: #EF4444;
}

.post-like-btn:active {
  transform: scale(1.2);
  transition: transform 0.1s ease;
}

.comments-section {
  animation: fadeIn 0.3s ease-out;
}

/* ── Section Transitions ─────────────────────────────────── */
.page-section {
  animation: none;
}

.section-enter {
  animation: sectionFadeIn 0.25s ease-out forwards;
}

.section-exit {
  animation: sectionFadeOut 0.2s ease-in forwards;
}

@keyframes sectionFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sectionFadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* ── Media Viewer ────────────────────────────────────────── */
#media-viewer {
  animation: fadeIn 0.2s ease-out;
  backdrop-filter: blur(4px);
}

#media-content img,
#media-content video {
  animation: mediaZoomIn 0.3s ease-out;
}

@keyframes mediaZoomIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.upload-progress-bar {
  position: fixed;
  top: 72px;
  right: 24px;
  width: 280px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .12);
  z-index: 90;
  animation: slideDownIn 0.3s ease-out;
}

@keyframes slideDownIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUpIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Chat Styles ─────────────────────────────────────────── */
#chat-messages::-webkit-scrollbar {
  width: 4px;
}

#chat-messages::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 999px;
}

/* ── Follow Button Hover → Unfollow ──────────────────────── */
.follow-btn.following:hover {
  background: #FEE2E2 !important;
  color: #EF4444 !important;
}

/* ── Name hover (no underline, just color shift) ─────────── */
.user-name-link {
  text-decoration: none !important;
  transition: color 0.15s ease;
}

.user-name-link:hover {
  color: #15325E !important;
  text-decoration: none !important;
}

.dark .user-name-link:hover {
  color: #C8FF00 !important;
}

/* ── Chat Attachment Preview ─────────────────────────────── */
#chat-attach-preview {
  animation: slideDownIn 0.2s ease-out;
}

#chat-attach-thumb img,
#chat-attach-thumb video {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
}

/* ── Video Preview ───────────────────────────────────────── */
.video-preview {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.video-preview::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-preview .play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}

/* ── DARK THEME ──────────────────────────────────────────── */
.dark body,
.dark .font-body {
  background-color: #0f1117 !important;
  color: #e2e8f0 !important;
}

.dark header,
.dark .bg-white {
  background-color: #1a1d27 !important;
  border-color: #2a2d3a !important;
}

.dark aside {
  background-color: #1a1d27 !important;
  border-color: #2a2d3a !important;
}

.dark .bg-gray-50 {
  background-color: #0f1117 !important;
}

.dark .bg-gray-100 {
  background-color: #22252f !important;
}

.dark .border-gray-200,
.dark .border-gray-100 {
  border-color: #2a2d3a !important;
}

.dark .text-navy,
.dark .text-gray-800 {
  color: #f1f5f9 !important;
}

.dark .text-gray-600 {
  color: #a0aec0 !important;
}

.dark .text-gray-400 {
  color: #8899a6 !important;
}

.dark .text-gray-700 {
  color: #e2e8f0 !important;
}

.dark .text-gray-300 {
  color: #718096 !important;
}

.dark p,
.dark span,
.dark li {
  color: #cbd5e1;
}

/* Dark cards */
.dark .bg-white.rounded-2xl,
.dark .bg-white.rounded-xl {
  background-color: #1a1d27 !important;
}

.dark .shadow-sm {
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3) !important;
}

/* Dark inputs */
.dark .form-input,
.dark input[type="text"],
.dark input[type="email"],
.dark input[type="password"],
.dark input[type="url"],
.dark select,
.dark textarea {
  background-color: #22252f !important;
  border-color: #2a2d3a !important;
  color: #e2e8f0 !important;
}

.dark .form-input::placeholder,
.dark input::placeholder,
.dark textarea::placeholder {
  color: #64748b !important;
}

/* Dark nav items */
.dark .nav-item {
  color: #9ca3af !important;
}

.dark .nav-item:hover,
.dark .mobile-nav-item:hover {
  background-color: #22252f !important;
  color: #e5e7eb !important;
}

.dark .nav-item.bg-accent\/10,
.dark .nav-item.\!text-navy {
  background-color: rgba(200, 255, 0, 0.1) !important;
  color: #C8FF00 !important;
}

.dark .mobile-nav-item {
  color: #6b7280 !important;
}

.dark .mobile-nav-item.text-navy,
.dark .mobile-nav-item.active {
  color: #C8FF00 !important;
}

/* Dark dropdown */
.dark #avatar-dropdown {
  background-color: #1a1d27 !important;
  border-color: #2a2d3a !important;
}

.dark #avatar-dropdown a:hover {
  background-color: #22252f !important;
}

/* Dark post cards */
.dark .hover\:bg-gray-50:hover {
  background-color: #22252f !important;
}

/* Dark modals */
.dark #follow-list-modal .bg-white,
.dark #new-msg-modal .bg-white {
  background-color: #1a1d27 !important;
}

/* Dark chat */
.dark #chat-sidebar {
  background-color: #1a1d27 !important;
}

.dark #chat-thread {
  background-color: #0f1117 !important;
}

.dark #chat-input-area {
  background-color: #1a1d27 !important;
}

.dark .bg-navy {
  background-color: #0B1D3A !important;
}

/* Dark media viewer */
.dark #media-viewer {
  background-color: rgba(0, 0, 0, 0.95) !important;
}

/* ── Dark Mode Directory Buttons ─────────────────────────── */
.dark .dir-follow-btn[data-mutual="1"] {
  background: #1e3a5f !important;
  color: #ffffff !important;
  border: 1px solid #3b82f6 !important;
}

.dark .dir-follow-btn[data-following="1"]:not([data-mutual="1"]) {
  background: #15325E !important;
  color: #C8FF00 !important;
  border: 1px solid #C8FF00 !important;
}

.dark .dir-follow-btn[data-following="0"] {
  background: transparent !important;
  color: #C8FF00 !important;
  border: 2px solid #C8FF00 !important;
}

.dark .dir-follow-btn:hover {
  opacity: 0.85;
}

/* ── Mobile Chat Input Fix ───────────────────────────────── */
@media (max-width: 767px) {
  #section-chat .flex.h-full {
    height: calc(100vh - 64px) !important;
    position: relative;
  }

  #chat-sidebar {
    height: calc(100vh - 64px - 70px) !important;
  }

  #chat-thread {
    display: flex !important;
    flex-direction: column !important;
    height: calc(100vh - 64px) !important;
    padding-bottom: 70px !important;
    position: relative;
  }

  #chat-messages {
    flex: 1 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    padding-bottom: 80px !important;
  }

  #chat-input-area:not(.hidden) {
    position: fixed !important;
    bottom: 70px !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 45 !important;
    display: flex !important;
    background: white !important;
    border-top: 1px solid #e5e7eb !important;
    padding: 12px 16px !important;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .dark #chat-input-area {
    background: #1a1d27 !important;
    border-color: #2a2d3a !important;
  }
}

/* Dark upload progress bar */
.dark .upload-progress-bar {
  background: #1a1d27 !important;
  border-color: #2a2d3a !important;
}

/* Dark scrollbar */
.dark ::-webkit-scrollbar {
  width: 6px;
}

.dark ::-webkit-scrollbar-track {
  background: #0f1117;
}

.dark ::-webkit-scrollbar-thumb {
  background: #2a2d3a;
  border-radius: 999px;
}

/* Dark profile cover text */
.dark .font-display {
  color: #f1f5f9;
}

.dark .text-navy {
  color: #f1f5f9 !important;
}

/* Keep accent colors visible in dark mode */
.dark .bg-accent {
  background-color: #C8FF00 !important;
}

.dark .text-accent {
  color: #C8FF00 !important;
}

/* ═══ MOBILE RESPONSIVE ═══ */

/* Prevent any horizontal scroll globally */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

@media (max-width: 767px) {
  /* ── Chat: full-screen on mobile, STATIC (no horizontal scroll) ── */
  #section-chat {
    overflow: hidden !important;
  }

  #section-chat > div {
    overflow: hidden !important;
    position: relative;
  }

  #chat-sidebar {
    width: 100% !important;
    max-width: 100vw !important;
    border-right: none !important;
  }

  #chat-thread {
    width: 100vw !important;
    max-width: 100vw !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 50;
    background: #f9fafb;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    -webkit-overflow-scrolling: touch;
  }

  #chat-thread.hidden {
    display: none !important;
  }

  #chat-header {
    flex: 0 0 auto !important;
    z-index: 5;
    padding: 0.75rem 1rem !important;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
  }

  #chat-messages {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 1rem !important;
    -webkit-overflow-scrolling: touch;
  }

  #chat-attach-preview {
    flex: 0 0 auto !important;
  }

  #chat-input-area {
    flex: 0 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0.75rem 1rem !important;
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom)) !important;
    background: #fff !important;
    border-top: 1px solid #e5e7eb !important;
    z-index: 5;
  }

  #chat-input-area.hidden {
    display: none !important;
  }

  /* Hide bottom nav when chat thread is open */
  body.chat-open #bottom-nav {
    display: none !important;
  }

  /* ── Feed ── */
  #section-feed {
    padding: 0 !important;
  }

  #section-feed .max-w-2xl {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .post-card, #section-feed .bg-white {
    border-radius: 0.75rem !important;
    margin-bottom: 0.5rem;
  }

  /* Post composer */
  #section-feed textarea {
    font-size: 14px;
  }

  /* ── Profile ── */
  #section-profile .flex.items-end.gap-4 {
    flex-direction: column;
    align-items: flex-start;
  }

  #section-profile .pt-14 {
    padding-top: 0.5rem;
  }

  #profile-cover {
    height: 100px !important;
  }

  #profile-avatar-img {
    width: 72px !important;
    height: 72px !important;
  }

  #section-profile .max-w-3xl {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  /* Profile info grid */
  #section-profile .grid.md\\:grid-cols-3 {
    grid-template-columns: 1fr !important;
  }

  /* ── Settings ── */
  #section-settings .max-w-2xl {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  #section-settings .grid-cols-2 {
    grid-template-columns: 1fr !important;
  }

  /* ── Alumni directory ── */
  #section-alumni .grid {
    grid-template-columns: 1fr !important;
  }

  /* ── Bottom nav ── */
  .mobile-nav-item {
    font-size: 0.6rem;
    padding: 0.25rem 0;
  }

  /* ── Modals ── */
  #delete-post-modal > div,
  #follow-list-modal > div,
  #new-msg-modal > div {
    margin: 1rem;
    max-height: 80vh;
  }

  /* ── Fix overflow on all sections ── */
  #section-feed,
  #section-alumni,
  #section-profile,
  #section-settings,
  #section-chat {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  /* ── Header ── */
  header {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  /* Voice recording indicator */
  #chat-recording-indicator {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 0.5rem;
    font-weight: 600;
  }
}

/* Voice recording indicator (all sizes) */
#chat-recording-indicator {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: #fee2e2;
  color: #dc2626;
  border-radius: 0.5rem;
  font-weight: 600;
  animation: pulse-rec 1.5s ease-in-out infinite;
}

@keyframes pulse-rec {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Message enter animation */
.msg-enter {
  animation: msgSlideIn 0.25s ease-out;
}

@keyframes msgSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Notification slide down */
.animate-slideDown {
  animation: slideDown 0.35s ease-out;
  transition: opacity 0.3s, transform 0.3s;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Post publish animation */
.post-enter {
  animation: postSlideIn 0.4s ease-out;
}

@keyframes postSlideIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Mobile Bottom Navbar (Glassmorphic) ─────────────────── */
.mobile-bottom-nav {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(226, 232, 240, 0.6);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.06);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.dark .mobile-bottom-nav {
  background: rgba(26, 29, 39, 0.95) !important;
  border-color: rgba(42, 45, 58, 0.6) !important;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.3);
}

.mobile-nav-item {
  color: #94A3B8;
  min-width: 56px;
  transition: all 0.2s ease;
}

.mobile-nav-item.active,
.mobile-nav-item.bg-accent\/10,
.mobile-nav-item.\!text-navy {
  color: #0B1D3A !important;
  background: rgba(200, 255, 0, 0.12);
}

.dark .mobile-nav-item.active,
.dark .mobile-nav-item.bg-accent\/10 {
  color: #C8FF00 !important;
  background: rgba(200, 255, 0, 0.1) !important;
}

.mobile-fab {
  box-shadow: 0 4px 20px rgba(200, 255, 0, 0.4);
  border: 3px solid white;
}

.dark .mobile-fab {
  border-color: #1a1d27;
  box-shadow: 0 4px 20px rgba(200, 255, 0, 0.3);
}

/* ── Mobile Profile Layout ───────────────────────────────── */
@media (max-width: 767px) {
  #section-profile .max-w-4xl {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
  }
  
  #section-profile .grid {
    display: flex !important;
    flex-direction: column !important;
  }
  
  #profile-cover {
    height: 160px !important;
    border-radius: 0 !important;
  }
  
  #section-profile .px-8 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  #section-profile .flex.items-end.gap-5 {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
  }
  
  #section-profile .flex.items-end.gap-5 > .flex-1 {
    padding-top: 0.5rem !important;
    width: 100%;
  }
  
  #section-profile .flex.items-center.justify-between {
    flex-direction: column !important;
    gap: 0.75rem;
  }
  
  #section-profile #profile-avatar-img {
    width: 96px !important;
    height: 96px !important;
    margin-top: -48px;
    border-width: 3px;
  }
  
  #section-profile .flex.items-center.gap-6.mt-4 {
    justify-content: center;
    gap: 2rem;
  }
  
  #section-profile #profile-follow-wrap {
    justify-content: center;
  }
  
  #section-profile .bg-white.rounded-2xl:first-child {
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
  }
}

/* ── Notification Cards ──────────────────────────────────── */
.notif-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: white;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
  cursor: pointer;
}

.notif-card:hover {
  background: #f8fafc;
  transform: translateX(2px);
}

.notif-card.unread {
  background: rgba(200, 255, 0, 0.06);
  border-color: rgba(200, 255, 0, 0.2);
}

.notif-card.unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: #C8FF00;
  border-radius: 0 3px 3px 0;
}

.dark .notif-card {
  background: #1a1d27 !important;
  border-color: #2a2d3a !important;
}

.dark .notif-card:hover {
  background: #22252f !important;
}

.dark .notif-card.unread {
  background: rgba(200, 255, 0, 0.05) !important;
  border-color: rgba(200, 255, 0, 0.15) !important;
}

/* ── Quick Post Modal Animation ──────────────────────────── */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(100px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-slide-up {
  animation: slideUp 0.3s ease-out;
}

/* ── Notification badge pulse ────────────────────────────── */
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

#header-notif-badge:not(.hidden),
#mobile-notif-badge:not(.hidden) {
  animation: badgePulse 2s ease-in-out infinite;
}