@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #004d3d;
  /* Dark Emerald from Logo */
  --primary-dark: #00362b;
  --primary-light: #f0fdf4;
  --secondary: #10b981;
  /* Mid Green */
  --accent: #86efac;
  /* Bright Green */
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --info: #3b82f6;
  --dark: #001a14;
  --slate: #1e293b;
  --muted: #64748b;
  --card: #ffffff;
  --bg: #f8fafc;
  --border: #e2e8f0;
  --white: #ffffff;
  --glass: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 77, 61, 0.1);
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
}

/* Scroll Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--primary);
    z-index: 9999;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px var(--primary);
}

/* Custom Scrollbar for the whole page */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

[data-theme="dark"] {
  --primary: #22d3ee; /* Electric Cyan */
  --primary-dark: #0891b2;
  --primary-light: rgba(34, 211, 238, 0.1);
  --secondary: #818cf8; /* Indigo Glow */
  --accent: #c084fc; /* Purple accent for complexity */
  --dark: #f8fafc;
  --slate: #94a3b8;
  --muted: #64748b;
  --card: rgba(15, 23, 42, 0.6);
  --bg: #020617; /* Absolute Deep Midnight */
  --border: rgba(255, 255, 255, 0.05);
  --white: #0f172a;
  --glass: rgba(2, 6, 23, 0.85);
  --glass-border: rgba(255, 255, 255, 0.08);
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

.dark-atmosphere {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    pointer-events: none;
    overflow: hidden;
}

[data-theme="dark"] .dark-atmosphere {
    display: block;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.15;
    animation: blobFloat 20s infinite alternate ease-in-out;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -10%;
    left: -10%;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    top: 40%;
    left: 40%;
    animation-duration: 30s;
}

@keyframes blobFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.1); }
}

[data-theme="dark"] body {
    background: #020617;
}

[data-theme="dark"] body::before {
  background: 
    radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(129, 140, 248, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 1) 0%, transparent 100%);
}

[data-theme="dark"] .floating-shape {
    opacity: 0.15;
    filter: blur(120px);
}

/* 3D Tilt Effect Utility */
.tilt-card {
  transition: transform 0.1s ease;
  transform-style: preserve-3d;
  perspective: 1000px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
  color: var(--slate);
  background: var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
}

/* --- Mesh Gradients & Shapes --- */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(16, 185, 129, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(16, 185, 129, 0.05) 0%, transparent 40%);
  z-index: -2;
  pointer-events: none;
}

.floating-shape {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.2;
  pointer-events: none;
  animation: floatShape 20s infinite alternate ease-in-out;
}

@keyframes floatShape {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(100px, 100px) scale(1.2);
  }
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* --- Layout --- */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.wrap {
  padding: 6rem 0;
}

.bg-section {
    background: var(--white);
}

[data-theme="dark"] .bg-section {
    background: transparent !important;
}

@media (max-width: 768px) {
  .wrap {
    padding: 4rem 0;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding: 3rem 0;
  }
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 1.25rem;
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.section-title p {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--muted);
  max-width: 650px;
  margin: 0 auto;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 3rem);
  max-width: 1200px;
  height: 70px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 99px;
  z-index: 2000;
  padding: 0 1.5rem 0 2rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav.scrolled {
  top: 0.75rem;
  width: calc(100% - 1.5rem);
  height: 64px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.logo img {
  height: 42px;
  width: auto;
}

.logo strong {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.04em;
  text-transform: none;
}

.menu {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  flex: 2;
  justify-content: center;
}

.menu a {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--slate);
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 0.5rem 0.5rem;
  position: relative;
}

.menu a:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

.menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.menu a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex: 1;
  justify-content: flex-end;
}

.theme-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.theme-btn:hover {
  background: var(--primary);
  color: white;
  transform: rotate(15deg);
}

