:root {
  /* Light mode colors - High contrast */
  --background: #ffffff;
  --foreground: #1a1a1a;
  --card: #ffffff;
  --card-foreground: #1a1a1a;
  --popover: #ffffff;
  --popover-foreground: #1a1a1a;
  --primary: #0066cc;
  --primary-foreground: #ffffff;
  --secondary: #0088cc;
  --secondary-foreground: #ffffff;
  --muted: #f8f9fa;
  --muted-foreground: #4a5568;
  --accent: #f1f5f9;
  --accent-foreground: #1a1a1a;
  --destructive: #dc2626;
  --destructive-foreground: #ffffff;
  --border: #d1d5db;
  --input: #d1d5db;
  --ring: #0066cc;
  --radius: 0.5rem;
  --hero-overlay: rgba(0, 34, 68, 0.95);
}

.dark {
  /* Dark mode colors - High contrast */
  --background: #0a0a0a;
  --foreground: #f5f5f5;
  --card: #1a1a1a;
  --card-foreground: #f5f5f5;
  --popover: #1a1a1a;
  --popover-foreground: #f5f5f5;
  --primary: #3b82f6;
  --primary-foreground: #ffffff;
  --secondary: #06b6d4;
  --secondary-foreground: #ffffff;
  --muted: #262626;
  --muted-foreground: #a3a3a3;
  --accent: #404040;
  --accent-foreground: #f5f5f5;
  --destructive: #ef4444;
  --destructive-foreground: #ffffff;
  --border: #525252;
  --input: #525252;
  --ring: #3b82f6;
  --hero-overlay: rgba(15, 23, 42, 0.95);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  transition: all 0.3s ease;
}

.font-inter {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

.hidden {
  display: none !important;
}

/* Industry card styles */
.industry-card {
  background: var(--card);
  border: 2px solid var(--border);
  color: var(--card-foreground);
  border-radius: 0.75rem;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.industry-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--primary);
}

.industry-card.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 0 0 3px rgba(var(--primary), 0.3);
}

.dark .industry-card {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.dark .industry-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* Complete Dark Mode Implementation */
html.dark,
html.dark body {
  background-color: var(--background) !important;
  color: var(--foreground) !important;
}

/* Header dark mode */
html.dark header {
  background-color: var(--background) !important;
  border-bottom-color: var(--border) !important;
  backdrop-filter: blur(10px);
}

/* Main sections dark mode */
html.dark main,
html.dark section:not(.hero) {
  background-color: var(--background) !important;
  color: var(--foreground) !important;
}

/* Industry cards dark mode */
html.dark .industry-card {
  background-color: var(--card) !important;
  color: var(--card-foreground) !important;
  border: 1px solid var(--border) !important;
}

html.dark .industry-card:hover {
  background-color: var(--accent) !important;
  border-color: var(--accent-foreground) !important;
}

/* Search section dark mode */
html.dark .search-section {
  background-color: var(--background) !important;
}

html.dark .search-section input {
  background-color: var(--card) !important;
  border-color: var(--border) !important;
  color: var(--foreground) !important;
}

/* Footer dark mode */
html.dark footer {
  background-color: var(--background) !important;
  border-top-color: var(--border) !important;
  color: var(--foreground) !important;
}

/* Text colors dark mode */
html.dark .text-muted-foreground {
  color: var(--muted-foreground) !important;
}

html.dark h1, html.dark h2, html.dark h3, html.dark h4, html.dark h5, html.dark h6 {
  color: var(--foreground) !important;
}

html.dark p {
  color: var(--foreground) !important;
}

/* Button dark mode */
html.dark .btn:not(.ai-button) {
  background-color: var(--primary) !important;
  color: var(--primary-foreground) !important;
}

html.dark .btn-secondary {
  background-color: var(--secondary) !important;
  color: var(--secondary-foreground) !important;
}

html.dark .btn-ghost {
  background-color: transparent !important;
  color: var(--foreground) !important;
  border-color: var(--border) !important;
}

/* Borders dark mode */
html.dark .border,
html.dark .border-t,
html.dark .border-b,
html.dark .border-l,
html.dark .border-r {
  border-color: var(--border) !important;
}

/* Force dark mode on all containers */
html.dark .container,
html.dark .grid,
html.dark .flex {
  background-color: inherit !important;
  color: inherit !important;
}

/* Input field dark mode */
html.dark input[type="text"],
html.dark input[type="search"] {
  background-color: var(--card) !important;
  border-color: var(--border) !important;
  color: var(--foreground) !important;
}

html.dark input[type="text"]::placeholder,
html.dark input[type="search"]::placeholder {
  color: var(--muted-foreground) !important;
}

/* Ensure all backgrounds are dark */
html.dark * {
  background-color: inherit;
  color: inherit;
}

html.dark .bg-white {
  background-color: var(--card) !important;
}

html.dark .bg-gray-50 {
  background-color: var(--background) !important;
}

html.dark .bg-gray-100 {
  background-color: var(--card) !important;
}

/* Hero button enhancements */
.hero .btn {
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
}

.hero .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

/* Chat flotante styles */
#chat-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

#chat-button {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #00d4aa, #00a3ff);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

#chat-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

#chat-button img {
  width: 35px;
  height: 35px;
}

