/* FundiWangu — Unified CSS
   ONE style system for the entire application
   ══════════════════════════════════════════════════════════════════════════════ */

/* ═══ CSS CUSTOM PROPERTIES (Design Tokens) ═══ */
:root {
  --color-primary: #0369A1;
  --color-primary-hover: #025C8F;
  --color-primary-light: #f0f9ff;
  --color-accent: #4ade80;
  --color-accent-light: #E6F9E0;
  --color-danger: #ef4444;
  --color-warning: #f59e0b;
  --color-success: #10b981;

  /* Feed design tokens */
  --feed-card-radius: 1.25rem;
  --feed-card-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
  --feed-card-shadow-hover: 0 10px 40px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  --feed-card-border: 1px solid rgba(0,0,0,0.06);
  --feed-spacing-xs: 0.25rem;
  --feed-spacing-sm: 0.5rem;
  --feed-spacing-md: 1rem;
  --feed-spacing-lg: 1.5rem;
  --feed-spacing-xl: 2rem;
  --feed-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --feed-transition-spring: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ═══ SCROLLBAR ═══ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* Hide scrollbar for category strip */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* ═══ SELECTION ═══ */
::selection { background: var(--color-primary-light); color: var(--color-primary); }

/* ═══ FOCUS ═══ */
*:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* ═══ SMOOTH SCROLL ═══ */
html { scroll-behavior: smooth; }

/* ═══ BASE TRANSITIONS ═══ */
a, button { transition-property: color, background-color, border-color, box-shadow; transition-duration: 150ms; }

/* ═══ ANIMATIONS ═══ */
@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 1s linear infinite; }

@keyframes pulse { 50% { opacity: .5; } }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

@keyframes bounce {
  0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
  50% { transform: translateY(0); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
}
.animate-bounce { animation: bounce 1s infinite; }

/* ═══ UNIFIED BUTTON STYLES ═══ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background-color: var(--color-primary);
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 0.75rem;
  transition: all 0.2s;
  box-shadow: 0 4px 14px 0 rgba(3, 105, 161, 0.25);
}
.btn-primary:hover { background-color: var(--color-primary-hover); transform: scale(1.02); }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background-color: transparent;
  color: #374151;
  font-weight: 600;
  font-size: 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--color-primary); color: var(--color-primary); background-color: var(--color-primary-light); }

/* ═══ UNIFIED CARD STYLES ═══ */
.card-unified {
  background: white;
  border: 1px solid #f3f4f6;
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.2s;
}
.card-unified:hover { 
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}

/* ═══ BADGE STYLES ═══ */
.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.25rem;
  font-size: 0.5625rem;
  font-weight: 800;
  background-color: #ef4444;
  color: white;
  border-radius: 9999px;
}

.badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.125rem 0.5rem;
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  border: 1px solid rgba(3, 105, 161, 0.2);
  border-radius: 9999px;
}

/* ═══ NAV LINK STYLES ═══ */
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
  border-radius: 0.75rem;
  transition: all 0.15s;
  position: relative;
}
.nav-link:hover { color: #111827; background-color: #f3f4f6; }
.nav-link.active { color: var(--color-primary); background-color: var(--color-primary-light); font-weight: 600; }
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 1rem;
  height: 2px;
  background: var(--color-primary);
  border-radius: 9999px;
}

/* ═══ NAV DROPDOWN PANEL ═══ */
.nav-dd-panel {
  transition: opacity 200ms ease, transform 200ms ease;
}

/* ═══ INPUT STYLES ═══ */
.input-unified {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  transition: all 0.15s;
}
.input-unified:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.1);
}

/* ═══ LINE CLAMP ═══ */
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ═══ NO SCROLLBAR ═══ */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ═══ TYPOGRAPHY HIERARCHY ═══ */
.section-title {
  font-size: 0.8125rem;
  font-weight: 900;
  color: #1f2937;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.section-subtitle {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
}
.view-all-link {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-primary);
  transition: color 0.15s;
}
.view-all-link:hover { color: var(--color-primary-hover); }

/* ═══ BUTTON VARIANTS ═══ */
.btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.4375rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 0.625rem;
  transition: all 0.2s;
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: transparent;
  color: #374151;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0.75rem;
  transition: all 0.2s;
}
.btn-ghost:hover { background: #f3f4f6; color: #111827; }

.btn-brand-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 0.75rem;
  backdrop-filter: blur(4px);
  transition: all 0.2s;
}
.btn-brand-ghost:hover { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.35); }

