/* Base Styles */
:root {
  --background: #000000;
  --foreground: #ffffff;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-foreground: #ffffff;
  --secondary: #1e293b;
  --secondary-hover: #334155;
  --secondary-foreground: #ffffff;
  --muted: #334155;
  --muted-foreground: #94a3b8;
  --accent: #1e293b;
  --accent-foreground: #ffffff;
  --destructive: #ef4444;
  --destructive-foreground: #ffffff;
  --border: #1e293b;
  --input: #1e293b;
  --ring: #3b82f6;
  --radius: 0.5rem;
  --blue-900: #1e3a8a;
  --blue-800: #1e40af;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --blue-300: #93c5fd;
  --blue-200: #bfdbfe;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

.text-blue {
  color: var(--blue-500);
}

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

.w-full {
  width: 100%;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  /* Sharper corners for technical feel */
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
  /* Tech font */
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 0.9rem;
  /* Slightly smaller for precision */
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
}

.btn-primary {
  background-color: var(--blue-600);
  color: var(--primary-foreground);
  border: 1px solid var(--blue-500);
  /* Technical border */
}

.btn-primary:hover {
  background-color: var(--blue-700);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
  /* Glow effect */
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--blue-600);
  color: var(--blue-400);
}

.btn-outline:hover {
  background-color: rgba(59, 130, 246, 0.1);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

.btn-full {
  width: 100%;
}

.btn-arrow {
  margin-left: 0.5rem;
  opacity: 0;
  transform: translateX(-5px);
  transition: all 0.3s ease;
}

.btn-primary:hover .btn-arrow {
  opacity: 1;
  transform: translateX(0);
}

.btn-send {
  position: relative;
  overflow: hidden;
}

.btn-send::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, var(--blue-600), var(--blue-400));
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: -1;
}

.btn-send:hover::before {
  transform: translateY(0);
}

.btn-send i {
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}

.btn-send:hover i {
  transform: translateX(3px);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: all 0.3s ease;
  padding: 0.5rem 0;
  margin-bottom: 2rem;
  background-color: rgba(0, 0, 0, 0.8);
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
  /* Subtle tech line */
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1.5rem;
  border-left: 1px solid rgba(59, 130, 246, 0.2);
  padding-left: 1.5rem;
}

.lang-btn {
  background: transparent;
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #64748b;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-btn.active {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--blue-500);
  color: var(--blue-400);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

.lang-btn:hover:not(.active) {
  border-color: var(--blue-400);
  color: #fff;
}

.header.scrolled {
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  padding: 0.5rem 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  /* Tech font */
  letter-spacing: -1px;
}

.desktop-nav {
  display: none;
}

.nav-link {
  margin-left: 2rem;
  color: #94a3b8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--blue-400);
}

.mobile-menu-btn {
  background: none;
  border: none;
  color: #d1d5db;
  font-size: 1.5rem;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding-top: 1.25rem;
  padding-bottom: 0.75rem;
  gap: 1rem;
}

.mobile-nav.active {
  display: flex;
}

@media (min-width: 768px) {
  .desktop-nav {
    display: flex;
    align-items: center;
  }

  .mobile-menu-btn {
    display: none;
  }
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  padding-top: 5rem;
  overflow: hidden;
}

.gradient-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, rgba(15, 23, 42, 1), rgba(0, 0, 0, 1));
  /* Darker, cleaner bg */
  z-index: 0;
}

.particles-container {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.particle {
  position: absolute;
  background-color: rgba(59, 130, 246, 0.3);
  border-radius: 50%;
  animation: particle-float 15s infinite linear;
}

@keyframes particle-float {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }

  25% {
    opacity: 0.5;
  }

  50% {
    transform: translateY(-100px) translateX(50px);
    opacity: 0.8;
  }

  75% {
    opacity: 0.5;
  }

  100% {
    transform: translateY(-200px) translateX(0);
    opacity: 0;
  }
}

.network-lines {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  z-index: 0;
}

.network-line {
  position: absolute;
  height: 1px;
  background: rgba(59, 130, 246, 0.3);
}

.hero-content {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  padding: 5rem 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: transparent;
  /* Wireframe */
  border: 1px solid rgba(59, 130, 246, 0.4);
  /* Technical border */
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--blue-400);
}

.badge-dot {
  height: 0.4rem;
  width: 0.4rem;
  border-radius: 50%;
  background-color: var(--blue-500);
  box-shadow: 0 0 5px var(--blue-500);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.hero-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
  line-height: 1.2;
  text-transform: uppercase;
}

.hero-description {
  font-family: 'JetBrains Mono', monospace;
  /* Console style */
  font-size: 0.9rem;
  color: #94a3b8;
  max-width: 38rem;
  margin-bottom: 2.5rem;
  line-height: 1.7;
  border-left: 2px solid var(--blue-500);
  /* Data block styling */
  padding-left: 1rem;
}

