/* ============================================================
   Entrepreneur Connect — Glass Theme
   Shared visual layer: glassmorphism, aurora background,
   dark mode, Lucide sizing + animations.
   Included on every page alongside Tailwind (CDN).
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ---------- Design tokens ---------- */
:root {
  color-scheme: light;
  --brand-1: #7c3aed; /* violet-600 */
  --brand-2: #3b82f6; /* blue-500 */
  --brand-grad: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);

  --app-bg: #eef1f8;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: rgba(255, 255, 255, 0.92);
  --border: rgba(255, 255, 255, 0.55);
  --ring: rgba(124, 58, 237, 0.35);

  --glass-blur: 18px;
  --glass-shadow: 0 8px 32px rgba(17, 24, 39, 0.12);
  --glass-shadow-hover: 0 16px 48px rgba(17, 24, 39, 0.18);

  --text-strong: #1f2937;
  --text-soft: #4b5563;
  --text-muted: #6b7280;

  --blob-1: rgba(124, 58, 237, 0.35);
  --blob-2: rgba(59, 130, 246, 0.32);
  --blob-3: rgba(236, 72, 153, 0.22);
}

html.dark {
  color-scheme: dark;
  --app-bg: #070b18;
  --surface: rgba(22, 28, 45, 0.62);
  --surface-solid: rgba(22, 28, 45, 0.85);
  --border: rgba(255, 255, 255, 0.10);
  --ring: rgba(139, 92, 246, 0.45);

  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --glass-shadow-hover: 0 18px 52px rgba(0, 0, 0, 0.6);

  --text-strong: #f3f4f6;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;

  --blob-1: rgba(124, 58, 237, 0.42);
  --blob-2: rgba(37, 99, 235, 0.40);
  --blob-3: rgba(219, 39, 119, 0.30);
}

/* ---------- Page background + animated aurora ---------- */
body {
  background: var(--app-bg) !important;
  color: var(--text-soft);
  transition: background 0.4s ease, color 0.3s ease;
}

/* Aurora blobs live behind everything, fixed to the viewport */
body::before {
  content: "";
  position: fixed;
  inset: -20% -10%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(38% 38% at 18% 22%, var(--blob-1) 0%, transparent 60%),
    radial-gradient(42% 42% at 82% 18%, var(--blob-2) 0%, transparent 60%),
    radial-gradient(46% 46% at 68% 82%, var(--blob-3) 0%, transparent 60%);
  filter: blur(48px);
  animation: aurora-drift 22s ease-in-out infinite alternate;
}

html.dark body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 60% at 50% 0%, rgba(124, 58, 237, 0.12), transparent 70%);
}

@keyframes aurora-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(2%, -2%, 0) scale(1.08); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1.04); }
}

/* ---------- Glass surfaces (applied to existing card markup) ---------- */
/* Cards / panels: any div using the app's bg-white + rounded/shadow pattern */
div.bg-white,
.glass,
.glass-card {
  background: var(--surface) !important;
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  border: 1px solid var(--border) !important;
  box-shadow: var(--glass-shadow) !important;
}

/* Top navigation bars */
nav.bg-white,
header.glass-nav {
  background: var(--surface-solid) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border) !important;
  box-shadow: 0 4px 24px rgba(17, 24, 39, 0.08) !important;
}

/* Hover lift for interactive cards */
.hover-lift {
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease;
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--glass-shadow-hover) !important;
}

/* ---------- Brand gradient helpers ---------- */
.brand-gradient {
  background: var(--brand-grad) !important;
}
.brand-text {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Inputs: soft glass field ---------- */
input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
  transition: border-color 0.2s ease, box-shadow 0.2s ease,
    background 0.2s ease;
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring) !important;
}

/* ---------- Lucide icon sizing (matches previous FA sizes) ---------- */
.lucide,
svg.lucide {
  width: 1.25em;
  height: 1.25em;
  stroke-width: 2.2;
  vertical-align: -0.18em;
}

/* ---------- Animations ---------- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scale-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.28); }
  100% { transform: scale(1); }
}
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.animate-fade-up { animation: fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; }
.animate-fade-in { animation: fade-in 0.5s ease both; }
.animate-scale-in { animation: scale-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both; }
.animate-pop { animation: pop 0.35s ease; }

/* Scroll reveal (JS adds .is-visible) */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger feed cards in */
.posts-feed > div,
[data-stagger] > * {
  animation: fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.posts-feed > div:nth-child(1) { animation-delay: 0.03s; }
.posts-feed > div:nth-child(2) { animation-delay: 0.08s; }
.posts-feed > div:nth-child(3) { animation-delay: 0.13s; }
.posts-feed > div:nth-child(4) { animation-delay: 0.18s; }
.posts-feed > div:nth-child(5) { animation-delay: 0.23s; }
.posts-feed > div:nth-child(n + 6) { animation-delay: 0.28s; }

/* Shimmer skeleton */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--surface) 25%,
    rgba(255, 255, 255, 0.35) 37%,
    var(--surface) 63%
  );
  background-size: 400px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