/* ═══ CARD VARIANTS ═══ */
.card-elevated {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.04);
  overflow: hidden;
  transition: all 0.2s;
}
.card-elevated:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  transform: translateY(-2px);
}

/* ═══ STATUS BADGES ═══ */
.badge-pending { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; font-size: 0.6875rem; font-weight: 700; padding: 0.125rem 0.5rem; border-radius: 9999px; display: inline-flex; align-items: center; }
.badge-active { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; font-size: 0.6875rem; font-weight: 700; padding: 0.125rem 0.5rem; border-radius: 9999px; display: inline-flex; align-items: center; }
.badge-completed { background: #f0f9ff; color: #0369a1; border: 1px solid rgba(3,105,161,0.2); font-size: 0.6875rem; font-weight: 700; padding: 0.125rem 0.5rem; border-radius: 9999px; display: inline-flex; align-items: center; }
.badge-cancelled { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; font-size: 0.6875rem; font-weight: 700; padding: 0.125rem 0.5rem; border-radius: 9999px; display: inline-flex; align-items: center; }
.badge-in-progress { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; font-size: 0.6875rem; font-weight: 700; padding: 0.125rem 0.5rem; border-radius: 9999px; display: inline-flex; align-items: center; }

/* ═══ SKELETON LOADING ═══ */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 0.5rem;
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ═══ EMPTY STATE ═══ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
}
.empty-state-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1rem;
  color: #d1d5db;
}
.empty-state-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 0.25rem;
}
.empty-state-desc {
  font-size: 0.8125rem;
  color: #9ca3af;
  max-width: 20rem;
}
.empty-state-action {
  margin-top: 1rem;
}

/* ═══ SCROLL FADE INDICATORS ═══ */
.scroll-fade-x {
  position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent, black 1rem, black calc(100% - 1rem), transparent);
  mask-image: linear-gradient(to right, transparent, black 1rem, black calc(100% - 1rem), transparent);
}

/* ═══ MICRO-INTERACTIONS ═══ */
.clickable { transition: all 0.15s ease; }
.clickable:active { transform: scale(0.97); }
.transition-gpu { transform: translateZ(0); will-change: transform; }

/* ═══ PAGE FADE-IN ═══ */
@keyframes pageIn {
  from { opacity: 0.95; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}
.page-enter { opacity: 1; animation: pageIn 0.35s cubic-bezier(0.16,1,0.3,1) forwards; }

/* ══════════════════════════════════════════════════════════════════════
   FEED PAGE — World-Level Design System
   ══════════════════════════════════════════════════════════════════════ */

/* ═══ FEED CARD (posts) - Instagram flat style ═══ */
.feed-card {
  background: white !important;
  border-radius: 0 !important;
  border: none !important;
  border-bottom: 1px solid #efefef !important;
  box-shadow: none !important;
  transition: none;
  overflow: hidden;
}
.feed-card:hover {
  box-shadow: none !important;
}
@media (min-width: 640px) {
  .feed-card {
    border-radius: 8px !important;
    border: 1px solid #efefef !important;
    margin-bottom: 12px !important;
  }
}

/* ═══ FEED COMPOSER ═══ */
.feed-composer {
  background: white !important;
  border-radius: 0 !important;
  border: none !important;
  border-bottom: 1px solid #efefef !important;
  box-shadow: none !important;
  transition: all var(--feed-transition);
  position: relative;
  overflow: hidden;
}
@media (min-width: 640px) {
  .feed-composer {
    border-radius: 8px !important;
    border: 1px solid #efefef !important;
    margin-bottom: 12px !important;
  }
}
.feed-composer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0369A1, #38BDF8, #8B5CF6);
  opacity: 0;
  transition: opacity var(--feed-transition);
}
.feed-composer.composer-active::before { opacity: 1; }
.feed-composer.composer-active {
  box-shadow: 0 4px 20px rgba(3,105,161,0.12), 0 1px 3px rgba(0,0,0,0.04);
  border-color: rgba(3,105,161,0.15);
}
.feed-composer .composer-toolbar {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.3s ease;
  padding: 0 1rem;
}
.feed-composer.composer-active .composer-toolbar {
  max-height: 200px;
  opacity: 1;
  padding: 0.75rem 1rem;
}