.shadow-sm {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

@media (max-width: 860px) {
  .menu {
    display: none;
  }

  .nav {
    height: auto;
    min-height: 56px;
    padding: 0.5rem 0.75rem;
    width: calc(100% - 1rem);
    top: 0.5rem;
    border-radius: 16px;
  }

  .logo {
    flex: 0 0 auto;
  }

  .logo img {
    height: 28px;
  }

  .logo strong,
  .logo span {
    display: none; /* Hide logo text on mobile to save space */
  }

  .nav-actions {
    gap: 0.35rem;
    flex-wrap: nowrap;
    flex: 1;
  }

  .nav-actions .hide-mobile {
    display: none !important;
  }

  /* Hide translate button on mobile */
  .nav-actions .theme-btn:first-of-type {
    display: none !important;
  }

  .theme-btn {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }

  .btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .btn-sm {
    padding: 0.35rem 0.5rem;
    font-size: 0.65rem;
  }

  /* Profile Button specific adjustments */
  .profile-avatar-btn {
    padding: 0.35rem;
  }
  .profile-avatar-btn span:not(.avatar-circle) {
    display: none;
  }
  .profile-avatar-btn .avatar-circle {
    width: 26px;
    height: 26px;
    font-size: 0.7rem;
  }
}

@media (max-width: 400px) {
    .logo strong {
        display: none;
    }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.875rem 1.75rem;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 10px 20px -5px rgba(0, 77, 61, 0.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(0, 77, 61, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

/* Dark Mode Overrides for Buttons */
[data-theme="dark"] .btn-primary {
    background: var(--primary);
    color: #020617; /* High contrast dark text on cyan */
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.4);
    font-weight: 800;
}

[data-theme="dark"] .btn-primary:hover {
    box-shadow: 0 0 35px rgba(34, 211, 238, 0.6);
    background: #67e8f9;
}

[data-theme="dark"] .btn-outline {
    border-color: rgba(34, 211, 238, 0.3);
    color: var(--primary);
}

[data-theme="dark"] .btn-outline:hover {
    background: rgba(34, 211, 238, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  border-radius: 10px;
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 160px 0 100px;
  background:
    radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 77, 61, 0.05) 0%, transparent 40%),
    var(--bg);
  position: relative;
  overflow: hidden;
  transition: background 0.5s ease;
}

[data-theme="dark"] .hero {
    background: #020617; /* High-end Obsidian Black */
}

[data-theme="dark"] .hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(34, 211, 238, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    -webkit-mask-image: radial-gradient(circle at center, black, transparent 80%);
    mask-image: radial-gradient(circle at center, black, transparent 80%);
    pointer-events: none;
    z-index: 1;
}

.hero-flex {
  flex-direction: row; /* Back to original: Text Left, Image Right */
}

@media (max-width: 992px) {
  .hero-flex {
    flex-direction: column-reverse; /* Stack with Text on Top of Image on mobile */
    text-align: center;
    gap: 3rem !important;
  }
  
  .hero-content {
      display: flex;
      flex-direction: column;
      align-items: center;
  }
  
  .hero p {
      margin-left: auto;
      margin-right: auto;
  }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero {
        padding: 100px 0 60px;
        min-height: auto;
    }
    
    .hero h1 {
        font-size: clamp(2.5rem, 10vw, 3.5rem);
        margin-bottom: 1rem;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        gap: 1rem;
    }
    
    .hero-cta .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem;
    }

    /* Fix image overlap on mobile */
    .hero-image {
        max-width: 80%;
        margin-top: 1rem;
    }
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23004d3d' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-content {
  flex: 1.4;
  z-index: 10;
}

.hero h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 0.95;
  margin-bottom: 2rem;
  letter-spacing: -0.06em;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 10px 30px rgba(0, 77, 61, 0.1);
}

[data-theme="dark"] .hero h1 span {
    background: linear-gradient(135deg, #22d3ee 0%, #818cf8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 0 40px rgba(34, 211, 238, 0.4);
}

.hero p {
  font-size: 1.25rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 3rem;
  max-width: 600px;
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
}

/* --- Mobile Menu Styles --- */
.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--primary);
  cursor: pointer;
}