.feature-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.feature-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background-color: transparent;
  padding: 0;
  /* Remove padding to look less like a box */
  border: none;
  border-radius: 0;
  transition: all 0.3s ease;
  position: relative;
}

.feature-card::before {
  content: '';
  position: absolute;
  left: -1rem;
  top: 0.25rem;
  bottom: 0.25rem;
  width: 1px;
  background: rgba(59, 130, 246, 0.3);
}

.feature-card:hover::before {
  background: var(--blue-500);
  box-shadow: 0 0 10px var(--blue-500);
}

.feature-card:hover {
  background: transparent;
  transform: translateX(5px);
  border: none;
}

.feature-card i {
  font-size: 1.25rem;
  margin-top: 0.1rem;
  color: var(--blue-500);
}

.feature-card h3 {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: #fff;
  text-transform: uppercase;
}

.feature-card p {
  font-size: 0.85rem;
  color: #94a3b8;
  font-family: 'Inter', sans-serif;
}

.hero-buttons {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  margin-top: 1rem;
}

.hero-visual {
  position: relative;
  height: 400px;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

.ai-head-container {
  width: 300px;
  height: 400px;
  position: relative;
  margin: 0 auto;
}

.ai-head {
  position: absolute;
  width: 200px;
  height: 250px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.2));
  border-radius: 100px 100px 70px 70px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  overflow: hidden;
  animation: head-pulse 4s infinite ease-in-out;
}

@keyframes head-pulse {

  0%,
  100% {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
  }

  50% {
    box-shadow: 0 0 50px rgba(59, 130, 246, 0.5);
  }
}

.ai-face {
  position: relative;
  width: 100%;
  height: 100%;
}

.ai-eye {
  position: absolute;
  width: 20px;
  height: 8px;
  background: rgba(59, 130, 246, 0.8);
  border-radius: 10px;
  top: 80px;
  animation: eye-blink 3s infinite;
}

.ai-eye.left {
  left: 50px;
}

.ai-eye.right {
  right: 50px;
}

@keyframes eye-blink {

  0%,
  48%,
  52%,
  100% {
    height: 8px;
    background: rgba(59, 130, 246, 0.8);
  }

  50% {
    height: 1px;
    background: rgba(59, 130, 246, 0.3);
  }
}

.ai-circuit {
  position: absolute;
  background: rgba(59, 130, 246, 0.3);
  height: 1px;
  width: 30px;
  animation: circuit-glow 2s infinite alternate;
}

.ai-circuit:nth-child(3) {
  top: 120px;
  left: 30px;
  width: 50px;
}

.ai-circuit:nth-child(4) {
  top: 140px;
  right: 30px;
  width: 40px;
}

.ai-circuit:nth-child(5) {
  top: 160px;
  left: 50px;
  width: 100px;
}

.ai-circuit:nth-child(6) {
  top: 180px;
  right: 40px;
  width: 60px;
}

.ai-circuit:nth-child(7) {
  top: 200px;
  left: 60px;
  width: 80px;
}

@keyframes circuit-glow {
  0% {
    opacity: 0.3;
    box-shadow: 0 0 2px rgba(59, 130, 246, 0.3);
  }

  100% {
    opacity: 0.8;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.8);
  }
}

.ai-brain {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 40px;
  border-radius: 60px 60px 0 0;
  overflow: hidden;
}

.ai-brain-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(59, 130, 246, 0.8);
  border-radius: 50%;
  animation: brain-particle 3s infinite linear;
}

.ai-brain-particle:nth-child(1) {
  left: 10%;
  top: 20%;
  animation-delay: 0s;
}

.ai-brain-particle:nth-child(2) {
  left: 30%;
  top: 50%;
  animation-delay: 0.4s;
}

.ai-brain-particle:nth-child(3) {
  left: 50%;
  top: 30%;
  animation-delay: 0.8s;
}

.ai-brain-particle:nth-child(4) {
  left: 70%;
  top: 60%;
  animation-delay: 1.2s;
}

.ai-brain-particle:nth-child(5) {
  left: 20%;
  top: 70%;
  animation-delay: 1.6s;
}

.ai-brain-particle:nth-child(6) {
  left: 40%;
  top: 40%;
  animation-delay: 2.0s;
}

.ai-brain-particle:nth-child(7) {
  left: 60%;
  top: 20%;
  animation-delay: 2.4s;
}

.ai-brain-particle:nth-child(8) {
  left: 80%;
  top: 50%;
  animation-delay: 2.8s;
}

@keyframes brain-particle {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.8;
  }

  50% {
    transform: translateY(-10px) scale(1.5);
    opacity: 1;
  }

  100% {
    transform: translateY(0) scale(1);
    opacity: 0.8;
  }
}