/* ---------- Dark-mode overrides for existing Tailwind utilities ---------- */
/* So pages written with fixed gray/white classes look right in dark mode. */
html.dark body,
html.dark .bg-gray-50,
html.dark .bg-gray-100 {
  color: var(--text-soft);
}
html.dark .bg-gray-50,
html.dark .bg-gray-100 {
  background: rgba(255, 255, 255, 0.04) !important;
}
html.dark .text-gray-900 { color: #f8fafc !important; }
html.dark .text-gray-800 { color: var(--text-strong) !important; }
html.dark .text-gray-700 { color: var(--text-soft) !important; }
html.dark .text-gray-600 { color: var(--text-muted) !important; }
html.dark .text-gray-500 { color: var(--text-muted) !important; }
html.dark .text-gray-400 { color: #94a3b8 !important; }
html.dark .border,
html.dark .border-gray-100,
html.dark .border-gray-200,
html.dark .border-gray-300 {
  border-color: var(--border) !important;
}
html.dark input,
html.dark textarea,
html.dark select {
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-strong) !important;
  border-color: var(--border) !important;
}
html.dark input::placeholder,
html.dark textarea::placeholder {
  color: var(--text-muted) !important;
}

/* ---------- Dark mode disabled: app is light-only ---------- */
[data-theme-toggle] {
  display: none !important;
}

/* ---------- Reduced-motion accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  body::before { animation: none; }
}

/* ============================================================
   v2 — modern dashboard layer
   ============================================================ */

/* ---------- Typography: Inter everywhere ---------- */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, sans-serif;
  letter-spacing: -0.011em;
}
h1, h2, h3, h4 {
  letter-spacing: -0.02em;
}

::selection {
  background: rgba(124, 58, 237, 0.22);
}

/* ---------- Card radius: softer, more modern ---------- */
div.bg-white,
.glass,
.glass-card {
  border-radius: 16px;
}

/* ---------- Sleek scrollbars ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.28);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(124, 58, 237, 0.5); background-clip: padding-box; }

/* ---------- Press feedback on controls ---------- */
button:active,
a:active,
input[type="submit"]:active {
  transform: translateY(1px) scale(0.99);
}

/* ---------- Segmented pill tabs (filters, connection tabs) ---------- */
.seg-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.seg-tabs button,
.seg-pill {
  border-radius: 999px !important;
  padding: 8px 16px !important;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.seg-tabs button.bg-gray-200 {
  background: rgba(17, 24, 39, 0.05) !important;
  color: var(--text-soft) !important;
}
.seg-tabs button.bg-gray-200:hover {
  background: rgba(124, 58, 237, 0.1) !important;
  color: var(--brand-1) !important;
}
.seg-tabs button.bg-purple-600 {
  background: var(--brand-grad) !important;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.35);
}

/* ---------- Gradient icon chips for sidebar rows ---------- */
.side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text-soft);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.side-link i {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 15px;
  background: rgba(124, 58, 237, 0.1);
  color: var(--brand-1);
  transition: background 0.18s ease, color 0.18s ease;
}
.side-link:hover {
  background: rgba(124, 58, 237, 0.07);
  color: var(--brand-1);
  transform: translateX(2px);
}
.side-link.active {
  background: var(--brand-grad);
  color: #fff;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3);
}
.side-link.active i {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* ---------- Mobile bottom navigation (app-style) ---------- */
.bottom-nav { display: none; }
@media (max-width: 1023px) {
  body:has(.bottom-nav) { padding-bottom: 88px; }
  .bottom-nav {
    display: flex;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 70;
    justify-content: space-around;
    padding: 8px 10px;
    border-radius: 999px;
    background: var(--surface-solid);
    -webkit-backdrop-filter: blur(22px) saturate(170%);
    backdrop-filter: blur(22px) saturate(170%);
    border: 1px solid var(--border);
    box-shadow: var(--glass-shadow);
  }
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease, background 0.2s ease;
}
.bottom-nav a i { font-size: 17px; }
.bottom-nav a:hover { color: var(--brand-1); }
.bottom-nav a.active {
  color: #fff;
  background: var(--brand-grad);
}
.bottom-nav .bn-dot {
  position: absolute;
  top: 5px;
  right: 9px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ef4444;
  border: 2px solid #fff;
}

/* ---------- Skeleton blocks for loading states ---------- */
.skeleton-line {
  height: 12px;
  border-radius: 999px;
}
.skeleton-circle {
  border-radius: 999px;
}

/* ---------- Nav search pill ---------- */
.nav-search {
  border-radius: 999px !important;
  background: rgba(17, 24, 39, 0.05);
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.nav-search:focus {
  background: #fff;
  border-color: rgba(124, 58, 237, 0.35);
}

/* ---------- Stat cards ---------- */
.stat-value {
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