/* ═══ INSTAGRAM ACTION BAR ═══ */
.ig-action-bar {
  display: flex;
  align-items: center;
  padding: 8px 12px !important;
  gap: 16px;
}
.ig-action-bar .ig-btn {
  background: none !important;
  border: none !important;
  padding: 8px !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, opacity 0.2s;
}
.ig-action-bar .ig-btn:hover { opacity: 0.6; }
.ig-action-bar .ig-btn:active { transform: scale(0.85); }
.ig-action-bar .ig-btn svg { width: 24px; height: 24px; }
.ig-action-bar .ig-btn.liked svg { fill: #ed4956 !important; stroke: #ed4956 !important; }
.ig-action-bar .ig-spacer { margin-left: auto; }
.ig-action-bar .ig-btn.saved svg { fill: #262626 !important; }

/* ═══ INSTAGRAM LIKES COUNT ═══ */
.ig-likes {
  padding: 0 12px 4px !important;
  font-size: 14px;
  font-weight: 600;
  color: #262626;
}

/* ═══ INSTAGRAM CAPTION ═══ */
.ig-caption {
  padding: 0 12px 8px !important;
  font-size: 14px;
  line-height: 1.5;
  color: #262626;
}
.ig-caption .ig-author {
  font-weight: 600;
  margin-right: 4px;
}
.ig-caption .ig-more {
  color: #8e8e8e;
  cursor: pointer;
}

/* ═══ INSTAGRAM COMMENT PREVIEW ═══ */
.ig-view-comments {
  padding: 0 12px 4px !important;
  font-size: 14px;
  color: #8e8e8e;
  cursor: pointer;
}
.ig-comment-input-wrap {
  display: flex;
  align-items: center;
  padding: 12px !important;
  border-top: 1px solid #efefef;
  gap: 12px;
}
.ig-comment-input-wrap input {
  flex: 1;
  border: none !important;
  outline: none !important;
  font-size: 14px;
  background: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
}
.ig-comment-input-wrap input::placeholder { color: #8e8e8e; }
.ig-comment-input-wrap .ig-post-btn {
  color: #0095f6;
  font-weight: 600;
  font-size: 14px;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.ig-comment-input-wrap .ig-post-btn:hover { opacity: 1; }

/* ═══ INSTAGRAM POST TIMESTAMP ═══ */
.ig-timestamp {
  padding: 0 12px 12px !important;
  font-size: 10px;
  color: #8e8e8e;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

/* ═══ FEED POST IMAGE - Instagram flat ═══ */
.feed-post-image {
  width: 100%;
  object-fit: cover;
  max-height: 585px;
  border-radius: 0 !important;
}
.feed-post-image:hover { opacity: 1; }

/* ═══ FEED POST HEADER ═══ */
.feed-post-avatar {
  width: 2.75rem !important;
  height: 2.75rem !important;
  border-radius: 50% !important;
  overflow: hidden;
  flex-shrink: 0;
  transition: transform var(--feed-transition-spring);
}
.feed-post-avatar:hover { transform: scale(1.08); }
.feed-post-author {
  font-size: 0.9375rem !important;
  font-weight: 700 !important;
  color: #111827 !important;
  text-decoration: none;
  transition: color 0.15s;
}
.feed-post-author:hover { color: #0369A1 !important; }
.feed-post-time {
  font-size: 0.6875rem;
  color: #9ca3af;
  font-weight: 500;
}

/* ═══ FEED POST BODY ═══ */
.feed-post-body {
  font-size: 0.9375rem !important;
  line-height: 1.65 !important;
  color: #1f2937 !important;
  word-break: break-word;
}

/* ═══ FEED ENGAGEMENT BAR ═══ */
.feed-engagement-bar {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  color: #6b7280;
}
.feed-engagement-bar button {
  transition: color 0.15s;
}
.feed-engagement-bar button:hover { color: #0369A1; }

/* ═══ FEED COMMENT INPUT ═══ */
.feed-comment-input {
  flex: 1 !important;
  font-size: 0.875rem !important;
  border: 1.5px solid #e5e7eb !important;
  border-radius: 9999px !important;
  padding: 0.625rem 1rem !important;
  background: #fafafa !important;
  transition: all var(--feed-transition);
}
.feed-comment-input:focus {
  outline: none !important;
  border-color: #0369A1 !important;
  background: white !important;
  box-shadow: 0 0 0 3px rgba(3,105,161,0.08) !important;
}

/* ═══ STORY STRIP ═══ */
.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform var(--feed-transition-spring);
}
.story-item:active { transform: scale(0.93); }
.story-avatar-ring {
  padding: 3px;
  border-radius: 50%;
  transition: transform var(--feed-transition-spring);
}
.story-avatar-ring:hover { transform: scale(1.05); }
.story-ring-gradient {
  background: linear-gradient(135deg, #0369A1, #38BDF8, #8B5CF6, #EC4899);
  background-size: 200% 200%;
  animation: storyGradientSpin 3s linear infinite;
}
@keyframes storyGradientSpin {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ═══ FEED TAB BAR ═══ */
.feed-tab-pill {
  padding: 0.5rem 1.25rem !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  border-radius: 9999px !important;
  white-space: nowrap;
  transition: all var(--feed-transition);
  color: #4b5563 !important;
  background: #f3f4f6 !important;
}
.feed-tab-pill:hover { background: #e5e7eb !important; color: #374151 !important; }
.feed-tab-pill.active {
  background: linear-gradient(135deg, #0369A1, #0284C7) !important;
  color: white !important;
  box-shadow: 0 2px 8px rgba(3,105,161,0.3) !important;
}

/* ═══ SIDEBAR STICKY ═══ */
@media (min-width: 1024px) {
  .feed-sidebar {
    position: sticky;
    top: 72px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    scrollbar-width: none;
  }
  .feed-sidebar::-webkit-scrollbar { display: none; }
}

/* ═══ TOAST NOTIFICATIONS ═══ */
.feed-toast {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  z-index: 99999;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
  opacity: 0;
  backdrop-filter: blur(10px);
}
.feed-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.feed-toast.toast-success { background: rgba(16,185,129,0.95); color: white; }
.feed-toast.toast-error { background: rgba(239,68,68,0.95); color: white; }
.feed-toast.toast-info { background: rgba(3,105,161,0.95); color: white; }

/* ═══ REDUCED MOTION ═══ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .page-enter { animation: none; }
}

/* ═══ MOBILE TOUCH TARGETS ═══ */
@media (max-width: 640px) {
  .feed-action-btn { min-height: 44px; }
  .feed-comment-input { min-height: 44px; font-size: 16px; /* prevent iOS zoom */ }
}

/* ══════════════════════════════════════════════════════════════════════════════
   MOBILE-FIRST RESPONSIVE — Optimised for Android WebView
   ══════════════════════════════════════════════════════════════════════════════ */

/* === Global mobile base === */
@media (max-width: 767px) {
  html, body {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: contain;
  }
  body {
    font-size: 15px;
  }

  /* Ensure all containers fit screen */
  .container, .max-w-7xl, .max-w-6xl, .max-w-5xl, .max-w-4xl, .max-w-3xl, .max-w-2xl, .max-w-xl,
  [class*="max-w-"] {
    max-width: 100% !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  /* Full-width cards on mobile */
  .card-unified, .card-elevated, .fw-card, .fw-card-static {
    border-radius: 12px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Buttons: bigger touch targets */
  button, a, [role="button"], .btn-primary, .btn-secondary, .btn-ghost, .btn-sm {
    min-height: 40px;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
  }

  /* Images never overflow */
  img, video, iframe, canvas, svg, table {
    max-width: 100% !important;
  }

  /* Prevent horizontal scroll */
  main, section, article {
    overflow-x: hidden !important;
  }

  /* Modal / drawer improvements */
  .fixed.inset-0, [class*="modal"], [class*="drawer"] {
    -webkit-overflow-scrolling: touch;
  }

  /* Form inputs: prevent zoom on iOS/Android */
  input[type="text"], input[type="email"], input[type="password"],
  input[type="tel"], input[type="url"], input[type="number"],
  input[type="search"], select, textarea {
    font-size: 16px !important;
    min-height: 44px;
    border-radius: 10px;
  }

  /* Reduce heavy shadows on mobile for perf */
  .card-unified:hover, .card-elevated:hover {
    transform: none !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
  }

  /* Smooth native-like scrolling */
  .overflow-y-auto, .overflow-y-scroll, [style*="overflow-y"] {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }

  /* Hide desktop-only elements */
  .hidden-mobile, .desktop-only { display: none !important; }
}

/* === Header mobile optimisation === */
@media (max-width: 767px) {
  #mainNav {
    height: 48px !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  #mainNav > div {
    height: 48px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    gap: 4px !important;
  }
  #mainNav img {
    height: 24px !important;
  }
  /* Tighter action icons on mobile header */
  #mainNav .flex.items-center.gap-0\.5 {
    gap: 0 !important;
  }
  #mainNav button, #mainNav a.relative {
    padding: 6px !important;
  }
  /* Avatar smaller on mobile */
  #mainNav .w-7 { width: 26px !important; height: 26px !important; }
  /* Hide user name on mobile */
  #mainNav .hidden.sm\:block { display: none !important; }

  /* Notification panel: full-width bottom sheet on mobile */
  #notifPanel {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-height: 70vh !important;
    border-radius: 16px 16px 0 0 !important;
    margin-top: 0 !important;
    box-shadow: 0 -4px 32px rgba(0,0,0,0.15) !important;
    z-index: 999 !important;
  }
  #notifPanel #notifList {
    max-height: 55vh !important;
  }

  /* Mobile side drawer: full-width on very small screens */
  #mobileMenu {
    width: min(280px, 85vw) !important;
  }
  #mobileMenu .flex-1.overflow-y-auto {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }
  /* Drawer nav items bigger touch targets */
  #mobileMenu a {
    min-height: 42px;
    display: flex;
    align-items: center;
  }
}

/* === Bottom nav safe area for Android === */
@media (max-width: 1023px) {
  #mobileBottomNav {
    padding-bottom: max(env(safe-area-inset-bottom, 0px), 4px);
  }
  /* Content doesn't go behind bottom nav */
  main {
    padding-bottom: 72px !important;
  }
}

/* === Notification page mobile === */
@media (max-width: 640px) {
  .notif-item {
    padding: 12px !important;
    border-radius: 10px !important;
  }
}

/* === Profile page mobile === */
@media (max-width: 640px) {
  .profile-cover { height: 140px !important; border-radius: 0 !important; }
  .profile-avatar { width: 72px !important; height: 72px !important; }
}

/* === Messages page mobile === */
@media (max-width: 767px) {
  /* Message list items: bigger touch targets */
  .message-thread, .dm-thread-item, [class*="thread"] a {
    padding: 12px 10px !important;
    min-height: 56px;
  }
  /* Chat input area */
  .chat-input, .dm-input-wrap {
    padding: 8px !important;
    gap: 8px !important;
  }
  .chat-input input, .dm-input-wrap input,
  .chat-input textarea, .dm-input-wrap textarea {
    font-size: 16px !important;
    min-height: 40px !important;
  }
}

/* === Tables responsive (admin/general) === */
@media (max-width: 767px) {
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table th, table td { white-space: nowrap; padding: 8px 10px !important; font-size: 13px !important; }
}

/* === Jobs/cards page mobile === */
@media (max-width: 640px) {
  .job-card, .event-card, .package-card {
    border-radius: 12px !important;
    padding: 14px !important;
  }
  .job-card h3, .event-card h3 {
    font-size: 15px !important;
  }
}

/* === Create Menu Sheet mobile === */
@media (max-width: 767px) {
  #createMenuSheet .grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
  }
  #createMenuSheet a {
    padding: 12px 8px !important;
  }
}

/* === Wallet / Dashboard stats mobile === */
@media (max-width: 640px) {
  .stat-card, .wallet-card, .dash-stat {
    padding: 14px !important;
    border-radius: 12px !important;
  }
}

/* === Modals/drawers fullscreen on mobile === */
@media (max-width: 640px) {
  .modal-content, [class*="modal-content"], .drawer-content {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 16px 16px 0 0 !important;
    max-height: 90vh !important;
  }
}

/* === Smooth page transitions === */
.fw-page-content {
  min-height: 100vh;
  min-height: 100dvh;
}

/* === Active states for mobile (tap feedback) === */
@media (hover: none) and (pointer: coarse) {
  button:active, a:active, [role="button"]:active, .clickable:active {
    opacity: 0.7;
    transition: opacity 0.1s;
  }
  /* Disable hover effects on touch */
  .card-unified:hover, .card-elevated:hover, .feed-card:hover {
    transform: none !important;
  }
}

/* ══════════════════════════════════════════════════════════════════════════════
   TIKTOK WEB STYLE — Full-screen vertical feed with sidebar
   ══════════════════════════════════════════════════════════════════════════════ */

/* ═══ TIKTOK LAYOUT SHELL ═══ */
.tiktok-shell {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: #f9fafb;
  position: fixed;
  top: 0;
  left: 0;
}

/* ═══ TIKTOK SIDEBAR ═══ */
.tiktok-sidebar {
  width: 240px;
  height: 100vh;
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding: 20px 12px;
  overflow-y: auto;
  z-index: 100;
}
.tiktok-sidebar::-webkit-scrollbar { width: 4px; }
.tiktok-sidebar::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 4px; }