.floating-cube {
  display: none !important;
}

.floating-cube::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.2);
  animation: cube-rotate 10s infinite linear;
}

@keyframes cube-rotate {
  0% {
    transform: rotateX(0deg) rotateY(0deg);
  }

  100% {
    transform: rotateX(360deg) rotateY(360deg);
  }
}

.floating-sphere {
  display: none !important;
}

.floating-sphere::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(59, 130, 246, 0.4), rgba(37, 99, 235, 0.1));
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
  animation: sphere-pulse 4s infinite ease-in-out;
}

@keyframes sphere-pulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
  }

  50% {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
  }
}

@keyframes float-slow {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-30px);
  }
}

@media (min-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  .hero-buttons {
    flex-direction: row;
  }

  .feature-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .floating-cube,
  .floating-sphere {
    display: none !important;
  }
}

/* About Section */
.about {
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.about::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(30, 58, 138, 0.05);
  z-index: 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
  z-index: 1;
}

.icon-circle {
  width: 5rem;
  height: 5rem;
  background-color: rgba(30, 58, 138, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.icon-circle i,
.icon-circle svg {
  font-size: 2.5rem;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--blue-500);
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-header p {
  color: #94a3b8;
  max-width: 48rem;
  margin: 0 auto;
  font-size: 1.125rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.card {
  background-color: rgba(30, 58, 138, 0.1);
  border: 1px solid rgba(30, 58, 138, 0.3);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.3);
  background-color: rgba(30, 58, 138, 0.15);
}

.card-icon {
  width: 4rem;
  height: 4rem;
  background-color: rgba(30, 58, 138, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  flex-shrink: 0;
}

.card-icon i {
  font-size: 2rem;
  color: var(--blue-500);
}

.card-body {
  flex: 1;
}

.card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--foreground);
}

.card-subtitle {
  color: var(--blue-400);
  font-size: 1rem;
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.card-content {
  margin-top: 1rem;
}

.card-content p {
  color: #d1d5db;
  line-height: 1.6;
}

.text-blue-500 {
  color: var(--blue-500);
}

.h-10 {
  height: 2.5rem;
}

.w-10 {
  width: 2.5rem;
}

@media (min-width: 640px) {
  .card {
    flex-direction: row;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .card-icon {
    margin-bottom: 0;
    margin-top: 0.25rem;
  }
}

@media (min-width: 768px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card {
    flex-direction: column;
  }

  .card-icon {
    margin-bottom: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .card {
    align-items: flex-start;
    gap: 1.5rem;
  }

  .card-icon {
    margin-bottom: 0;
    margin-top: 0.25rem;
  }
}


/* Enhanced Feature Section Styles */
.features-section {
  padding: 5rem 0;
  position: relative;
  background: linear-gradient(to bottom, #000000, rgba(30, 58, 138, 0.2));
  overflow: hidden;
}

.features-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.05) 0, transparent 70%),
    radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.05) 0, transparent 70%);
  opacity: 0.6;
  z-index: 0;
}

.tech-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, rgba(59, 130, 246, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.2;
  z-index: 0;
}

.section-header {
  position: relative;
  z-index: 1;
  margin-bottom: 4rem;
}

.icon-circle-container {
  display: inline-flex;
  margin-bottom: 1.5rem;
}

.icon-circle {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(30, 58, 138, 0.4));
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  transition: all 0.3s ease;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(to right, #ffffff, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-header p {
  color: #94a3b8;
  max-width: 48rem;
  margin: 0 auto;
  font-size: 1.125rem;
  line-height: 1.7;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.feature-card {
  background: rgba(30, 58, 138, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.2);
  background: rgba(30, 58, 138, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
}

.feature-icon {
  margin-bottom: 1.5rem;
}

.icon-wrapper {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(30, 58, 138, 0.3));
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.2);
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.feature-card:hover .icon-wrapper {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.25);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(30, 58, 138, 0.4));
}

.icon-wrapper svg {
  width: 2rem;
  height: 2rem;
  color: #3b82f6;
  transition: all 0.3s ease;
}

.feature-card:hover .icon-wrapper svg {
  color: #60a5fa;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #f8fafc;
}

.feature-card p {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.6;
  flex-grow: 1;
}

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .section-header h2 {
    font-size: 2rem;
  }
}


/* Optimization Section */
.optimization {
  padding: 4rem 0;
  position: relative;
}

.optimization-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(45deg, rgba(59, 130, 246, 0.1) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(59, 130, 246, 0.1) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(59, 130, 246, 0.1) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(59, 130, 246, 0.1) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  opacity: 0.1;
}

