/* ============================================================
   AI101 Platform — Main Stylesheet
   ============================================================ */

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --bg-dark: #0a0a0f;
  --bg-card: #111118;
  --bg-card2: #16161e;
  --bg-section: #0d0d14;
  --border: rgba(255,255,255,0.08);
  --text-muted: #6b7280;

  /* Override Bootstrap 5 CSS variables for dark theme */
  --bs-body-color:        #e5e7eb;
  --bs-body-bg:           #0a0a0f;
  --bs-heading-color:     #ffffff;
  --bs-link-color:        #818cf8;
  --bs-link-hover-color:  #a5b4fc;
  --bs-border-color:      rgba(255,255,255,0.08);
  --bs-secondary-color:   #9ca3af;
  --bs-tertiary-color:    #6b7280;
  --bs-secondary-bg:      #111118;
  --bs-tertiary-bg:       #16161e;
  --bs-emphasis-color:    #ffffff;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-dark);
  color: #e5e7eb;
  min-height: 100vh;
}

/* Headings use Bootstrap heading color var — themes override it */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--bs-heading-color, #ffffff);
}

/* Paragraphs and base text */
p, li, td, th, label, span:not(.badge):not(.nav-link), div {
  color: inherit;
}

/* Bootstrap table defaults */
.table { color: #e5e7eb; }
.table > :not(caption) > * > * { color: inherit; background-color: transparent; }

/* Bootstrap list-group */
.list-group-item { background-color: var(--bg-card); color: #e5e7eb; border-color: var(--border); }

/* Bootstrap modal */
.modal-content { background-color: var(--bg-card); color: #e5e7eb; border-color: var(--border); }
.modal-header, .modal-footer { border-color: var(--border); }

/* Bootstrap dropdown */
.dropdown-menu { background-color: var(--bg-card2); border-color: var(--border); }
.dropdown-item { color: #e5e7eb; }
.dropdown-item:hover { background-color: rgba(255,255,255,0.06); color: #fff; }

/* Bootstrap alerts */
.alert-success { --bs-alert-color: #d1fae5; --bs-alert-bg: rgba(5,150,105,0.15); --bs-alert-border-color: rgba(5,150,105,0.3); }
.alert-danger  { --bs-alert-color: #fecaca; --bs-alert-bg: rgba(239,68,68,0.15);  --bs-alert-border-color: rgba(239,68,68,0.3); }
.alert-warning { --bs-alert-color: #fef3c7; --bs-alert-bg: rgba(245,158,11,0.15); --bs-alert-border-color: rgba(245,158,11,0.3); }
.alert-info    { --bs-alert-color: #bfdbfe; --bs-alert-bg: rgba(59,130,246,0.15); --bs-alert-border-color: rgba(59,130,246,0.3); }

/* Close button */
.btn-close { filter: invert(1); }

/* ── Navbar ── */
#mainNav {
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.navbar-brand { letter-spacing: -0.5px; }
.nav-link { color: #9ca3af !important; font-size: 14px; font-weight: 500; padding: 6px 12px !important; border-radius: 8px; transition: all 0.2s; }
.nav-link:hover, .nav-link.active { color: #fff !important; background: rgba(255,255,255,0.06); }

/* ── Hero ── */
.hero-section {
  min-height: 90vh;
  background: radial-gradient(ellipse at 20% 50%, rgba(99,102,241,0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(139,92,246,0.08) 0%, transparent 50%),
              var(--bg-dark);
  padding: 80px 0;
}
.text-gradient {
  background: linear-gradient(135deg, #6366f1, #a78bfa, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.bg-primary-soft { background: rgba(99,102,241,0.12) !important; }

/* ── Glass Card ── */
.glass-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
}
.glass-card-mini {
  background: rgba(20,20,30,0.9);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

/* ── Hero Visual ── */
.hero-visual { position: relative; padding: 20px; }
.hero-visual .glass-card { max-width: 420px; margin: auto; }
.chat-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  max-width: 85%;
}
.user-bubble { background: rgba(99,102,241,0.2); color: #c4c6fd; border-radius: 12px 12px 4px 12px; margin-left: auto; text-align: right; }
.ai-bubble   { background: rgba(255,255,255,0.06); color: #d1d5db; border-radius: 4px 12px 12px 12px; }

/* ── Sections ── */
.py-6 { padding-top: 80px; padding-bottom: 80px; }
.bg-section { background: var(--bg-section); }

/* ── Category Cards ── */
.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.25s;
}
.category-card:hover {
  border-color: var(--primary);
  background: rgba(99,102,241,0.06);
  transform: translateY(-3px);
}
.cat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.cat-icon-sm {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ── Product Cards ── */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.25s;
}
.product-card:hover {
  border-color: rgba(99,102,241,0.4);
  box-shadow: 0 8px 32px rgba(99,102,241,0.12);
  transform: translateY(-4px);
}
.product-card-body { border-top: 1px solid var(--border); }

/* ── Badges ── */
.badge-hot {
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: white;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
}

/* ── Step indicator ── */
.step-circle {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #a78bfa);
  color: white;
  font-weight: 700;
  font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 0 0 8px rgba(99,102,241,0.12);
}

/* ── Pricing Cards ── */
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.pricing-card-featured {
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(139,92,246,0.06));
  border-color: rgba(99,102,241,0.4);
  margin-top: -8px;
  padding-top: 32px !important;
}
.pricing-sticky-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
}

/* ── Testimonials ── */
.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.avatar-initials {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #a78bfa);
  color: white;
  font-weight: 600;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.avatar-initials.sm { width: 32px; height: 32px; font-size: 11px; }
.avatar-initials.lg { width: 48px; height: 48px; font-size: 16px; }

.avatar-circle {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.avatar-circle-lg {
  width: 64px; height: 64px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ── Footer ── */
.footer-dark {
  background: var(--bg-section);
  border-top: 1px solid var(--border);
}
.footer-dark a:hover { color: #fff !important; }

/* ── Page Header ── */
.page-header {
  background: linear-gradient(180deg, rgba(99,102,241,0.1) 0%, transparent 100%),
              var(--bg-dark);
  border-bottom: 1px solid var(--border);
}

/* ── Marketplace Filters ── */
.filter-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.filter-link {
  display: flex;
  align-items: center;
  color: #9ca3af;
  text-decoration: none;
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 6px;
  transition: all 0.15s;
}
.filter-link:hover { color: #fff; background: rgba(255,255,255,0.05); }
.filter-link.active { color: var(--primary); background: rgba(99,102,241,0.12); font-weight: 500; }

/* ── Dashboard ── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.agent-row {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  transition: all 0.15s;
}
.agent-row:hover { border-color: rgba(99,102,241,0.3); }

/* ── Forms ── */
.form-control, .form-select {
  background: var(--bg-card2) !important;
  border-color: var(--border) !important;
  color: #e5e7eb !important;
}
.form-control::placeholder { color: #4b5563 !important; }
.form-control:focus, .form-select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15) !important;
}

/* ── Buttons ── */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  font-weight: 500;
}
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-dark), #4338ca); transform: translateY(-1px); }
.btn-outline-primary { border-color: var(--primary); color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }

/* ── Pagination ── */
.pagination .page-link {
  background: var(--bg-card);
  border-color: var(--border);
  color: #9ca3af;
}
.pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ── Misc ── */
.min-width-0 { min-width: 0; }
.tracking-wide { letter-spacing: 0.05em; }
.breadcrumb-item + .breadcrumb-item::before { color: #4b5563; }

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeInUp 0.5s ease both; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero-section { min-height: auto; padding: 60px 0; }
  .py-6 { padding-top: 50px; padding-bottom: 50px; }
  .display-4 { font-size: 2rem; }
}
