@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-color: #030712;
  --bg-card: #0b1329;
  --bg-card-hover: #111a36;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-glow: rgba(59, 130, 246, 0.15);
  --border-color: rgba(255, 255, 255, 0.08);
  --font-family-sans: 'Inter', sans-serif;
  --font-family-heading: 'Outfit', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --loader-fill-color: rgba(243, 244, 246, 0.95);
}

/* Global Reset & Base */
body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-family-sans);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: #1f2937;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #374151;
}

/* Dot Field Background */
#dot-field-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

.gradient-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 30%, rgba(59, 130, 246, 0.05) 0%, transparent 60%),
              radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
  z-index: -1;
  pointer-events: none;
}

/* Glowing Navbar */
.navbar-custom {
  background: rgba(3, 7, 18, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  transition: var(--transition-smooth);
}

.navbar-custom.scrolled {
  padding: 0.7rem 0;
  background: rgba(3, 7, 18, 0.9);
}

.navbar-brand {
  font-family: var(--font-family-heading);
  font-weight: 800;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #fff 30%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.navbar-brand span {
  color: var(--accent-purple);
  -webkit-text-fill-color: initial;
}

.nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  transition: var(--transition-smooth);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary) !important;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  transition: var(--transition-smooth);
  transform: translateX(-50%);
}

.nav-link.active::after, .nav-link:hover::after {
  width: 80%;
}

/* Buttons */
.btn-primary-custom {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: #fff;
  border: none;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
  color: #fff;
}

.btn-secondary-custom {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.btn-secondary-custom:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateY(-2px);
}

/* Glassmorphism Sections */
.glass-panel {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 3rem;
  margin-bottom: 2rem;
}

/* Border Glow Cards (Reactbits inspired) */
.border-glow-card {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 1px;
  overflow: hidden;
  height: 100%;
  transition: var(--transition-smooth);
}

.border-glow-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  background: radial-gradient(
    300px circle at var(--mouse-x, 0px) var(--mouse-y, 0px),
    rgba(59, 130, 246, 0.5),
    transparent 50%
  );
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.border-glow-card:hover::before {
  opacity: 1;
}

.border-glow-card-inner {
  position: relative;
  background: var(--bg-card);
  border-radius: 15px;
  padding: 2.2rem 2rem;
  height: 100%;
  z-index: 2;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.border-glow-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.border-glow-card:hover .border-glow-card-inner {
  background: var(--bg-card-hover);
}

.border-glow-card .card-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-blue);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  transition: var(--transition-smooth);
}

.border-glow-card:hover .card-icon {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: #fff;
  transform: scale(1.1);
}

/* Hero Section */
.hero-section {
  padding: 10rem 0 7rem 0;
  position: relative;
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #ffffff 40%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
}

.typewriter-text {
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  border-right: 3px solid var(--accent-blue);
  white-space: nowrap;
  animation: blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--accent-blue); }
}

/* Feature Badge */
.feature-badge {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  border-radius: 30px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-blue);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Technology Grid */
.tech-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition-smooth);
}

.tech-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-blue);
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.tech-item i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

/* Team Profile Cards */
.team-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

.team-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-purple);
  box-shadow: 0 12px 30px rgba(139, 92, 246, 0.2);
}

.team-img-wrapper {
  position: relative;
  height: 250px;
  width: 100%;
  overflow: hidden;
}

.team-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-socials {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 7, 18, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-smooth);
  gap: 1rem;
}

.team-card:hover .team-socials {
  opacity: 1;
}

.team-socials a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.team-socials a:hover {
  background: var(--accent-blue);
  transform: scale(1.1);
}

.team-info {
  padding: 1.5rem;
  text-align: center;
}

.team-name {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.team-role {
  color: var(--accent-blue);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Form Styles */
.form-custom .form-control {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.form-custom .form-control:focus {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-blue);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
  color: #fff;
}

.form-custom label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

/* Testimonial Cards */
.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem;
  position: relative;
  transition: var(--transition-smooth);
}

.testimonial-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-5px);
}

.quote-icon {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 3rem;
  color: rgba(59, 130, 246, 0.08);
  pointer-events: none;
}

.stars {
  color: #f59e0b;
  margin-bottom: 1rem;
}

.client-profile {
  display: flex;
  align-items: center;
  margin-top: 1.5rem;
  gap: 1rem;
}

.client-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

/* Footer styling */
.footer-custom {
  background: rgba(3, 7, 18, 0.95);
  border-top: 1px solid var(--border-color);
  padding: 5rem 0 2rem 0;
  margin-top: 5rem;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-smooth);
  display: inline-block;
  margin-bottom: 0.75rem;
}

.footer-link:hover {
  color: var(--text-primary);
  transform: translateX(3px);
}