.optimization-card {
  background-color: rgba(30, 58, 138, 0.1);
  border: 1px solid rgba(30, 58, 138, 0.3);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.card-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.icon-box {
  padding: 0.75rem;
  background-color: rgba(30, 58, 138, 0.2);
  border-radius: 0.5rem;
  margin-right: 1rem;
}

.icon-box i {
  font-size: 2.5rem;
}

.card-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.optimization-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.optimization-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.list-item {
  display: flex;
  align-items: center;
}

.dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: var(--blue-500);
  margin-right: 0.75rem;
}

@media (min-width: 768px) {
  .optimization-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Results Section */
.results {
  padding: 5rem 0;
  position: relative;
}

.data-visualization-bg {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background-image: radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.4) 0, rgba(59, 130, 246, 0) 50px),
    radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.4) 0, rgba(59, 130, 246, 0) 50px),
    radial-gradient(circle at 40% 80%, rgba(59, 130, 246, 0.4) 0, rgba(59, 130, 246, 0) 50px),
    radial-gradient(circle at 60% 20%, rgba(59, 130, 246, 0.4) 0, rgba(59, 130, 246, 0) 50px);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.stat-card {
  background-color: rgba(30, 58, 138, 0.2);
  border: 1px solid rgba(30, 58, 138, 0.3);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: background-color 0.3s ease;
}

.stat-card:hover {
  background-color: rgba(30, 58, 138, 0.3);
}

.stat-icon {
  padding: 0.75rem;
  background-color: rgba(30, 58, 138, 0.2);
  border-radius: 50%;
  margin-bottom: 1rem;
}

.stat-icon i {
  font-size: 2rem;
}

.stat-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--blue-400);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.stat-description {
  color: #94a3b8;
  margin-bottom: 1rem;
}

.chart-container {
  width: 100%;
  height: 6rem;
  position: relative;
  margin-top: 0.5rem;
  overflow: hidden;
  border-radius: 0.5rem;
  background-color: rgba(30, 58, 138, 0.2);
}

.animated-chart {
  position: absolute;
  inset: 0;
  opacity: 0.8;
}

.animated-chart.bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding: 10px;
}

.animated-chart.bar-chart::before,
.animated-chart.bar-chart::after {
  content: "";
  width: 20%;
  background: rgba(59, 130, 246, 0.5);
  animation: bar-chart 3s infinite alternate;
}

.animated-chart.bar-chart::before {
  height: 60%;
  animation-delay: 0.5s;
}

.animated-chart.bar-chart::after {
  height: 80%;
  animation-delay: 1s;
}

@keyframes bar-chart {
  0% {
    height: 30%;
  }

  100% {
    height: 90%;
  }
}

.animated-chart.line-chart {
  overflow: hidden;
}

.animated-chart.line-chart::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(59, 130, 246, 0.5);
  animation: line-chart 3s infinite ease-in-out;
}

@keyframes line-chart {
  0% {
    transform: translateY(20px) translateX(0) scaleX(0.8);
  }

  50% {
    transform: translateY(-20px) translateX(50%) scaleX(1.2);
  }

  100% {
    transform: translateY(20px) translateX(100%) scaleX(0.8);
  }
}

.animated-chart.pie-chart {
  border-radius: 50%;
  background: conic-gradient(rgba(59, 130, 246, 0.7) 0%,
      rgba(37, 99, 235, 0.3) 30%,
      rgba(59, 130, 246, 0.5) 60%,
      rgba(37, 99, 235, 0.7) 100%);
  animation: pie-chart 5s infinite linear;
}

@keyframes pie-chart {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.animated-chart.area-chart {
  overflow: hidden;
}

.animated-chart.area-chart::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70%;
  background: linear-gradient(to top, rgba(59, 130, 246, 0.5), rgba(59, 130, 246, 0));
  clip-path: polygon(0% 100%, 25% 70%, 50% 90%, 75% 50%, 100% 70%, 100% 100%);
  animation: area-chart 5s infinite ease-in-out;
}

@keyframes area-chart {

  0%,
  100% {
    clip-path: polygon(0% 100%, 25% 70%, 50% 90%, 75% 50%, 100% 70%, 100% 100%);
  }

  50% {
    clip-path: polygon(0% 100%, 25% 50%, 50% 70%, 75% 30%, 100% 50%, 100% 100%);
  }
}

.cta-box {
  text-align: center;
  margin-top: 4rem;
}

.cta-header {
  display: inline-flex;
  align-items: center;
  padding: 1rem;
  background-color: rgba(30, 58, 138, 0.2);
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
}

.cta-header i {
  font-size: 2.5rem;
  margin-right: 1rem;
}

