:root {
  --bg-dark: #0f172a;
  --bg-darker: #0b0f19;
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --danger: #ef4444;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --sidebar-width: 280px;
  --topbar-height: 70px;
  --border-radius: 16px;
  --shadow-sm:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-glass: 0 4px 30px rgba(0, 0, 0, 0.5);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ===== TOAST NOTIFICATIONS ===== */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  color: #f8fafc;
  font-size: 0.9rem;
  min-width: 280px;
  max-width: 420px;
  pointer-events: all;
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

body.light-mode .toast {
  background: rgba(255, 255, 255, 0.95);
  color: #1e293b;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.toast-show {
  transform: translateX(0);
  opacity: 1;
}

.toast-hide {
  transform: translateX(120%);
  opacity: 0;
}

.toast-icon {
  font-size: 22px;
  flex-shrink: 0;
}
.toast-msg {
  flex: 1;
  line-height: 1.4;
}
.toast-close {
  font-size: 18px;
  cursor: pointer;
  opacity: 0.5;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.toast-close:hover {
  opacity: 1;
}

.toast-success .toast-icon {
  color: #10b981;
}
.toast-error .toast-icon {
  color: #ef4444;
}
.toast-warning .toast-icon {
  color: #f59e0b;
}
.toast-info .toast-icon {
  color: #6366f1;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

body.dark-mode {
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
}

/* Light Mode Override */
body.light-mode {
  --bg-dark: #f1f5f9;
  --bg-darker: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.08);
  --text-main: #1e293b;
  --text-muted: #64748b;
  --shadow-glass: 0 4px 30px rgba(0, 0, 0, 0.08);
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
}

/* Logo Image */
.logo-img {
  height: 40px;
  width: auto;
  border-radius: 8px;
  transition: var(--transition);
}

/* In dark mode, the logo is white on black bg, so invert(1) makes it visible */
body.dark-mode .logo-img {
  filter: invert(1);
}

/* In light mode, logo is already white on black, keep as-is */
body.light-mode .logo-img {
  filter: invert(0);
}

/* Theme Toggle */
.theme-toggle {
  font-size: 1.2rem;
}

/* Light mode specific overrides */
body.light-mode input[type="email"],
body.light-mode input[type="password"],
body.light-mode input[type="text"] {
  background: rgba(241, 245, 249, 0.8);
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--text-main);
}

body.light-mode .btn-outline {
  border-color: rgba(0, 0, 0, 0.15);
  color: var(--text-main);
}

body.light-mode .btn-icon {
  color: var(--text-muted);
}

body.light-mode .btn-icon:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-main);
}

body.light-mode .chat-input-area input {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-main);
}

body.light-mode .mcq-chip {
  border-color: rgba(0, 0, 0, 0.12);
}

body.light-mode .topbar {
  background: rgba(255, 255, 255, 0.9);
}

body.light-mode .sidebar {
  background: var(--bg-darker);
}

body.light-mode .landing-nav {
  background: rgba(255, 255, 255, 0.9);
}

/* Typography elements */
h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
h2 {
  font-size: 1.5rem;
  font-weight: 600;
}
h3 {
  font-size: 1.25rem;
  font-weight: 600;
}
p {
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: var(--primary-hover);
}

/* Utility Classes */
.hidden {
  display: none !important;
}
.text-primary {
  color: var(--primary);
}
.text-danger {
  color: var(--danger);
}
.text-muted {
  color: var(--text-muted);
}
.mt-4 {
  margin-top: 1.5rem;
}
.p-4 {
  padding: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--border-radius);
  border: none;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #818cf8);
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.39);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
}

.btn-pill {
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.875rem;
  background: var(--glass-bg);
  color: var(--text-muted);
}
.btn-pill.active {
  background: var(--primary);
  color: white;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

/* Glass Panels */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-glass);
}

/* Form Elements */
.input-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-main);
  font-size: 1rem;
  transition: var(--transition);
}

input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Views & Containers */
.view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transition:
    opacity 0.4s ease,
    visibility 0.4s;
  opacity: 0;
  visibility: hidden;
  z-index: 10;
}

.view-active {
  opacity: 1;
  visibility: visible;
  z-index: 20;
}

/* ===== LANDING PAGE ===== */
.landing-page {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
}

.landing-nav-links {
  display: flex;
  gap: 12px;
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.9rem;
  border-radius: 10px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.05rem;
  border-radius: 14px;
}

/* Hero */
.hero-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 100vh;
  gap: 4rem;
  padding-top: 80px;
}

.hero-content {
  flex: 1;
  max-width: 540px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 999px;
  font-size: 0.85rem;
  color: #a5b4fc;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), #818cf8, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 3rem;
}