.social-icons-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  margin-right: 0.75rem;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.social-icons-footer a:hover {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: #fff;
  transform: translateY(-3px);
}

/* Page Header component */
.page-header {
  padding: 8rem 0 4rem 0;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.03) 0%, transparent 100%);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.page-header h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

/* Career Jobs list */
.career-job-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: var(--transition-smooth);
}

.career-job-card:hover {
  border-color: var(--accent-blue);
  transform: translateX(5px);
}

.job-meta span {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-right: 0.75rem;
}

/* Client Ticker (Left to Right) */
.client-ticker-wrapper {
  overflow: hidden;
  width: 100%;
  padding: 1.5rem 0;
  background: rgba(255, 255, 255, 0.01);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-top: 2rem;
}

.client-ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-slide-ltr 25s linear infinite;
  gap: 4rem;
}

.client-ticker-item {
  color: var(--text-secondary);
  font-family: var(--font-family-heading);
  font-weight: 600;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  white-space: nowrap;
}

.client-ticker-item i {
  color: var(--accent-blue);
  font-size: 1.4rem;
}

@keyframes ticker-slide-ltr {
  0% {
    transform: translate3d(-50%, 0, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

/* Preloader styles */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  text-align: center;
}

.loader-logo {
  font-family: var(--font-family-heading);
  font-weight: 800;
  font-size: 2.5rem;
  background: linear-gradient(135deg, #fff 30%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  animation: logo-glow 1.5s ease-in-out infinite alternate;
}

.loader-logo span {
  color: var(--accent-purple);
  -webkit-text-fill-color: initial;
}

.loader-bar {
  width: 160px;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

.loader-progress {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  transition: width 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.loader-percentage {
  font-family: var(--font-family-heading);
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

@keyframes logo-glow {
  from {
    filter: drop-shadow(0 0 2px rgba(59, 130, 246, 0.3));
  }
  to {
    filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.8));
  }
}

/* Treefrog Loader CSS (Animated Text drawing HYBRID ENGINEER) */
.treefrog-absolute {
  position: absolute;
}

.treefrog-loader {
  display: flex;
  flex-direction: column;
  margin: 0 auto 1rem auto;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.treefrog-text-svg {
  width: 100%;
  max-width: 480px;
  height: auto;
  margin: 1.5rem auto;
  overflow: visible;
}

.treefrog-text-path {
  font-family: var(--font-family-heading);
  font-weight: 800;
  font-size: 34px;
  letter-spacing: 0.12em;
  stroke-width: 1.5px;
  fill: none;
  stroke: url(#treefrog-text-grad);
  stroke-dasharray: 500;
  stroke-dashoffset: 500;
  animation: treefrog-text-draw 3.2s ease-in-out infinite alternate;
}

@keyframes treefrog-text-draw {
  0% {
    stroke-dashoffset: 500;
    fill: rgba(255, 255, 255, 0);
  }
  60% {
    stroke-dashoffset: 0;
    fill: rgba(255, 255, 255, 0);
  }
  100% {
    stroke-dashoffset: 0;
    fill: var(--loader-fill-color);
  }
}

/* Custom Cursor styling */
.custom-cursor-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent-blue);
  border-radius: 50%;
  position: fixed;
  top: -3px;
  left: -3px;
  pointer-events: none;
  z-index: 10000;
  transition: width 0.2s, height 0.2s, top 0.2s, left 0.2s, background-color 0.2s;
  display: none; /* Hidden on touch devices */
}

.custom-cursor-ring {
  width: 32px;
  height: 32px;
  border: 1.5px solid rgba(59, 130, 246, 0.4); /* var(--accent-blue) with opacity */
  border-radius: 50%;
  position: fixed;
  top: -16px;
  left: -16px;
  pointer-events: none;
  z-index: 9999;
  transition: width 0.3s, height 0.3s, top 0.3s, left 0.3s, border-color 0.3s, background-color 0.3s;
  display: none; /* Hidden on touch devices */
}

/* Custom Cursor Hover States */
.custom-cursor-dot.hover {
  width: 4px;
  height: 4px;
  top: -2px;
  left: -2px;
  background-color: var(--accent-purple);
}

.custom-cursor-ring.hover {
  width: 48px;
  height: 48px;
  top: -24px;
  left: -24px;
  border-color: var(--accent-purple);
  background-color: rgba(139, 92, 246, 0.05); /* var(--accent-purple) transparent glow */
}

/* Enable custom cursor styles only on devices with hover/mouse capabilities */
@media (pointer: fine) {
  html, body {
    cursor: none;
  }
  
  /* Hide cursor for interactive items */
  a, button, .btn, [role="button"], input, select, textarea, .form-control, .navbar-toggler {
    cursor: none !important;
  }
  
  .custom-cursor-dot, .custom-cursor-ring {
    display: block;
  }
}

/* Light Theme Variables and Overrides */
.light-theme {
  --bg-color: #f9fafb;
  --bg-card: #ffffff;
  --bg-card-hover: #f3f4f6;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --border-color: rgba(0, 0, 0, 0.08);
  --accent-glow: rgba(59, 130, 246, 0.06);
  --loader-fill-color: rgba(17, 24, 39, 0.95);
}

/* Global Light Theme Utility & Bootstrap Overrides */
.light-theme .text-white {
  color: var(--text-primary) !important;
}

.light-theme .text-white-50 {
  color: var(--text-secondary) !important;
}

.light-theme .text-light {
  color: var(--text-secondary) !important;
}

.light-theme .badge.bg-primary {
  color: #ffffff !important;
}

.light-theme .btn-primary-custom {
  color: #ffffff !important;
}

.light-theme .border-secondary {
  border-color: var(--border-color) !important;
}

.light-theme .bg-black {
  background-color: #f3f4f6 !important;
}

.light-theme .bg-dark {
  background-color: #f3f4f6 !important;
}

/* For sections with bg-black and opacity classes, e.g. bg-opacity-20, bg-opacity-15 */
.light-theme .bg-black.bg-opacity-20,
.light-theme .bg-black.bg-opacity-15,
.light-theme .bg-black.bg-opacity-10 {
  background-color: #f3f4f6 !important;
}

/* Disable map inversion in light theme */
.light-theme .dark-map {
  filter: none !important;
}

/* Custom Scrollbar for Light Theme */
.light-theme::-webkit-scrollbar-thumb {
  background: #d1d5db;
}

.light-theme::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Light Theme Component Overrides */
.light-theme .navbar-custom {
  background: rgba(249, 250, 251, 0.8);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.light-theme .navbar-custom.scrolled {
  background: rgba(249, 250, 251, 0.95);
}

.light-theme .navbar-brand {
  background: linear-gradient(135deg, #111827 30%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.light-theme .nav-link {
  color: #4b5563 !important;
}

.light-theme .nav-link:hover, 
.light-theme .nav-link.active {
  color: #111827 !important;
}

.light-theme .navbar-toggler-icon {
  filter: invert(1);
}

.light-theme .hero-title {
  background: linear-gradient(135deg, #111827 40%, #4b5563 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.light-theme .glass-panel {
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.04);
}

.light-theme .btn-secondary-custom {
  background: rgba(0, 0, 0, 0.03);
  color: #111827;
  border-color: rgba(0, 0, 0, 0.08);
}

.light-theme .btn-secondary-custom:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #000;
}

.light-theme .form-custom .form-control {
  background: rgba(0, 0, 0, 0.02);
  color: #111827;
}

.light-theme .form-custom .form-control:focus {
  background: rgba(255, 255, 255, 1);
  color: #111827;
}

.light-theme .form-custom label {
  color: #111827;
}

.light-theme .footer-custom {
  background: #f3f4f6;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.light-theme .footer-link {
  color: #4b5563;
}

.light-theme .footer-link:hover {
  color: #111827;
}

.light-theme .social-icons-footer a {
  background: rgba(0, 0, 0, 0.03);
  color: #4b5563;
}

.light-theme .social-icons-footer a:hover {
  color: #fff;
}

.light-theme .team-name {
  color: #111827;
}

.light-theme .team-card {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.light-theme .career-job-card {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.light-theme .testimonial-card {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.light-theme .client-ticker-wrapper {
  background: rgba(0, 0, 0, 0.01);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.light-theme .tech-item {
  background: rgba(0, 0, 0, 0.01);
  border-color: rgba(0, 0, 0, 0.06);
}

.light-theme .tech-item:hover {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.08);
}

.light-theme #preloader {
  background-color: #f9fafb;
}

.light-theme .loader-percentage {
  color: #4b5563;
}

.light-theme .page-header {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.02) 0%, transparent 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.light-theme .border-glow-card-inner {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.03);
}

/* Premium Theme Toggle Switch */
.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  width: 56px;
  height: 28px;
  position: relative;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.theme-toggle-btn::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1;
  /* Default is dark theme, so thumb is on the right */
  transform: translateX(28px);
}

.light-theme .theme-toggle-btn::before {
  /* Light theme: thumb is on the left */
  transform: translateX(0);
}

.theme-toggle-btn i {
  position: absolute;
  top: 1px;
  font-size: 0.9rem;
  z-index: 2;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease, color 0.3s ease;
}

/* Sun icon (left) */
.theme-toggle-btn .bi-sun-fill {
  left: 1px;
  color: var(--text-secondary);
  opacity: 0.6;
  transform: rotate(-30deg);
}

/* Moon icon (right) */
.theme-toggle-btn .bi-moon-fill {
  right: 1px;
  color: #fff;
  opacity: 1;
  transform: rotate(0deg);
}

/* Active states (rotations and opacities) */
.light-theme .theme-toggle-btn {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

.light-theme .theme-toggle-btn .bi-sun-fill {
  color: #fff;
  opacity: 1;
  transform: rotate(0deg);
}

.light-theme .theme-toggle-btn .bi-moon-fill {
  color: var(--text-secondary);
  opacity: 0.6;
  transform: rotate(30deg);
}

/* Hover effects for toggle btn */
.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.25);
}

.light-theme .theme-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   Chatbot Floating Widget
   ========================================================================== */
.chatbot-container {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 999;
  font-family: var(--font-family-sans);
}

/* Floating Action Button (FAB) */
.chatbot-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
  position: relative;
}

.chatbot-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 25px rgba(59, 130, 246, 0.6);
}

.chatbot-fab i {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.chatbot-fab.active i {
  transform: rotate(90deg);
}

/* Notification Badge on FAB */
.chatbot-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  background-color: #ef4444;
  border-radius: 50%;
  border: 2px solid var(--bg-color);
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Chat Window */
.chatbot-window {
  width: 360px;
  height: 480px;
  background: rgba(11, 19, 41, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  position: absolute;
  bottom: 70px;
  right: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(20px) scale(0.9);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
}

.chatbot-window.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* Header */
.chatbot-header {
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chatbot-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chatbot-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.chatbot-title h4 {
  font-size: 0.95rem;
  margin: 0;
  font-weight: 600;
}

.chatbot-status {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.chatbot-status::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: #10b981;
  border-radius: 50%;
}

.chatbot-close {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1.2rem;
  opacity: 0.8;
  padding: 0;
  display: flex;
  align-items: center;
  transition: opacity 0.2s;
}

.chatbot-close:hover {
  opacity: 1;
}

/* Messages body */
.chatbot-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scrollbar-width: thin;
}

.chatbot-body::-webkit-scrollbar {
  width: 4px;
}
.chatbot-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

/* Messages styling */
.chatbot-msg-row {
  display: flex;
  width: 100%;
}

.chatbot-msg-row.bot {
  justify-content: flex-start;
}

.chatbot-msg-row.user {
  justify-content: flex-end;
}

.chatbot-msg {
  max-width: 80%;
  padding: 0.75rem 1rem;
  border-radius: 16px;
  font-size: 0.85rem;
  line-height: 1.4;
  animation: bubble-fade 0.3s ease forwards;
  word-break: break-word;
}

@keyframes bubble-fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.chatbot-msg-row.bot .chatbot-msg {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.chatbot-msg-row.user .chatbot-msg {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* Quick reply chips */
.chatbot-quick-container {
  padding: 0 1.25rem 0.75rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chatbot-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.chatbot-chip:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--accent-blue);
  color: #fff;
  transform: translateY(-1px);
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background-color: var(--text-secondary);
  border-radius: 50%;
  animation: typing-bounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Input footer */
.chatbot-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border-color);
  background: rgba(3, 7, 18, 0.4);
}

.chatbot-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.chatbot-input {
  flex-grow: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem 0.9rem;
  border-radius: 20px;
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition-smooth);
}

.chatbot-input:focus {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-blue);
}

.chatbot-send {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: #fff;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
  padding: 0;
}

.chatbot-send:hover {
  transform: scale(1.08);
}

.chatbot-send i {
  font-size: 0.95rem;
  margin-left: 2px;
}

/* ==========================================================================
   Chatbot Light Theme Overrides
   ========================================================================== */
.light-theme .chatbot-window {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.light-theme .chatbot-msg-row.bot .chatbot-msg {
  background: #f3f4f6;
  border-color: rgba(0, 0, 0, 0.05);
  color: #111827 !important;
}

.light-theme .chatbot-chip {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
  color: #4b5563;
}

.light-theme .chatbot-chip:hover {
  background: rgba(59, 130, 246, 0.08);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.light-theme .chatbot-footer {
  border-top-color: rgba(0, 0, 0, 0.06);
  background: rgba(249, 250, 251, 0.8);
}

.light-theme .chatbot-input {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
  color: #111827;
}

.light-theme .chatbot-input:focus {
  background: #fff;
  border-color: var(--accent-blue);
}

.light-theme .chatbot-fab {
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.25);
}

.light-theme .chatbot-badge {
  border-color: #f9fafb;
}

.light-theme .chatbot-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
}

/* Responsive adjustment */
@media (max-width: 480px) {
  .chatbot-container {
    bottom: 15px;
    right: 15px;
  }
  .chatbot-window {
    width: calc(100vw - 30px);
    height: 420px;
    bottom: 65px;
  }
}