.cta-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.cta-box p {
  color: #94a3b8;
  max-width: 36rem;
  margin: 0 auto 2rem;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Roadmap Section */
.roadmap {
  padding: 5rem 0;
  background: linear-gradient(to bottom, rgba(30, 58, 138, 0.2), #000000);
  position: relative;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: rgba(30, 58, 138, 0.3);
  transform: translateX(-50%);
  display: none;
}

.timeline {
  position: relative;
  z-index: 1;
  margin-bottom: 2rem;
}

.timeline-item {
  margin-bottom: 3rem;
  position: relative;
}

.timeline-content {
  background-color: rgba(30, 58, 138, 0.1);
  border: 1px solid rgba(30, 58, 138, 0.3);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
}

.timeline-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

.timeline-item.completed .timeline-badge {
  background-color: rgba(16, 185, 129, 0.3);
}

.timeline-item.in-progress .timeline-badge {
  background-color: rgba(245, 158, 11, 0.3);
}

.timeline-item.planned .timeline-badge {
  background-color: rgba(59, 130, 246, 0.3);
}

.timeline-item.completed .timeline-badge i {
  color: #10b981;
}

.timeline-item.in-progress .timeline-badge i {
  color: #f59e0b;
  animation: pulse 2s infinite;
}

.timeline-item.planned .timeline-badge i {
  color: #3b82f6;
}

.timeline-badge span {
  font-size: 0.875rem;
  font-weight: 500;
}

.timeline-item.completed .timeline-badge span {
  color: #10b981;
}

.timeline-item.in-progress .timeline-badge span {
  color: #f59e0b;
}

.timeline-item.planned .timeline-badge span {
  color: #3b82f6;
}

.timeline-connector,
.timeline-dot {
  display: none;
}

@media (min-width: 768px) {
  .timeline-line {
    display: block;
  }

  .timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 6rem;
  }

  .timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
  }

  .timeline-content {
    width: calc(50% - 2.5rem);
  }

  .timeline-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    position: relative;
  }

  .connector-line {
    width: 100%;
    height: 1px;
    background-color: rgba(30, 58, 138, 0.5);
  }

  .timeline-connector i {
    position: absolute;
    font-size: 1rem;
    color: var(--blue-500);
  }

  .timeline-item:nth-child(odd) .timeline-connector i {
    transform: rotate(180deg);
  }

  .timeline-dot {
    display: block;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
  }

  .timeline-item.completed .timeline-dot {
    background-color: #10b981;
  }

  .timeline-item.in-progress .timeline-dot {
    background-color: #f59e0b;
  }

  .timeline-item.planned .timeline-dot {
    background-color: #3b82f6;
  }
}

/* Team Section - Industrial Wireframe */
.team-section {
  padding: 6rem 0;
  position: relative;
  background-color: #000;
  /* Deep black */
  overflow: hidden;
}

/* Remove gradient blobs for cleaner look */
.team-bg-pattern {
  display: none;
}

.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
}

.team-member {
  background: transparent;
  /* Wireframe */
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 4px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.team-member:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
  border-color: var(--blue-500);
}

.team-header {
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  background: rgba(59, 130, 246, 0.05);
  /* Slight tint for header only */
}

.team-avatar {
  width: 5rem;
  height: 5rem;
  border-radius: 4px;
  /* Square avatar for tech look */
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  border: 1px solid var(--blue-500);
  flex-shrink: 0;
}

.team-initial {
  font-size: 2rem;
  font-weight: 700;
  color: var(--blue-500);
  font-family: 'JetBrains Mono', monospace;
}

.team-info h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
}

.team-position {
  color: var(--blue-400);
  font-weight: 500;
  font-size: 0.9rem;
  font-family: 'JetBrains Mono', monospace;
}

.team-content {
  padding: 2rem;
}

.team-bio {
  color: #94a3b8;
  margin-bottom: 2rem;
  line-height: 1.7;
  font-size: 0.95rem;
  border-left: 2px solid rgba(59, 130, 246, 0.3);
  padding-left: 1rem;
}

.competencies-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
}

.competencies-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.competency-item {
  background: transparent;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 0;
  /* Sharp corners */
  padding: 1rem;
  transition: all 0.3s ease;
  width: 100%;
}

.competency-item:hover {
  background: rgba(59, 130, 246, 0.05);
  border-color: var(--blue-500);
  transform: translateX(5px);
}

.competency-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.competency-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--blue-500);
}

.competency-icon svg {
  width: 1rem;
  height: 1rem;
  color: var(--blue-500);
}

.competency-title {
  font-weight: 600;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
}

.competency-description {
  color: #94a3b8;
  font-size: 0.85rem;
  line-height: 1.5;
  padding-left: 3rem;
}


/* Contact Section - Modern Glassmorphism */
.contact-section {
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
  background: #000;
}