.hero-stat h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.hero-stat p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Hero Visual (Floating Cards) */
.hero-visual {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-card {
  padding: 1.25rem;
  width: 280px;
  animation: floatCard 3s ease-in-out infinite;
}

.hero-card-float {
  animation: floatCard 3s ease-in-out infinite reverse;
  margin-left: 60px;
}

.hero-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-card-header img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.hero-match-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #10b981;
  font-weight: 600;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes floatCard {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* How It Works Section */
.how-section {
  padding: 5rem 0;
}

.section-heading {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 3rem;
}

.steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.step-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.step-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
}

.step-card h4 {
  margin-bottom: 0.5rem;
}

.step-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Landing CTA */
.landing-cta {
  text-align: center;
  padding: 4rem 0 3rem;
}

.landing-cta h2 {
  margin-bottom: 1.5rem;
}

/* Auth Close Button */
.auth-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
}

.auth-card {
  position: relative;
}

/* Landing Responsive */
@media (max-width: 768px) {
  .hero-section {
    flex-direction: column;
    text-align: center;
    padding-top: 100px;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-stats {
    justify-content: center;
    gap: 2rem;
  }
  .hero-visual {
    display: none;
  }
  .steps-row {
    grid-template-columns: 1fr;
  }
}

/* Auth Specifics */
.auth-card,
.onboarding-card {
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
  text-align: center;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 1rem;
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--glass-border);
}

.divider span {
  padding: 0 10px;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.btn-google img {
  width: 24px;
}

/* Onboarding */
.onboarding-progress {
  margin: 1.5rem 0;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #818cf8);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.progress-text {
  display: block;
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.onboarding-step {
  animation: fadeIn 0.35s ease;
}

.onboarding-step h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

/* MCQ Option Cards (single select) */
.mcq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.mcq-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 1.25rem 1rem;
  border: 2px solid var(--glass-border);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.mcq-option:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}

.mcq-option.selected {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.12);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.2);
}

.mcq-option .material-icons-round {
  font-size: 2rem;
  color: var(--primary);
}

.mcq-option span:nth-child(2) {
  font-weight: 600;
  font-size: 0.95rem;
}

.mcq-option small {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* MCQ Chip Selectors (multi-select) */
.mcq-grid.multi {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.mcq-chip {
  padding: 10px 16px;
  border: 1.5px solid var(--glass-border);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  text-align: center;
  transition: var(--transition);
  user-select: none;
}

.mcq-chip:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.05);
}

.mcq-chip.selected {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  font-weight: 500;
}

.role-selector {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
}

.role-option {
  flex: 1;
  padding: 1.5rem;
  border: 2px solid var(--glass-border);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.role-option:hover {
  border-color: rgba(99, 102, 241, 0.5);
}
.role-option.selected {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.role-option .material-icons-round {
  font-size: 2.5rem;
  color: var(--primary);
}

.skill-input-container {
  display: flex;
  gap: 10px;
  margin-bottom: 1rem;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.skill-tag {
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.onboarding-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}

/* App Layout */
.app-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.app-layout.active {
  opacity: 1;
  z-index: 30;
  position: relative;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-darker);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  height: 100%;
  transition:
    width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
    padding 0.3s ease;
  z-index: 100;
  overflow: hidden;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2.5rem;
  padding-left: 1rem;
  white-space: nowrap;
  overflow: hidden;
}

.nav-links {
  list-style: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}
.nav-item.active {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary);
  font-weight: 500;
}

.divider-li {
  height: 1px;
  background: var(--glass-border);
  margin: 16px 0;
}

.badge-container {
  position: relative;
}
.badge {
  background: var(--danger);
  color: white;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: auto;
}

/* Topbar */
.topbar {
  height: var(--topbar-height);
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: absolute;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  z-index: 90;
  transition: left 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Sidebar toggles */
#mobile-menu-toggle {
  display: none;
}
#sidebar-menu-toggle {
  display: flex;
  margin-left: 0.5rem;
}

/* Sidebar collapsed state */
.sidebar.collapsed {
  width: 72px;
  padding: 1.5rem 0.75rem;
}

.sidebar.collapsed .sidebar-logo {
  justify-content: center;
  padding-left: 0;
}

.sidebar.collapsed .sidebar-logo img {
  height: 30px;
}

.sidebar.collapsed .nav-label,
.sidebar.collapsed span.nav-label,
.sidebar.collapsed .badge {
  opacity: 0;
  width: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.sidebar.collapsed .sidebar-footer {
  padding: 0;
}
.sidebar.collapsed #logout-btn {
  padding: 12px;
  justify-content: center;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 14px;
  gap: 0;
}