@media (max-width: 860px) {
  .mobile-toggle {
    display: block;
  }

  .menu {
    position: fixed;
    top: 75px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-150%);
    transition: transform 0.4s ease;
    display: flex;
    flex: none;
    justify-content: flex-start;
  }

  .menu.active {
    transform: translateY(0);
  }

  .nav-actions {
    display: flex;
  }
}

/* --- Features Grid Layout --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.feature-card {
  background: white;
  border: 1px solid #edf2f7;
  border-radius: 32px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  min-height: 380px;
  align-items: flex-start;
  /* Force Left Alignment */
  text-align: left;
  /* Force Left Alignment */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
  border-color: #bbf7d0;
  /* Subtle green border on hover */
}

/* Card Header: Pill and Lock */
.card-headers {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 2.5rem;
  /* More space below header */
}

.premium-badge-pill {
  background: #4f46e5;
  /* Indigo/Blue standard */
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lock-icon-circle {
  width: 32px;
  height: 32px;
  background: #1f2937;
  /* Dark Gray/Black */
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

/* Icon Box */
.feature-icon-wrapper {
  width: 64px;
  height: 64px;
  background: #dcfce7;
  /* Light Green 100 */
  color: #16a34a;
  /* Green 600 */
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

/* Text Content */
.feature-text-content {
  width: 100%;
}

.feature-text-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  /* Gray 900 */
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.feature-text-content p {
  font-size: 0.95rem;
  color: #6b7280;
  /* Gray 500 */
  line-height: 1.6;
}

@media (max-width: 1280px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}


/* --- Responsive Adjustments --- */
@media (max-width: 1200px) {
  .hero-card {
    padding: 1.5rem;
  }
}

/* --- Bento Grid Layout --- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(200px, auto);
  gap: 1.5rem;
  margin-top: 2rem;
}

.bento-large {
  grid-column: span 2;
  grid-row: span 2;
}

.bento-wide {
  grid-column: span 2;
}

.bento-tall {
  grid-row: span 2;
}

@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-large, .bento-wide {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  .bento-large, .bento-wide, .bento-tall {
    grid-column: span 1;
    grid-row: span 1;
  }
}

/* --- Glass Float Cards --- */
.glass-float-card {
  background: rgba(255, 255, 255, 0.75);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  padding: 1.25rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  width: 220px;
  z-index: 20;
  animation: floatCard 6s ease-in-out infinite;
}

.glass-card {
    background: white;
    border-radius: 32px;
    border: 1px solid var(--border);
    box-shadow: 0 40px 60px -15px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .glass-card {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: 0 40px 100px -20px rgba(0,0,0,0.8);
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0) rotate(5deg) translateZ(50px); }
  50% { transform: translateY(-15px) rotate(7deg) translateZ(60px); }
}

@keyframes progressLoad {
  from { width: 0; }
  to { width: 94%; }
}

.feature-card .premium-badge-pill {
  background: linear-gradient(135deg, #4f46e5, #818cf8);
}

.feature-card .feature-icon-wrapper {
  background: var(--primary-light);
  color: var(--primary);
}

/* --- UI Components --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-success {
  background: #dcfce7;
  color: #166534;
}

.badge-primary {
  background: var(--primary-light);
  color: var(--primary);
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s cubic-bezier(0.2, 1, 0.3, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-30px) rotate(2deg);
  }
}

/* --- Mobile Responsiveness Updates --- */
@media (max-width: 768px) {

  /* Dashboard Grid Fix */
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
    /* Hide sidebar by default on mobile for now, or make it a drawer */
  }

  /* Show a simple mobile nav if needed, or rely on the main nav */

  .main-content {
    padding: 1.5rem;
  }

  /* Admin Dashboard Stats Grid */
  .dashboard-grid main>div[style*="grid-template-columns"] {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
  }

  /* Nutritionist View Grid */
  .main-content>div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Header adjustments */
  header[style*="justify-content: space-between"] {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 1rem;
    text-align: left !important;
  }

  header[style*="justify-content: space-between"]>div:last-child {
    text-align: left !important;
    margin-top: 0.5rem;
  }
}

/* Tablet/Mobile Table Fix */
@media (max-width: 640px) {
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  /* Login Page Mobile Fix */
  .auth-card {
    padding: 1.5rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    /* Full width cards on mobile */
  }
}

/* Ensure images never overflow */
img {
  max-width: 100%;
  height: auto;
}

/* --- Animations --- */
@keyframes mic-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* Floating Logo Animation */
@keyframes floatLogo {
  0% {
    transform: translateY(0px);
    filter: drop-shadow(0 10px 20px rgba(16, 185, 129, 0.2));
  }

  50% {
    transform: translateY(-20px);
    filter: drop-shadow(0 25px 30px rgba(16, 185, 129, 0.4));
  }

  100% {
    transform: translateY(0px);
    filter: drop-shadow(0 10px 20px rgba(16, 185, 129, 0.2));
  }
}

.floating-logo {
  animation: floatLogo 4s ease-in-out infinite;
}

.mic-active {
  animation: mic-pulse 1.5s infinite;
  background: var(--danger) !important;
  color: white !important;
  border-color: var(--danger) !important;
}

/* --- Dark Mode Specific Overrides --- */
[data-theme="dark"] .menu {
  background: var(--card) !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .nav.scrolled {
  background: var(--glass) !important;
}

.bg-persona {
    background: #004d3d; /* Original Deep Emerald */
    color: white;
    border: none;
    transition: all 0.5s ease;
}

[data-theme="dark"] .bg-persona {
    background: linear-gradient(180deg, #020617 0%, rgba(15, 23, 42, 1) 100%) !important;
    color: white !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.bg-persona h2 {
    color: white;
}

[data-theme="dark"] .bg-persona h2 {
    color: white;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.bg-persona p {
    color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .bg-persona p {
    color: #cbd5e1;
}

[data-theme="dark"] .feature-card {
    background: rgba(30, 41, 59, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255,255,255,0.02);
}

[data-theme="dark"] .feature-card:hover {
    background: rgba(34, 211, 238, 0.03);
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 20px 50px -15px rgba(34, 211, 238, 0.25);
    transform: translateY(-8px) scale(1.01);
}

[data-theme="dark"] .feature-icon-wrapper {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.15), rgba(34, 211, 238, 0.05));
    color: #22d3ee;
    border: 1px solid rgba(34, 211, 238, 0.2);
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.1);
}

[data-theme="dark"] .feature-text-content h3 {
    color: #f8fafc;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .btn-primary {
    background: var(--primary);
    color: #020617 !important;
    font-weight: 800;
}

[data-theme="dark"] .nav {
    background: rgba(2, 6, 23, 0.8);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .text-glow-cyan {
    color: #22d3ee;
    text-shadow: 0 0 30px rgba(34, 211, 238, 0.6), 0 0 60px rgba(34, 211, 238, 0.2);
}

.persona-stat p {
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
}

[data-theme="dark"] .persona-stat p {
    color: #f8fafc;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: var(--bg);
  color: var(--dark);
  border-color: var(--border);
}

[data-theme="dark"] .theme-btn {
  background: var(--primary-light);
  color: var(--warning);
  border-color: var(--warning);
}

[data-theme="dark"] .menu a {
  color: var(--dark);
}

[data-theme="dark"] .badge-wellness {
    background: rgba(94, 234, 212, 0.15);
    color: #5eead4;
    border: 1px solid rgba(94, 234, 212, 0.3);
}

[data-theme="dark"] .badge-student {
    background: rgba(254, 240, 138, 0.15);
    color: #fef08a;
    border: 1px solid rgba(254, 240, 138, 0.3);
}

[data-theme="dark"] .badge-pro {
    background: rgba(167, 139, 250, 0.15);
    color: #c4b5fd;
    border: 1px solid rgba(167, 139, 250, 0.3);
}

[data-theme="dark"] .glass-float-card {
    background: rgba(17, 24, 39, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .auth-card,
[data-theme="dark"] .generator-card,
[data-theme="dark"] .pricing-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .chart-box,
[data-theme="dark"] .report-preview {
  background: var(--card);
  border-color: var(--border);
}

/* --- Team Modern Styles --- */
.team-grid-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 1.5rem;
  /* Gap lebih lega */
  flex-wrap: wrap;
  width: 100%;
}

.team-card {
  background: rgba(255, 255, 255, 0.08); /* Back to Glass on Emerald */
  border: 1px solid rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  min-width: 160px;
  max-width: 220px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[data-theme="dark"] .team-card {
    background: rgba(30, 41, 59, 0.2);
    border-color: rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.team-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .team-card:hover {
    background: rgba(34, 211, 238, 0.05);
    border-color: var(--primary);
    box-shadow: 0 20px 50px rgba(34, 211, 238, 0.1);
}

@media (max-width: 768px) {
    .team-card {
        min-width: calc(50% - 1rem);
        max-width: 100%;
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .team-card {
        min-width: 100%;
    }
}

.team-img-wrapper {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 3px solid var(--primary-light);
  background: var(--bg);
  position: relative;
  transition: all 0.3s ease;
}

[data-theme="dark"] .team-img-wrapper {
    border-color: rgba(34, 211, 238, 0.2);
}

.team-card:hover .team-img-wrapper {
  border-color: var(--primary);
  transform: scale(1.05);
}

.team-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-info h5 {
  font-size: 1.15rem;
  font-weight: 800;
  color: white;
  margin-bottom: 0.35rem;
}

[data-theme="dark"] .team-info h5 {
    color: white;
}

.team-info p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
  margin: 0;
}

[data-theme="dark"] .team-info p {
    color: rgba(255, 255, 255, 0.6);
}

.team-info p strong {
  color: white;
  font-weight: 800;
}

[data-theme="dark"] .team-info p strong {
    color: white;
}

/* Responsive Logic */
@media (max-width: 640px) {
  .team-grid-container {
    gap: 1rem;
  }

  .team-card {
    min-width: 140px;
    padding: 1.25rem;
  }

  .team-img-wrapper {
    width: 80px;
    /* Di HP masih cukup besar */
    height: 80px;
  }
}

/* --- Workflow Steps --- */
.workflow-steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-top: 4rem;
}

.step-card {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2.5rem 2rem;
  border-radius: 24px;
  text-align: center;
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[data-theme="dark"] .step-card {
    background: rgba(15, 23, 42, 0.4);
    border-color: rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 0 20px rgba(34, 211, 238, 0.02);
}

.step-card h3 {
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

[data-theme="dark"] .step-card h3 {
    color: #22d3ee;
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.3);
}

.step-card:hover {
  background: white;
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
  border-color: var(--primary);
}

[data-theme="dark"] .step-card:hover {
    background: rgba(34, 211, 238, 0.05);
    border-color: var(--primary);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.step-num {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 0.25rem 1rem;
  border-radius: 99px;
  font-weight: 800;
  font-size: 0.75rem;
}

.step-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

[data-theme="dark"] .step-icon {
    filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.4));
}

.step-connector {
  font-size: 1.5rem;
  color: var(--border);
}

@media (max-width: 1024px) {
  .workflow-steps {
    flex-direction: column;
    gap: 2rem;
  }

  .step-connector {
    display: none; /* Connectors look messy on mobile stack */
  }

  .step-card {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }
}

/* --- UI Enhancements --- */
.persona-stat {
  padding-left: 1.5rem;
  border-left: 3px solid var(--secondary);
}

[data-theme="dark"] .step-card {
  background: var(--card);
}

[data-theme="dark"] .persona-tag {
  background: var(--primary);
  color: white;
}

[data-theme="dark"] .persona-stat {
  border-color: var(--primary);
}

/* Status Pulse Animation */
.status-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  margin-right: 8px;
  position: relative;
}

.status-pulse::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #10b981;
  border-radius: 50%;
  animation: pulse-ring 1.5s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(3); opacity: 0; }
}

/* --- Chat Portal Styles --- */
.chat-message {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-message.visible {
    opacity: 1;
    transform: translateY(0);
}

.chat-bubble {
    padding: 1.25rem; 
    border-radius: 20px; 
    max-width: 85%; 
    border: 1px solid var(--border);
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.ai-bubble {
    background: white;
    border-top-left-radius: 4px;
}

.user-bubble {
    background: var(--primary-light);
    border-top-right-radius: 4px;
    border-color: var(--glass-border);
}

[data-theme="dark"] .ai-bubble {
    background: rgba(30, 41, 59, 0.4);
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

[data-theme="dark"] .user-bubble {
    background: rgba(34, 211, 238, 0.05);
    border-color: rgba(34, 211, 238, 0.2);
    color: white;
}

.bubble-name {
    font-size: 0.8125rem; 
    font-weight: 800; 
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ai-bubble .bubble-name { color: var(--primary); }
.user-bubble .bubble-name { color: var(--slate); }

.medical-disclaimer-tag {
    font-size: 0.65rem; 
    background: var(--primary); 
    color: white; 
    padding: 2px 8px; 
    border-radius: 4px; 
    display: inline-block; 
    margin-bottom: 0.75rem;
    font-weight: 800;
}

[data-theme="dark"] .medical-disclaimer-tag {
    background: #0891b2;
    box-shadow: 0 0 10px rgba(8, 145, 178, 0.3);
}

/* Typing Indicator Dots */
.typing-bubble {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 1rem 1.5rem;
}

.typing-bubble .dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: blink 1.4s infinite;
}

.typing-bubble .dot:nth-child(2) { animation-delay: 0.2s; }
.typing-bubble .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.1); }
}

.chat-avatar {
    width: 44px; 
    height: 44px; 
    background: var(--primary); 
    color: white; 
    border-radius: 14px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    flex-shrink: 0; 
    box-shadow: 0 8px 15px rgba(0, 77, 61, 0.2);
    font-size: 1.25rem;
}

[data-theme="dark"] .chat-avatar {
    background: #0891b2;
    box-shadow: 0 0 20px rgba(8, 145, 178, 0.4);
}

.chat-input-area {
    padding: 1.5rem 2.5rem 2.5rem; 
    display: flex; 
    gap: 1rem; 
    align-items: center; 
    background: white; 
    border-top: 1px solid var(--border);
}

[data-theme="dark"] .chat-input-area {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(255, 255, 255, 0.05);
}

/* Custom Scrollbar for Chat */
#chat-messages::-webkit-scrollbar {
  width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

#chat-messages::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

[data-theme="dark"] #chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

/* Floating Chat Button */
.floating-chat-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 15px 30px -5px rgba(0, 77, 61, 0.4);
  z-index: 999;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-chat-btn:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 20px 40px -5px rgba(0, 77, 61, 0.5);
}

.chat-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 99px;
  border: 2px solid white;
}

@media (max-width: 768px) {
  .floating-chat-btn {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 56px;
    height: 56px;
    font-size: 1.25rem;
  }
  
  #chat-container {
      height: 500px;
      margin: 0 1rem;
  }
  
  .chat-input-area {
      padding: 1rem 1.5rem 1.5rem;
  }
  
  .chat-bubble {
      max-width: 90%;
      padding: 1rem;
  }
  
  .chat-avatar {
      width: 36px;
      height: 36px;
      font-size: 1rem;
  }
}

@media (max-width: 480px) {
    .section-title {
        margin-bottom: 2.5rem;
    }
    
    .persona-stat {
        width: 100%;
        text-align: center;
        border-left: none;
        border-bottom: 2px solid var(--secondary);
        padding-left: 0;
        padding-bottom: 1rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
}