.contact-bg-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(30, 58, 138, 0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.contact-card {
  position: relative;
  z-index: 10;
  max-width: 1000px;
  margin: 0 auto;
}

.glass-card {
  background: rgba(30, 58, 138, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 1rem;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 2fr 3fr;
  }
}

/* Contact Info Column */
.contact-info {
  background: rgba(30, 58, 138, 0.15);
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

@media (min-width: 768px) {
  .contact-info {
    border-bottom: none;
    border-right: 1px solid rgba(59, 130, 246, 0.2);
  }
}

.contact-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  font-family: 'JetBrains Mono', monospace;
  color: #fff;
}

.contact-desc {
  color: #94a3b8;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.info-items {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: auto;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.info-icon {
  width: 3rem;
  height: 3rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.info-item:hover .info-icon {
  background: rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(59, 130, 246, 0.15);
}

.info-icon i {
  color: var(--blue-400);
  font-size: 1.25rem;
}

.info-item h4 {
  font-size: 0.9rem;
  color: #fff;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.info-item a,
.info-item p {
  color: #94a3b8;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.info-item a:hover {
  color: var(--blue-400);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 3rem;
}

.social-link {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.social-link:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #fff;
  border-color: var(--blue-400);
  transform: translateY(-2px);
}

/* Contact Form Column */
.contact-form-wrapper {
  padding: 3rem 2rem;
  background: transparent;
}

.modern-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: #94a3b8;
  margin-bottom: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
}

.form-input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 0.5rem;
  color: #fff;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s ease;
}

.form-input::placeholder {
  color: #475569;
}

.form-input:focus {
  outline: none;
  background: rgba(15, 23, 42, 0.8);
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* Footer - Status Bar */
.footer-bar {
  background: #050505;
  border-top: 1px solid rgba(59, 130, 246, 0.2);
  padding: 1rem 0;
  font-family: 'JetBrains Mono', monospace;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #64748b;
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.status-indicator {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 5px #10b981;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-link {
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--blue-400);
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    gap: 1rem;
  }
}


/* Login Page */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
}

.login-container {
  width: 100%;
  max-width: 28rem;
  z-index: 10;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  color: var(--blue-500);
  margin-bottom: 1.5rem;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: var(--blue-400);
}

.back-link i {
  margin-right: 0.5rem;
}

.login-title {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.login-subtitle {
  color: #94a3b8;
}

.login-card {
  background-color: rgba(30, 58, 138, 0.2);
  border: 1px solid rgba(30, 58, 138, 0.3);
  border-radius: var(--radius);
  padding: 2rem;
}

.input-with-icon {
  position: relative;
}

.input-with-icon i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
}

.input-with-icon input {
  padding-left: 2.5rem;
}

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

.forgot-password {
  font-size: 0.875rem;
  color: var(--blue-500);
  transition: color 0.3s ease;
}

.forgot-password:hover {
  color: var(--blue-400);
}

.login-footer {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(30, 58, 138, 0.3);
  text-align: center;
}

.login-footer p {
  color: #94a3b8;
  margin-bottom: 1rem;
}

/* Chat Interface Styles */
.chat-layout {
  display: flex;
  height: calc(100vh - 120px);
  /* Adjust based on header height */
  padding-top: 120px;
  gap: 1rem;
  max-width: 1600px;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-bottom: 1rem;
}