/* Tooltip on hover in collapsed mode */
.sidebar.collapsed .nav-item:hover::after,
.sidebar.collapsed #logout-btn:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 12px;
  background: var(--bg-darker);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  white-space: nowrap;
  z-index: 200;
  box-shadow: var(--shadow-glass);
  pointer-events: none;
}
.sidebar.collapsed #logout-btn {
  position: relative;
}

.sidebar.collapsed + .topbar {
  left: 72px;
}

.sidebar.collapsed ~ .main-content {
  margin-left: 72px;
}

.search-container {
  position: relative;
  width: 100%;
  max-width: 400px;
}

.search-container input {
  padding-left: 48px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 30px;
  border: 1px solid transparent;
}

.search-container input:focus {
  background: var(--bg-dark);
  border-color: var(--glass-border);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}
.avatar img:hover {
  border-color: var(--primary);
}

/* Main Content Area */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  margin-top: var(--topbar-height);
  padding: 2rem;
  overflow-y: auto;
  background: var(--bg-dark);
  position: relative;
}

.content-section {
  display: none;
  animation: fadeIn 0.4s ease;
}
.content-section.section-active {
  display: block;
}

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

/* Home / Widgets */
.page-header {
  margin-bottom: 2rem;
}
.subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  gap: 1.5rem;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* Match Grid */
.match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.user-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.user-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-card-header img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

.skill-tags {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Chat Layout Override */
.chat-layout {
  display: flex !important;
  gap: 1.5rem;
  height: calc(100vh - var(--topbar-height) - 4rem);
  padding: 0 !important;
}

#section-messages:not(.section-active) {
  display: none !important;
}

.chat-sidebar {
  width: 300px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-search {
  padding: 1rem;
  border-bottom: 1px solid var(--glass-border);
}

.chat-list {
  flex: 1;
  overflow-y: auto;
}

.chat-item {
  display: flex;
  padding: 16px;
  gap: 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  transition: var(--transition);
}

.chat-item:hover,
.chat-item.active {
  background: rgba(255, 255, 255, 0.05);
}

.avatar-container {
  position: relative;
}
.avatar-container img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}
.online-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  background: #10b981;
  border: 2px solid var(--glass-bg);
  border-radius: 50%;
}

.chat-item-content {
  flex: 1;
  overflow: hidden;
}
.chat-item-content h4 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.chat-item-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chat-window {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chat-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-user-info img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.online-status {
  font-size: 0.8rem;
  color: #10b981;
}

.chat-messages {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message {
  max-width: 70%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.message.sent {
  align-self: flex-end;
}
.message.received {
  align-self: flex-start;
}

.msg-content {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.95rem;
}

.sent .msg-content {
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.received .msg-content {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-bottom-left-radius: 4px;
}

.msg-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  align-self: flex-end;
}
.received .msg-time {
  align-self: flex-start;
}

.chat-input-area {
  padding: 1rem;
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-input-area input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: 20px;
  padding: 12px 20px;
  color: white;
}
.chat-input-area input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.1);
}

/* Animations */
.fade-in {
  opacity: 0;
  animation: fadeInCustom 0.6s ease forwards;
}
.delay-1 {
  animation-delay: 0.1s;
}
.delay-2 {
  animation-delay: 0.2s;
}
.delay-3 {
  animation-delay: 0.3s;
}
.delay-4 {
  animation-delay: 0.4s;
}

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

/* Responsive Data */
@media (max-width: 992px) {
  .chat-layout {
    flex-direction: column;
  }
  .chat-sidebar {
    width: 100%;
    height: 200px;
    flex: none;
  }
}

@media (max-width: 768px) {
  /* Mobile First Adjustments */
  .sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    bottom: 0;
    z-index: 999;
    box-shadow: var(--shadow-glass);
  }
  .sidebar.open {
    left: 0;
  }

  .topbar {
    left: 0;
    padding: 0 1rem;
  }
  .main-content {
    margin-left: 0;
    padding: 1rem;
  }
  #mobile-menu-toggle {
    display: flex;
  }
  .mobile-menu-btn {
    display: flex;
  }

  .search-container {
    display: none;
  } /* Could be a modal instead on mobile */
  .chat-sidebar {
    display: none;
  } /* Hide list when chatting */
}

/* ===== EXPLORE SKILL CARDS ===== */
.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.explore-skill-card {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: var(--transition);
  cursor: default;
}

.explore-skill-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.12);
}

.explore-skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.explore-skill-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.btn-pill {
  padding: 8px 18px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
}

.btn-pill:hover,
.btn-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