#chat-iframe-container {
  position: fixed;
  bottom: -520px;
  right: 20px;
  width: 380px;
  height: 520px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 5px 40px rgba(0, 0, 0, 0.15);
  transition: bottom 0.4s ease;
  z-index: 999;
  overflow: hidden;
}

#chat-iframe-container.active {
  bottom: 90px;
}

#chat-header {
  background: linear-gradient(135deg, #00d4aa, #00a3ff);
  color: white;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#chat-controls {
  display: flex;
  gap: 10px;
}

.chat-control {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.chat-control:hover {
  background: rgba(255, 255, 255, 0.3);
}

#chat-iframe {
  width: 100%;
  height: calc(100% - 60px);
  border: none;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  @apply bg-muted;
}

::-webkit-scrollbar-thumb {
  @apply bg-muted-foreground/20 rounded-full;
}

::-webkit-scrollbar-thumb:hover {
  @apply bg-muted-foreground/40;
}

/* Table hover effects */
tbody tr:hover {
  @apply bg-muted/50;
}

/* Solution card hover effects */
.solution-card {
  @apply transition-all duration-300 ease-in-out;
}

.solution-card:hover {
  @apply shadow-xl;
}

/* Button focus states */
button:focus-visible,
a:focus-visible {
  @apply outline-none ring-2 ring-ring ring-offset-2;
}

/* Loading states */
.loading {
  @apply opacity-50 pointer-events-none;
}

/* AI Button Special Styling */
.ai-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  color: white !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
  position: relative !important;
  overflow: hidden !important;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
}

.ai-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.ai-button:hover::before {
  left: 100%;
}

.ai-button:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

.ai-button img {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* Custom button styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  background: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
}

.btn-secondary:hover {
  background: #0891b2;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--accent);
}

/* Hero section styling - FORCED DARK BACKGROUND */
section.hero,
.hero,
section[class*="hero"] {
  background: #001122 !important;
  background-color: #001122 !important;
  background-image: linear-gradient(135deg, #001122 0%, #002244 50%, #001122 100%) !important;
  color: white !important;
  text-shadow: 0 4px 8px rgba(0,0,0,0.9) !important;
  min-height: 500px !important;
}

.hero h1,
section.hero h1,
.hero .hero-title {
  font-size: 3.5rem !important;
  font-weight: 700 !important;
  margin-bottom: 1rem !important;
  color: white !important;
  text-shadow: 
    2px 2px 0px #000000,
    -2px -2px 0px #000000,
    2px -2px 0px #000000,
    -2px 2px 0px #000000,
    0 4px 8px rgba(0,0,0,0.9) !important;
  -webkit-text-stroke: 2px #000000 !important;
  text-stroke: 2px #000000 !important;
}

.hero p,
section.hero p,
.hero .hero-description {
  font-size: 1.25rem !important;
  opacity: 1 !important;
  margin-bottom: 2rem !important;
  color: white !important;
  text-shadow: 
    1px 1px 0px #000000,
    -1px -1px 0px #000000,
    1px -1px 0px #000000,
    -1px 1px 0px #000000,
    0 3px 6px rgba(0,0,0,0.9) !important;
  -webkit-text-stroke: 1px #000000 !important;
  text-stroke: 1px #000000 !important;
}

/* Enhanced contrast for text elements */
.text-muted-foreground {
  color: var(--muted-foreground) !important;
  opacity: 0.9;
}

.dark .text-muted-foreground {
  color: var(--muted-foreground) !important;
  opacity: 1;
}

/* Enhanced button contrast */
.btn-ghost {
  background: transparent;
  color: var(--foreground);
  border: 2px solid var(--border);
}

.btn-ghost:hover {
  background: var(--accent);
  border-color: var(--primary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #chat-iframe-container {
    width: calc(100vw - 40px);
    left: 20px;
    right: 20px;
  }
  
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
}