.chat-sidebar {
  width: 300px;
  background: rgba(30, 58, 138, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  background: rgba(30, 58, 138, 0.3);
}

.chat-sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.chat-main {
  flex: 1;
  background: rgba(30, 58, 138, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.chat-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  background: rgba(30, 58, 138, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.message {
  display: flex;
  gap: 1rem;
  max-width: 80%;
  animation: fadeIn 0.3s ease-out;
}

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message.bot {
  align-self: flex-start;
}

.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.message-content {
  background: rgba(30, 58, 138, 0.4);
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #e2e8f0;
  line-height: 1.6;
}

.message.user .message-content {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  border-bottom-right-radius: 0.25rem;
}

.message.bot .message-content {
  border-bottom-left-radius: 0.25rem;
}

.chat-input-area {
  padding: 1.5rem;
  background: rgba(30, 58, 138, 0.2);
  border-top: 1px solid rgba(59, 130, 246, 0.2);
}

.chat-input-wrapper {
  position: relative;
  display: flex;
  gap: 1rem;
}

.chat-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius);
  padding: 1rem;
  color: white;
  resize: none;
  min-height: 60px;
  font-family: inherit;
  transition: all 0.3s ease;
}

.chat-input:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Chat Message Formatting */

/* Пустая строка / отступ */
.chat-spacer { display: block; height: 14px; }

/* Заголовки (# ## ###) */
.chat-h1 {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: #60a5fa;
  margin: 18px 0 10px 0;
}
.chat-h2 {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: #93c5fd;
  margin: 14px 0 8px 0;
}
.chat-h3 {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: #bfdbfe;
  margin: 10px 0 6px 0;
}

/* Строки с эмодзи */
.chat-msg-header {
  display: block;
  margin-top: 14px;
  margin-bottom: 4px;
}

/* Разделители ─── */
.chat-divider {
  display: block;
  height: 1px;
  background: rgba(59, 130, 246, 0.3);
  margin: 12px 0;
}

/* Статусные строки */
.chat-status-line {
  display: block;
  margin: 6px 0;
}

/* Списки */
.chat-list { display: block; margin: 0.5rem 0 1rem 0; padding-left: 1.5rem; }
.chat-list-num {
  display: block;
  margin-left: 16px;
  margin-top: 4px;
}
.chat-list-item {
  display: block;
  margin-left: 8px;
  margin-top: 3px;
}

/* Обычный текст */
.chat-text { display: block; margin-top: 3px; line-height: 1.55; }

/* ВАЖНО: Жирный текст выделяется цветом */
.chat-message strong {
  color: #60a5fa;
  font-weight: 600;
}

/* Chat Tables */
.chat-table-container {
  margin: 12px 0;
  padding: 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 10px;
  overflow-x: auto;
}
.chat-table {
  width: max-content;
  min-width: 100%;
  font-size: 0.85rem;
  border-collapse: collapse;
  color: #e2e8f0;
}
.chat-table th {
  padding: 10px 14px;
  border-bottom: 2px solid rgba(59, 130, 246, 0.3);
  text-align: left;
  background: transparent;
  font-weight: 700;
  color: #e2e8f0;
  white-space: nowrap;
}
.chat-table td {
  padding: 10px 14px;
  border: none;
  vertical-align: top;
  color: #e2e8f0;
}
.chat-table td:first-child,
.chat-table td:nth-child(4) {
  white-space: nowrap;
}
.chat-table tbody tr {
  transition: background 0.2s ease;
}
.chat-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.05);
}
.chat-message code {
  background: rgba(255,255,255,0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}
.chat-message a {
  color: #3dc5ff;
  text-decoration: none;
}
.chat-message a:hover {
  text-decoration: underline;
}

/* Modal Styles Update */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #0f172a;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 1rem;
  padding: 2rem;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal.active .modal-content {
  transform: translateY(0);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: #94a3b8;
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  background: rgba(30, 58, 138, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 0.5rem;
  color: white;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--blue-500);
  background: rgba(30, 58, 138, 0.3);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 4px 8px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--blue-400);
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}

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

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

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

/* ===== Chat File Display Styles ===== */

/* Инлайн изображения в чате */
.chat-inline-image {
  margin: 12px 0;
}

.chat-inline-image img {
  max-width: 100%;
  max-height: 400px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.chat-inline-image img:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.3);
}

.image-caption {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Ссылки на файлы */
.chat-file-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  color: var(--blue-400);
  text-decoration: none;
  margin: 6px 0;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.chat-file-link:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--blue-400);
  transform: translateY(-1px);
}

.chat-file-link i:last-child {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* CSV превью контейнер */
.csv-preview-container {
  margin: 12px 0;
  padding: 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 10px;
  overflow-x: auto;
}

/* CSV таблица превью */
.csv-preview-table {
  width: 100%;
  font-size: 0.8rem;
  border-collapse: collapse;
  color: #e2e8f0;
}

.csv-preview-table thead th {
  padding: 8px 12px;
  border-bottom: 2px solid rgba(59, 130, 246, 0.3);
  text-align: left;
  background: rgba(59, 130, 246, 0.1);
  white-space: nowrap;
  font-weight: 600;
  color: var(--blue-300);
}

.csv-preview-table tbody td {
  padding: 6px 12px;
  border-bottom: 1px solid rgba(30, 41, 59, 0.8);
  white-space: nowrap;
}

.csv-preview-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.05);
}

.csv-preview-table tbody tr:last-child td {
  border-bottom: none;
}

/* Chat Markdown Tables */
.chat-table-container {
  margin: 12px 0;
  padding: 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 10px;
  overflow-x: auto;
}

.chat-markdown-table {
  width: max-content;
  min-width: 100%;
  font-size: 0.85rem;
  border-collapse: collapse;
  color: #e2e8f0;
}

.chat-markdown-table thead th {
  padding: 10px 14px;
  border-bottom: 2px solid rgba(59, 130, 246, 0.3);
  text-align: left;
  background: transparent;
  font-weight: 700;
  color: #e2e8f0;
  white-space: nowrap;
}

.chat-markdown-table tbody td {
  padding: 10px 14px;
  border: none;
  vertical-align: top;
  color: #e2e8f0;
}

.chat-markdown-table tbody td:first-child,
.chat-markdown-table tbody td:nth-child(4) {
  white-space: nowrap;
}