.tt-sidebar-logo { padding: 0 8px 20px; }
.tt-logo-link { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.tt-logo-img { height: 28px; width: auto; }
.tt-logo-text { font-size: 18px; font-weight: 800; color: #0369A1; letter-spacing: -0.5px; }

.tt-sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 1px; overflow-y: auto; }

.tt-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #4b5563;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
  position: relative;
}
.tt-nav-item:hover { background: #f3f4f6; color: #111827; }
.tt-nav-item.active { color: #0369A1; font-weight: 700; background: #f0f9ff; }
.tt-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: #0369A1;
  border-radius: 0 4px 4px 0;
}

.tt-nav-icon { width: 22px; height: 22px; flex-shrink: 0; }
.tt-nav-label { white-space: nowrap; }

.tt-nav-badge {
  position: absolute;
  top: 4px;
  left: 30px;
  min-width: 16px;
  height: 16px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.tt-sidebar-bottom { padding-top: 12px; border-top: 1px solid #e5e7eb; margin-top: auto; }

.tt-feed-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  background: #f3f4f6;
  border-radius: 8px;
  padding: 3px;
}
.tt-feed-tab {
  flex: 1;
  padding: 8px 4px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #9ca3af;
  text-align: center;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.tt-feed-tab.active { background: #fff; color: #111827; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.tt-feed-tab:hover:not(.active) { color: #6b7280; }

.tt-create-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: #0369A1;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 12px;
  transition: all 0.2s;
}
.tt-create-btn:hover { background: #025C8F; transform: scale(1.02); }
.tt-create-btn:active { transform: scale(0.98); }

/* User profile row */
.tt-sidebar-user { display: flex; align-items: center; gap: 8px; padding: 8px 6px; border-radius: 8px; }
.tt-user-link { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: 1; min-width: 0; }
.tt-user-avatar { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: #f3f4f6; }
.tt-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tt-user-avatar span { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #fff; background: #0369A1; }
.tt-user-name { font-size: 13px; font-weight: 600; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-logout-btn { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 6px; color: #6b7280; text-decoration: none; font-size: 13px; transition: all .15s; }
.tt-logout-btn:hover { background: #fef2f2; color: #ef4444; }
.tt-logout-btn .tt-nav-icon { width: 18px; height: 18px; }

/* ═══ MOBILE BOTTOM NAV ═══ */
.tt-mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  padding: 6px 0 env(safe-area-inset-bottom, 6px);
  align-items: center;
  justify-content: space-around;
  height: 60px;
}
.tt-mob-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  color: #9ca3af;
  font-size: 10px;
  font-weight: 500;
  position: relative;
  transition: color .15s;
}
.tt-mob-item.active { color: #0369A1; }
.tt-mob-item span { line-height: 1; }
.tt-mob-create {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #0369A1;
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(3,105,161,0.3);
  margin-top: -8px;
}
.tt-mob-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 14px;
  height: 14px;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* ═══ TIKTOK FEED CONTAINER ═══ */
.tiktok-feed {
  flex: 1;
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.tiktok-feed::-webkit-scrollbar { display: none; }
.tiktok-feed { -ms-overflow-style: none; scrollbar-width: none; }

/* Page content inside TikTok feed (non-slide pages) */
.tt-page-content {
  height: 100vh;
  width: 100%;
  scroll-snap-align: start;
  overflow-y: auto;
  padding: 24px;
  color: #1f2937;
  background: #f9fafb;
}
.tt-page-content::-webkit-scrollbar { width: 6px; }
.tt-page-content::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
.tt-page-content::-webkit-scrollbar-track { background: transparent; }

/* ═══ TIKTOK SLIDE (each post) ═══ */
.tiktok-slide {
  height: 100vh;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #011929;
  overflow: hidden;
}

/* Post content fills the slide */
.tiktok-slide .tt-media {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tiktok-slide .tt-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.tiktok-slide .tt-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.tiktok-slide .tt-slide-img {
  max-width: 100%; max-height: 100%; object-fit: contain;
}
.tiktok-slide .tt-gallery {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  width: 100%; height: 100%; position: relative;
}
.tiktok-slide .tt-gallery-img {
  flex-shrink: 0; width: 100%; height: 100%; object-fit: contain;
  scroll-snap-align: center;
}
.tiktok-slide .tt-gallery-counter {
  position: absolute; top: 16px; right: 16px;
  background: rgba(0,0,0,0.6); color: #fff; font-size: 12px;
  font-weight: 600; padding: 4px 10px; border-radius: 12px;
}
.tiktok-slide .tt-video {
  width: 100%; height: 100%; object-fit: contain; cursor: pointer;
}
.tiktok-slide .tt-media-cover img,
.tiktok-slide .tt-media-cover video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Text-only posts get gradient background */
.tiktok-slide .tt-text-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
}
.tiktok-slide .tt-text-bg p {
  color: #fff;
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 700;
  text-align: center;
  line-height: 1.5;
  max-width: 600px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
  word-break: break-word;
}

/* ═══ TIKTOK RIGHT ACTION BAR ═══ */
.tiktok-actions {
  position: absolute;
  right: 16px;
  bottom: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  z-index: 20;
}

.tt-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}
.tt-action-btn .tt-action-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.tt-action-btn .tt-action-icon svg { width: 22px; height: 22px; }
.tt-action-btn > svg { width: 28px; height: 28px; color: #fff; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }
.tt-action-btn:hover .tt-action-icon { background: rgba(255,255,255,0.2); transform: scale(1.1); }
.tt-action-btn:hover > svg { transform: scale(1.15); transition: transform 0.2s; }
.tt-action-btn:active .tt-action-icon { transform: scale(0.9); }
.tt-action-btn .tt-action-count {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

/* Liked state */
.tt-action-btn.tt-liked .tt-action-icon { background: rgba(254,44,85,0.2); }
.tt-action-btn.tt-liked .tt-action-icon svg { fill: #fe2c55; stroke: #fe2c55; }

/* Heart bounce animation */
@keyframes ttHeartBounce {
  0% { transform: scale(1); }
  25% { transform: scale(1.3); }
  50% { transform: scale(0.95); }
  75% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
.tt-heart-bounce .tt-action-icon { animation: ttHeartBounce 0.4s ease; }

/* Avatar in action bar */
.tt-action-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #fff;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
}
.tt-action-avatar:hover { transform: scale(1.1); }
.tt-action-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ═══ TIKTOK BOTTOM OVERLAY (author info) ═══ */
.tiktok-overlay {
  position: absolute;
  bottom: 20px;
  left: 16px;
  right: 80px;
  z-index: 15;
  color: #fff;
}
.tt-overlay-author, .tt-author-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.tt-overlay-avatar, .tt-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #fff;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: #0369A1; color: #fff; font-weight: 700; font-size: 14px;
  text-decoration: none;
}
.tt-overlay-avatar img, .tt-author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tt-overlay-name, .tt-author-name {
  font-size: 15px;
  font-weight: 700;
  text-shadow: 0 1px 6px rgba(0,0,0,0.8);
  color: #fff; text-decoration: none;
}
.tt-author-name:hover { text-decoration: underline; }
.tt-overlay-time, .tt-timestamp {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
.tt-verified { flex-shrink: 0; }
.tt-overlay-caption, .tt-caption {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 6px rgba(0,0,0,0.8);
  max-height: 80px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  margin-top: 6px;
}
.tt-overlay-caption.expanded {
  max-height: none;
  -webkit-line-clamp: unset;
}
.tt-caption-more {
  color: rgba(255,255,255,0.6);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  margin-top: 4px;
  display: inline-block;
}
.tt-caption-more:hover { color: #fff; }

/* ═══ TIKTOK COMMENT DRAWER ═══ */
.tt-comment-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 90vw;
  height: 100vh;
  background: #ffffff;
  z-index: 200;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 1px solid #e2e8f0;
}
.tt-comment-drawer.open { transform: translateX(0); }
.tt-comment-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.tt-comment-drawer-backdrop.open { opacity: 1; pointer-events: auto; }

.tt-comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
}
.tt-comment-header h3 { color: #1e293b; font-size: 16px; font-weight: 700; }
.tt-comment-header button { color: #64748b; background: none; border: none; cursor: pointer; padding: 4px; }
.tt-comment-header button:hover { color: #1e293b; }

.tt-comment-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}
.tt-comment-list::-webkit-scrollbar { width: 4px; }
.tt-comment-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.tt-comment-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}
.tt-comment-input-wrap input {
  flex: 1;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 14px;
  color: #1e293b;
  outline: none;
}
.tt-comment-input-wrap input::placeholder { color: #94a3b8; }
.tt-comment-input-wrap input:focus { border-color: #0369A1; }
.tt-comment-input-wrap button {
  background: #0369A1;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.tt-comment-input-wrap button:hover { background: #025C8F; }

/* ═══ Comment Drawer (inline style:display approach) ═══ */
.tt-comment-drawer[style*="display: flex"],
.tt-comment-drawer[style*="display:flex"] {
  transform: translateX(0) !important;
}
.tt-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid #e2e8f0;
}
.tt-drawer-title { color: #1e293b; font-size: 16px; font-weight: 700; }
.tt-drawer-close { color: #64748b; background: none; border: none; cursor: pointer; font-size: 28px; line-height: 1; }
.tt-drawer-close:hover { color: #1e293b; }
.tt-drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.tt-drawer-body::-webkit-scrollbar { width: 4px; }
.tt-drawer-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.tt-drawer-footer {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-top: 1px solid #e2e8f0; background: #f8fafc;
}
.tt-drawer-footer input {
  flex: 1; background: #ffffff; border: 1px solid #e2e8f0;
  border-radius: 20px; padding: 10px 16px; font-size: 14px; color: #1e293b; outline: none;
}
.tt-drawer-footer input::placeholder { color: #94a3b8; }
.tt-drawer-footer input:focus { border-color: #0369A1; }
.tt-drawer-send {
  background: #0369A1; color: #fff; border: none; border-radius: 20px;
  padding: 10px 16px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.tt-drawer-send:hover { background: #025C8F; }
.tt-drawer-comment { padding: 8px 0; border-bottom: 1px solid #f1f5f9; color: #374151; font-size: 13px; }
.tt-drawer-comment strong { color: #1e293b; margin-right: 6px; font-size: 13px; }

/* ═══ TikTok Dropdown menu ═══ */
.tt-dropdown {
  position: absolute; right: 100%; top: 50%; transform: translateY(-50%);
  background: #ffffff; border-radius: 12px; padding: 8px 0; min-width: 140px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12); z-index: 100;
}
.tt-dropdown button, .tt-dropdown a {
  display: block; width: 100%; text-align: left; padding: 8px 16px;
  color: #374151; font-size: 13px; background: none; border: none; cursor: pointer;
  text-decoration: none;
}
.tt-dropdown button:hover, .tt-dropdown a:hover { background: #f1f5f9; }
.tt-dropdown .tt-danger { color: #fe2c55; }
.tt-dropdown .tt-danger:hover { background: rgba(254,44,85,0.1); }

/* ═══ TikTok Spinner ═══ */
.tt-spinner {
  width: 40px; height: 40px; border: 3px solid rgba(255,255,255,0.15);
  border-top-color: #0369A1; border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ TIKTOK GALLERY DOTS ═══ */
.tt-gallery-dots {
  position: absolute;
  top: 50%;
  right: 80px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 15;
}
.tt-gallery-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transition: all 0.2s;
}
.tt-gallery-dot.active { background: #fff; transform: scale(1.3); }

/* ═══ TIKTOK CREATE MODAL ═══ */
.tt-create-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.tt-create-modal-content {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  margin: 16px;
  border: 1px solid #e2e8f0;
}

/* ═══ TIKTOK RESPONSIVE ═══ */
@media (max-width: 1279px) {
  .tiktok-sidebar { width: 72px; padding: 16px 8px; align-items: center; }
  .tt-logo-text, .tt-nav-label, .tt-feed-tabs { display: none; }
  .tt-logo-img { height: 24px; }
  .tt-sidebar-logo { padding: 0 0 20px; }
  .tt-nav-item { padding: 12px; justify-content: center; }
  .tt-nav-item.active::before { display: none; }
  .tt-create-btn { padding: 12px; }
  .tt-create-btn .tt-nav-label { display: none; }
  .tt-nav-badge { left: 24px; top: 4px; }
  .tt-sidebar-user { flex-direction: column; gap: 4px; }
  .tt-user-name { display: none; }
  .tt-logout-btn span { display: none; }
  .tt-logout-btn { padding: 6px; }
  .tiktok-overlay { left: 12px; right: 72px; }
  .tiktok-actions { right: 12px; }
}

@media (max-width: 767px) {
  .tiktok-sidebar { display: none; }
  .tt-mobile-nav { display: flex; }
  .tiktok-feed { padding-bottom: 60px; }
  .tt-page-content { padding-bottom: 70px !important; }
  .tiktok-overlay { left: 12px; right: 70px; bottom: 80px; }
  .tiktok-actions { right: 10px; bottom: 100px; }
  .tt-comment-drawer { width: 100%; max-width: 100%; border-left: none; border-top-left-radius: 16px; border-top-right-radius: 16px; height: 60vh; top: auto; bottom: 0; transform: translateY(100%); }
  .tt-comment-drawer.open { transform: translateY(0); }
}

/* ═══ TIKTOK SCROLL HINT ═══ */
@keyframes ttScrollHint {
  0%, 100% { opacity: 0.6; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(8px); }
}
.tt-scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  animation: ttScrollHint 2s ease-in-out infinite;
  z-index: 10;
  pointer-events: none;
}
.tt-scroll-hint svg { width: 20px; height: 20px; }
.tt-scroll-hint span { font-size: 11px; font-weight: 500; }