.chat-markdown-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.05);
  transition: background 0.2s ease;
}

/* Responsive */
@media (max-width: 768px) {
  .chat-table-container {
    padding: 12px;
  }

  .chat-markdown-table {
    font-size: 0.75rem;
  }

  .chat-markdown-table thead th,
  .chat-markdown-table tbody td {
    padding: 6px 10px;
  }
}

/* Модальное окно для просмотра изображений */
.image-viewer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: fadeIn 0.2s ease;
}

.image-viewer-overlay img {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
  border-radius: 4px;
}

.image-viewer-overlay button {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 10px 15px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.image-viewer-overlay button:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Загрузка CSV */
.loading-csv {
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
}

.loading-csv i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* --- Industrial Design / Pipeline Theme --- */

/* Pipeline Section (Valuators) */
.pipeline-container {
  display: flex;
  align-items: flex-start;
  /* Align top for cleaner wireframe look */
  justify-content: space-between;
  gap: 2rem;
  position: relative;
  margin-top: 4rem;
}

/* Connecting Line (Circuit Style) */
.pipeline-container::before {
  content: '';
  position: absolute;
  top: 2rem;
  /* Align with the top of the nodes */
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(59, 130, 246, 0.3);
  z-index: 0;
}

.pipeline-step {
  flex: 1;
  /* Wireframe: No background, just interaction */
  background: transparent;
  border: none;
  border-left: 1px solid rgba(59, 130, 246, 0.5);
  /* Minimalist indicator */
  padding: 1rem 1.5rem;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

/* Node point on the circuit line */
.pipeline-step::before {
  content: '';
  position: absolute;
  top: -2.35rem;
  /* Position on the line */
  left: 0;
  width: 12px;
  height: 12px;
  background: #000;
  border: 1px solid var(--blue-500);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
  transform: rotate(45deg);
  /* Diamond shape */
  z-index: 2;
  transition: all 0.3s ease;
}

.pipeline-step:hover::before {
  background: var(--blue-500);
  box-shadow: 0 0 20px var(--blue-500);
}

.pipeline-step:hover {
  transform: translateY(5px);
  border-left-color: var(--blue-400);
}

.step-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--blue-400);
  margin-bottom: 0.5rem;
  opacity: 0.8;
  border: none;
  padding: 0;
  background: none;
}

.step-icon {
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 1rem;
  display: none;
  /* Hide icons for cleaner wireframe look vs previous plan, or keep strictly minimal */
}

.step-title {
  font-family: 'JetBrains Mono', monospace;
  /* Tech font for titles */
  font-size: 1.1rem;
  font-weight: 500;
  color: #fff;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.step-desc {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.6;
}

/* Pipeline Connector Animation */
.pipeline-connector {
  position: absolute;
  top: 2rem;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue-500), transparent);
  background-size: 50% 100%;
  animation: flow-line 3s linear infinite;
  z-index: 1;
  pointer-events: none;
}

@keyframes flow-line {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}


/* Data Grid Section (Stakeholders) */
.data-grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* Wireframe Grid: Borders only */
  border-top: 1px solid rgba(59, 130, 246, 0.2);
  border-left: 1px solid rgba(59, 130, 246, 0.2);
  margin-top: 3rem;
  background: transparent;
}

.data-cell {
  background: transparent;
  /* Remove fill */
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-right: 1px solid rgba(59, 130, 246, 0.2);
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  transition: background 0.3s ease;
}

.data-cell:hover {
  background: rgba(59, 130, 246, 0.05);
  /* Very subtle hover */
}

.data-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--blue-400);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.8;
}

.data-label i {
  font-size: 0.9rem;
}

.data-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.5rem;
  font-weight: 500;
  color: #fff;
  margin-bottom: 0.5rem;
  line-height: 1;
  letter-spacing: -1px;
}

.data-sub {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #64748b;
  margin-top: auto;
  /* Push to bottom if height varies */
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .pipeline-container {
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
  }

  .pipeline-container::before {
    top: 0;
    bottom: 0;
    left: 8px;
    /* Vertical line alignment */
    width: 1px;
    height: 100%;
    transform: none;
  }

  .pipeline-connector {
    display: none;
    /* Hide horizontal animation on mobile */
  }

  .pipeline-step {
    padding-left: 2rem;
    border-left: none;
    /* Remove accent border in favor of dot */
  }

  .pipeline-step::before {
    top: 0.5rem;
    left: 3px;
    transform: none;
  }

  .data-grid-container {
    grid-template-columns: 1fr;
    border-left: none;
    /* Full width items */
    border-right: none;
  }

  .data-cell {
    border-left: none;
    border-right: none;
    padding: 2rem 1rem;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
  }

  .data-value {
    font-size: 2rem;
  }
}