/* ===================================
   CSS Variables & Reset
   =================================== */
:root {
  /* Colors */
  --primary: #0C0E2C;
  --primary-light: #1a1d4a;
  --accent: #6F9EFF;
  --accent-dark: #547dff;
  --accent-light: #93b5ff;
  --accent-glow: #4d7fff;
  --light: #F9FAFC;
  --white: #FFFFFF;
  --grey: #7A7F9A;
  --grey-light: #E5E7EB;
  --grey-dark: #4B5563;
  --success: #10B981;
  --danger: #EF4444;
  --cyan: #00f5ff;
  --purple: #b24bf3;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6F9EFF 0%, #357ABD 100%);
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-card: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  --gradient-futuristic: linear-gradient(135deg, #00f5ff 0%, #6F9EFF 50%, #b24bf3 100%);
  --gradient-glow: radial-gradient(circle at center, rgba(111, 158, 255, 0.4), transparent 70%);
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 30px rgba(111, 158, 255, 0.3);
  --shadow-glow-strong: 0 0 50px rgba(111, 158, 255, 0.5);
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #000000;
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===================================
   Video Background
   =================================== */
.video-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
}

.video-background video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, 
    rgba(12, 14, 44, 0.4) 0%,
    rgba(12, 14, 44, 0.5) 50%,
    rgba(12, 14, 44, 0.6) 100%
  );
}

/* ===================================
   Futuristic Grid Overlay
   =================================== */
.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-image: 
    linear-gradient(rgba(111, 158, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 158, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.3;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(50px);
  }
}

/* ===================================
   Particle Canvas
   =================================== */
#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* ===================================
   Header
   =================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(12, 14, 44, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(111, 158, 255, 0.2);
  transition: var(--transition-base);
}

.header.scrolled {
  background: rgba(12, 14, 44, 0.6);
  box-shadow: 0 4px 30px rgba(111, 158, 255, 0.1);
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-img {
  height: 32px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(111, 158, 255, 0.5));
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Orbitron', sans-serif;
  background: var(--gradient-futuristic);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition-fast);
  position: relative;
  text-shadow: 0 0 10px rgba(111, 158, 255, 0.3);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-futuristic);
  box-shadow: 0 0 10px var(--accent-glow);
  transition: var(--transition-base);
}

.nav-link:hover {
  color: var(--accent-light);
}

.nav-link:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  box-shadow: 0 0 5px var(--accent);
  transition: var(--transition-base);
}

/* ===================================
   Hero Section
   =================================== */
.hero-section {
  min-height: 100vh;
  padding: 140px 2rem 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-content {
  max-width: 1400px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text {
  animation: fadeInUp 0.8s ease-out;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(111, 158, 255, 0.1);
  border: 1px solid rgba(111, 158, 255, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 1.5rem;
  box-shadow: 0 0 20px rgba(111, 158, 255, 0.2);
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2s infinite;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--white);
  font-family: 'Orbitron', sans-serif;
}

.gradient-text {
  background: var(--gradient-futuristic);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(111, 158, 255, 0.5));
}

.glitch {
  position: relative;
  animation: glitchText 8s infinite;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.glitch::before {
  animation: glitchBefore 3s infinite;
  color: var(--cyan);
  z-index: -1;
}

.glitch::after {
  animation: glitchAfter 3s infinite;
  color: var(--purple);
  z-index: -1;
}

@keyframes glitchText {
  0%, 90%, 100% {
    transform: translate(0);
  }
  93% {
    transform: translate(-2px, 2px);
  }
  96% {
    transform: translate(2px, -2px);
  }
}

@keyframes glitchBefore {
  0%, 90%, 100% {
    opacity: 0;
    transform: translate(0);
  }
  93% {
    opacity: 0.7;
    transform: translate(-3px, 0);
  }
}

@keyframes glitchAfter {
  0%, 90%, 100% {
    opacity: 0;
    transform: translate(0);
  }
  96% {
    opacity: 0.7;
    transform: translate(3px, 0);
  }
}

.hero-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-features {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(111, 158, 255, 0.1);
  border: 1px solid rgba(111, 158, 255, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--white);
  transition: var(--transition-base);
  box-shadow: 0 0 15px rgba(111, 158, 255, 0.1);
}

.feature-pill:hover {
  background: rgba(111, 158, 255, 0.2);
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(111, 158, 255, 0.3);
  transform: translateY(-2px);
}

.feature-pill svg {
  width: 18px;
  height: 18px;
  color: var(--accent-light);
}

/* ===================================
   Chatbot Container
   =================================== */
.chatbot-container {
  position: relative;
  background: rgba(12, 14, 44, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
              0 0 40px rgba(111, 158, 255, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 600px;
  border: 1px solid rgba(111, 158, 255, 0.3);
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.chatbot-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: var(--gradient-glow);
  opacity: 0.1;
  animation: rotate 20s linear infinite;
  pointer-events: none;
}

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

.chatbot-header {
  background: linear-gradient(135deg, rgba(111, 158, 255, 0.3) 0%, rgba(53, 122, 189, 0.3) 100%);
  backdrop-filter: blur(10px);
  color: var(--white);
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(111, 158, 255, 0.2);
  position: relative;
  z-index: 1;
}

.chatbot-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ai-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  background: rgba(111, 158, 255, 0.2);
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(111, 158, 255, 0.5);
}

.avatar-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid var(--accent);
  border-radius: 50%;
  animation: pulseBorder 2s infinite;
}

@keyframes pulseBorder {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0;
  }
}

.ai-avatar svg {
  width: 24px;
  height: 24px;
  color: var(--accent-light);
  filter: drop-shadow(0 0 5px var(--accent));
}

.chatbot-title {
  font-size: 1.1rem;
  font-weight: 600;
  font-family: 'Orbitron', sans-serif;
}

.chatbot-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  opacity: 0.9;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.minimize-btn {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.minimize-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 15px rgba(111, 158, 255, 0.3);
}

/* ===================================
   Chat Messages
   =================================== */
.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}

.message {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-message .message-avatar {
  background: var(--gradient-primary);
  border: 1px solid var(--accent);
  box-shadow: 0 0 15px rgba(111, 158, 255, 0.4);
  color: var(--white);
}

.ai-message .message-avatar svg {
  width: 18px;
  height: 18px;
}

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

.user-message .message-avatar {
  background: rgba(178, 75, 243, 0.3);
  border: 1px solid var(--purple);
  box-shadow: 0 0 15px rgba(178, 75, 243, 0.4);
  color: var(--white);
  font-weight: 600;
  font-size: 0.9rem;
}

.message-content {
  max-width: 85%;
}

.message-text {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  line-height: 1.6;
  font-size: 0.95rem;
  color: var(--white);
}

.user-message .message-text {
  background: linear-gradient(135deg, rgba(111, 158, 255, 0.3) 0%, rgba(53, 122, 189, 0.3) 100%);
  border-color: rgba(111, 158, 255, 0.4);
}

.capability-tags {
  display: grid;
  grid-template-columns: repeat(2, 1fr);  /* 🔥 2 per row */
  gap: 0.75rem;
  column-gap: 0.0rem;
  margin: 0.75rem 0;
}

.capability-tags .clickable-tag {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 215px;             /* 🔥 All tags become SAME WIDTH */
  min-height: unset;         /* 🔥 Same height */
  
  padding: 6px 10px;
  text-align: center;

  border-radius: 20px;
  background: #222;
  color: #fff;
  font-weight: 600;
  font-size: 14px;

  cursor: pointer;
  transition: all 0.2s ease;
}

.tag {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: rgba(111, 158, 255, 0.2);
  border: 1px solid rgba(111, 158, 255, 0.3);
  color: var(--accent-light);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 0 10px rgba(111, 158, 255, 0.2);
}

.clickable-tag {
  cursor: pointer;
  transition: all var(--transition-fast);
}

.clickable-tag:hover {
  background: rgba(111, 158, 255, 0.3);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(111, 158, 255, 0.4);
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  gap: 0.35rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  width: fit-content;
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 5px var(--accent);
  animation: typingBounce 1.4s infinite ease-in-out;
}

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

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

@keyframes typingBounce {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-10px);
  }
}

/* ===================================
   Quick Actions
   =================================== */
.quick-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0 1.5rem 1rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.quick-action-btn {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(111, 158, 255, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--white);
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  box-shadow: 0 0 10px rgba(111, 158, 255, 0.1);
}

.quick-action-btn:hover {
  background: rgba(111, 158, 255, 0.2);
  border-color: var(--accent);
  box-shadow: 0 0 25px rgba(111, 158, 255, 0.3);
  transform: translateY(-2px);
}

/* ===================================
   Chat Input
   =================================== */
.chatbot-input {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  background: rgba(12, 14, 44, 0.6);
  border-top: 1px solid rgba(111, 158, 255, 0.2);
  position: relative;
  z-index: 1;
}

.attachment-btn {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--accent-light);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.attachment-btn:hover {
  background: rgba(111, 158, 255, 0.2);
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(111, 158, 255, 0.3);
}

.periodic-table-btn {
  font-size: 1.2rem;
  border: 2px solid rgba(111, 158, 255, 0.6);
  background: rgba(111, 158, 255, 0.15);
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(111, 158, 255, 0.4);
  }
  50% {
    box-shadow: 0 0 30px rgba(111, 158, 255, 0.7);
  }
}

.periodic-table-btn {
  position: relative;
}

.periodic-table-btn:hover {
  box-shadow: 0 0 35px rgba(111, 158, 255, 0.8);
  animation: none;
}

.periodic-table-btn:hover .periodic-hint {
  animation: none;
  transform: translateX(-50%);
}

.periodic-hint {
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-primary);
  color: var(--white);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 0 20px rgba(111, 158, 255, 0.4);
  animation: slideInBounceDown 0.5s ease-out;
  pointer-events: none;
  z-index: 10;
}

@keyframes slideInBounceRight {
  0% {
    opacity: 0;
    transform: translateY(-50%) translateX(20px);
  }
  60% {
    opacity: 1;
    transform: translateY(-50%) translateX(-5px);
  }
  100% {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

@keyframes hintPulse {
  0%, 100% {
    transform: translateX(-50%) translateY(0) scale(1);
  }
  50% {
    transform: translateX(-50%) translateY(-2px) scale(1.05);
  }
}

.periodic-hint.hidden {
  display: none;
}

.attachment-btn svg {
  width: 20px;
  height: 20px;
}

.message-input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(111, 158, 255, 0.3);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--white);
  transition: var(--transition-fast);
}

.message-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.message-input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 20px rgba(111, 158, 255, 0.2);
}

.send-btn {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  color: var(--white);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(111, 158, 255, 0.3);
}

.send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(111, 158, 255, 0.5);
}

.send-btn svg {
  width: 20px;
  height: 20px;
}

/* ===================================
   Section Badges
   =================================== */
.section-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(111, 158, 255, 0.1);
  border: 1px solid rgba(111, 158, 255, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 0 20px rgba(111, 158, 255, 0.2);
}

.section-badge.light {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--white);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

/* ===================================
   Features Section
   =================================== */
.features-section {
  padding: 100px 2rem;
  background: rgba(12, 14, 44, 0.5);
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--white);
  font-family: 'Orbitron', sans-serif;
}

.section-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.7);
  max-width: 600px;
  margin: 0 auto;
}

.features-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.feature-card {
  position: relative;
  background: rgba(12, 14, 44, 0.6);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(111, 158, 255, 0.2);
  transition: var(--transition-base);
  cursor: pointer;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-glow);
  opacity: 0;
  transition: var(--transition-base);
  z-index: 0;
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: 0 20px 60px rgba(111, 158, 255, 0.3);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card > * {
  position: relative;
  z-index: 1;
}

.feature-icon-wrapper {
  position: relative;
  width: fit-content;
  margin-bottom: 1rem;
}

.feature-icon {
  font-size: 3rem;
  filter: drop-shadow(0 0 15px rgba(111, 158, 255, 0.5));
}

.feature-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: var(--gradient-glow);
  opacity: 0;
  border-radius: 50%;
  transition: var(--transition-base);
}

.feature-card:hover .feature-glow {
  opacity: 0.6;
  animation: pulse 2s infinite;
}

.feature-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--white);
}

.feature-description {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.feature-stat {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(111, 158, 255, 0.15);
  border: 1px solid rgba(111, 158, 255, 0.3);
  color: var(--accent-light);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 0 15px rgba(111, 158, 255, 0.2);
}

/* ===================================
   Collaborators Section
   =================================== */
.collaborators-section {
  padding: 100px 2rem;
  background: rgba(12, 14, 44, 0.3);
  position: relative;
  overflow: hidden;
}

.logo-carousel {
  width: 100%;
  overflow: hidden;
  padding: 2rem 0;
  position: relative;
}

.logo-track {
  display: flex;
  align-items: center;
  gap: 4rem;
  animation: scrollLogos 30s linear infinite;
}

@keyframes scrollLogos {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.logo-track:hover {
  animation-play-state: paused;
}

.logo-track img {
  height: 80px;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%) brightness(2);
  opacity: 0.6;
  transition: var(--transition-base);
  flex-shrink: 0;
}

.logo-track img:hover {
  filter: grayscale(0%) brightness(1);
  opacity: 1;
  transform: scale(1.1);
}

/* ===================================
   Latest News Section
   =================================== */
.news-section {
  padding: 100px 2rem;
  background: rgba(0, 0, 0, 0.2);
  position: relative;
}

.news-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 2rem;
}

.news-card {
  background: rgba(12, 14, 44, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(111, 158, 255, 0.2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-base);
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: 0 20px 60px rgba(111, 158, 255, 0.3);
}

.news-image-wrapper {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.news-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-base);
}

.news-card:hover .news-image {
  transform: scale(1.05);
}

.news-content {
  padding: 1.5rem 2rem 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-date {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: rgba(111, 158, 255, 0.2);
  border: 1px solid rgba(111, 158, 255, 0.3);
  color: var(--accent-light);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  width: fit-content;
  margin-bottom: 1rem;
  box-shadow: 0 0 10px rgba(111, 158, 255, 0.2);
}

.news-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.news-description {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  flex: 1;
}

.news-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.news-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(111, 158, 255, 0.1);
  border: 1px solid rgba(111, 158, 255, 0.3);
  border-radius: var(--radius-md);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition-fast);
  box-shadow: 0 0 15px rgba(111, 158, 255, 0.1);
}

.news-btn:hover {
  background: rgba(111, 158, 255, 0.2);
  border-color: var(--accent);
  box-shadow: 0 0 25px rgba(111, 158, 255, 0.3);
  transform: translateY(-2px);
}

.news-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ===================================
   About Section
   =================================== */
.about-section {
  padding: 100px 2rem;
  background: rgba(0, 0, 0, 0.3);
  position: relative;
}

.about-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-description {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.about-values {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.value-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  background: rgba(111, 158, 255, 0.05);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  transition: var(--transition-base);
}

.value-item:hover {
  background: rgba(111, 158, 255, 0.1);
  box-shadow: 0 0 30px rgba(111, 158, 255, 0.2);
}

.value-icon {
  font-size: 2rem;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(111, 158, 255, 0.5));
}

.value-text h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  color: var(--white);
}

.value-text p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

/* Tech Visualization */
.tech-visualization {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto;
}

.viz-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(111, 158, 255, 0.3);
  border-radius: 50%;
  animation: vizRotate 20s linear infinite;
}

.viz-circle:nth-child(1) {
  width: 250px;
  height: 250px;
  border-color: rgba(111, 158, 255, 0.4);
}

.viz-circle:nth-child(2) {
  width: 200px;
  height: 200px;
  border-color: rgba(0, 245, 255, 0.4);
  animation-direction: reverse;
  animation-duration: 15s;
}

.viz-circle:nth-child(3) {
  width: 150px;
  height: 150px;
  border-color: rgba(178, 75, 243, 0.4);
  animation-duration: 25s;
}

@keyframes vizRotate {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.viz-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 50px rgba(111, 158, 255, 0.6);
  animation: pulse 3s infinite;
}

.viz-center svg {
  width: 40px;
  height: 40px;
  color: var(--white);
}

/* ===================================
   Contact Section
   =================================== */
.contact-section {
  padding: 100px 2rem;
  background: rgba(12, 14, 44, 0.8);
  color: var(--white);
  position: relative;
}

.contact-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.contact-description {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.8);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.1rem;
  color: var(--accent-light);
}

.contact-item svg {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 0 5px var(--accent));
}

/* ===================================
   Contact Form
   =================================== */
.contact-form {
  background: rgba(111, 158, 255, 0.05);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(111, 158, 255, 0.3);
  box-shadow: 0 0 30px rgba(111, 158, 255, 0.2);
}

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

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(111, 158, 255, 0.3);
  border-radius: var(--radius-md);
  color: var(--white);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 20px rgba(111, 158, 255, 0.2);
}

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

.submit-btn {
  width: 100%;
  padding: 1rem 2rem;
  background: var(--gradient-primary);
  color: var(--white);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 0 30px rgba(111, 158, 255, 0.3);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 50px rgba(111, 158, 255, 0.5);
}

.submit-btn svg {
  width: 20px;
  height: 20px;
}

/* ===================================
   Footer
   =================================== */
.footer {
  background: rgba(12, 14, 44, 0.6);
  color: var(--white);
  padding: 3rem 2rem 1.5rem;
  border-top: 1px solid rgba(111, 158, 255, 0.2);
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-logo-img {
  height: 28px;
  filter: drop-shadow(0 0 10px rgba(111, 158, 255, 0.5));
}

.footer-logo-text {
  font-size: 1.3rem;
  font-weight: 700;
  font-family: 'Orbitron', sans-serif;
  background: var(--gradient-futuristic);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-description {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  max-width: 400px;
}

.footer-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--accent-light);
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-link:hover {
  color: var(--accent-light);
  text-shadow: 0 0 10px rgba(111, 158, 255, 0.5);
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(111, 158, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

/* ===================================
   Toast Notification
   =================================== */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: rgba(12, 14, 44, 0.6);
  backdrop-filter: blur(20px);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(111, 158, 255, 0.3);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5),
              0 0 30px rgba(111, 158, 255, 0.3);
  transform: translateY(100px);
  opacity: 0;
  transition: var(--transition-base);
  z-index: 10000;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.toast-icon {
  width: 24px;
  height: 24px;
  background: var(--success);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: 0 0 15px var(--success);
}

.toast-message {
  color: var(--white);
  font-weight: 500;
}

/* ===================================
   Animations
   =================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===================================
   Selected Elements Display
   =================================== */
.selected-elements {
  padding: 0.75rem 1.5rem;
  background: rgba(111, 158, 255, 0.1);
  border-top: 1px solid rgba(111, 158, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.selected-elements-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-light);
}

.selected-elements-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex: 1;
}

.element-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  background: rgba(111, 158, 255, 0.2);
  border: 1px solid rgba(111, 158, 255, 0.4);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
  box-shadow: 0 0 10px rgba(111, 158, 255, 0.2);
}

.element-chip-remove {
  cursor: pointer;
  font-weight: bold;
  opacity: 0.7;
  transition: var(--transition-fast);
}

.element-chip-remove:hover {
  opacity: 1;
  color: var(--danger);
}

.clear-selection-btn {
  padding: 0.35rem 0.75rem;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
  cursor: pointer;
  transition: var(--transition-fast);
}

.clear-selection-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

/* ===================================
   Periodic Table Modal
   =================================== */
.periodic-table-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

.periodic-table-modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  background: rgba(12, 14, 44, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(111, 158, 255, 0.3);
  border-radius: var(--radius-xl);
  max-width: 95vw;
  max-height: 95vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
              0 0 40px rgba(111, 158, 255, 0.3);
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(111, 158, 255, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(111, 158, 255, 0.05);
}

.modal-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  font-family: 'Orbitron', sans-serif;
}

.modal-close {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: var(--danger);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}

.periodic-table-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.selection-counter {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
}

.selection-counter strong {
  color: var(--accent-light);
  font-size: 1.2rem;
}

.periodic-table-legend {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: rgba(255, 255, 255, 0.7);
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Element Category Colors */
.legend-color.nonmetal { background: #3b82f6; }
.legend-color.noble-gas { background: #8b5cf6; }
.legend-color.alkali { background: #ef4444; }
.legend-color.alkaline { background: #f59e0b; }
.legend-color.transition { background: #10b981; }
.legend-color.post-transition { background: #06b6d4; }
.legend-color.metalloid { background: #84cc16; }
.legend-color.halogen { background: #ec4899; }
.legend-color.lanthanide { background: #6366f1; }
.legend-color.actinide { background: #a855f7; }

/* ===================================
   Periodic Table Grid
   =================================== */
.periodic-table {
  display: grid;
  grid-template-columns: repeat(18, 1fr);
  gap: 0.25rem;
  max-width: 100%;
  overflow-x: auto;
}

.element {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  min-width: 50px;
  background: rgba(255, 255, 255, 0.05);
}

.element:hover {
  transform: scale(1.1);
  z-index: 10;
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(111, 158, 255, 0.4);
}

.element.selected {
  border-color: var(--accent);
  box-shadow: 0 0 25px rgba(111, 158, 255, 0.6),
              inset 0 0 20px rgba(111, 158, 255, 0.2);
  background: rgba(111, 158, 255, 0.2);
}

.element-number {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.5);
  position: absolute;
  top: 0.25rem;
  left: 0.25rem;
}

.element-symbol {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  font-family: 'Orbitron', sans-serif;
}

.element-name {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  margin-top: 0.15rem;
}

.element-weight {
  font-size: 0.55rem;
  color: rgba(255, 255, 255, 0.4);
  position: absolute;
  bottom: 0.25rem;
}

/* Element Categories */
.element.nonmetal { background: rgba(59, 130, 246, 0.2); }
.element.noble-gas { background: rgba(139, 92, 246, 0.2); }
.element.alkali { background: rgba(239, 68, 68, 0.2); }
.element.alkaline { background: rgba(245, 158, 11, 0.2); }
.element.transition { background: rgba(16, 185, 129, 0.2); }
.element.post-transition { background: rgba(6, 182, 212, 0.2); }
.element.metalloid { background: rgba(132, 204, 22, 0.2); }
.element.halogen { background: rgba(236, 72, 153, 0.2); }
.element.lanthanide { background: rgba(99, 102, 241, 0.2); }
.element.actinide { background: rgba(168, 85, 247, 0.2); }

.element.empty {
  background: transparent;
  border: none;
  cursor: default;
  pointer-events: none;
}

/* Modal Footer */
.modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(111, 158, 255, 0.2);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  background: rgba(111, 158, 255, 0.05);
}

.modal-btn {
  padding: 0.75rem 2rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid;
}

.modal-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

.modal-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.modal-btn-primary {
  background: var(--gradient-primary);
  border-color: var(--accent);
  color: var(--white);
  box-shadow: 0 0 20px rgba(111, 158, 255, 0.3);
}

.modal-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(111, 158, 255, 0.5);
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .about-content {
    grid-template-columns: 1fr;
  }
  
  .contact-content {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .hero-section {
    padding: 100px 1.5rem 60px;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .chatbot-container {
    height: 500px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-features {
    flex-direction: column;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .quick-actions {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  
  .tech-visualization {
    width: 250px;
    height: 250px;
  }
  
  .periodic-table {
    gap: 0.15rem;
  }
  
  .element {
    min-width: 40px;
    padding: 0.25rem;
  }
  
  .element-symbol {
    font-size: 1rem;
  }
  
  .element-name {
    font-size: 0.5rem;
  }
  
  .periodic-table-legend {
    font-size: 0.65rem;
  }
  
  .modal-body {
    padding: 1rem;
  }
  
  .news-grid {
    grid-template-columns: 1fr;
  }
  
  .news-image-wrapper {
    height: 370px;
  }
  
  .logo-track img {
    height: 60px;
  }
  
  .periodic-hint {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .chatbot-container {
    height: 450px;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
}
/* ===================================
   Hierarchical Feature Network
   =================================== */
.feature-network {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 4rem;
  min-height: 500px;
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
  z-index: 2;
}

.feature-outcome {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
}

.feature-node {
  position: relative;
  background: rgba(12, 14, 44, 0.4);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(111, 158, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  transition: var(--transition-base);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.feature-node:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: 0 20px 60px rgba(111, 158, 255, 0.4);
}

.node-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  background: var(--gradient-glow);
  opacity: 0;
  border-radius: 50%;
  transition: var(--transition-base);
}

.feature-node:hover .node-glow {
  opacity: 0.6;
  animation: pulse 2s infinite;
}

.node-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.node-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 15px rgba(111, 158, 255, 0.5));
}

.node-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--white);
  text-align: center;
}

.node-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--white);
}

.node-content p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

.connection-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

.connection-line {
  stroke: var(--accent);
  stroke-width: 3;
  stroke-dasharray: 8, 8;
  opacity: 0.6;
  animation: dashFlow 15s linear infinite;
  filter: drop-shadow(0 0 8px rgba(111, 158, 255, 0.6));
}

@keyframes dashFlow {
  0% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: 160;
  }
}

.outcome-node {
  max-width: 450px;
  padding: 2.5rem 3rem;
  background: rgba(111, 158, 255, 0.1);
  border: 2px solid var(--accent);
  box-shadow: 0 10px 40px rgba(111, 158, 255, 0.4);
  transform: scale(1.05);
}

.outcome-glow {
  width: 300px;
  height: 300px;
  opacity: 0.3;
}

.outcome-node .node-content h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--white);
  font-family: 'Orbitron', sans-serif;
}

.outcome-stats {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1rem;
}

.stat-badge {
  padding: 0.4rem 0.8rem;
  background: rgba(111, 158, 255, 0.2);
  border: 1px solid rgba(111, 158, 255, 0.4);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-light);
}

/* ===================================
   Enhanced Mission Section
   =================================== */
.about-content-enhanced {
  max-width: 1400px;
  margin: 0 auto;
}

.about-text-full {
  max-width: 100%;
}

.mission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.mission-card {
  background: rgba(12, 14, 44, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(111, 158, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition-base);
}

.mission-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 15px 40px rgba(111, 158, 255, 0.3);
}

.mission-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 10px rgba(111, 158, 255, 0.4));
}

.mission-card h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.mission-card p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* Horizontal Mission Cards */
.mission-cards-horizontal {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin: 2rem auto;
  max-width: 1200px;
}

.mission-card-compact {
  background: rgba(12, 14, 44, 0.4);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(111, 158, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  text-align: center;
  transition: var(--transition-base);
  cursor: pointer;
  min-width: 220px;
  flex: 1;
  max-width: 300px;
}

.mission-card-compact:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 15px 40px rgba(111, 158, 255, 0.4);
}

.mission-card-compact .mission-icon {
  font-size: 2.8rem;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 0 15px rgba(111, 158, 255, 0.6));
}

.mission-card-compact h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  margin: 0;
  font-family: 'Orbitron', sans-serif;
}

.mission-description {
  max-width: 1000px;
  margin: 2.5rem auto 0;
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.85);
  padding: 0 2rem;
}

/* News image size reduction */
.news-image-wrapper {
  height: 370px;
}


/* Responsive adjustments for feature network */
@media (max-width: 1200px) {
  .feature-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
  .outcome-node {
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  .feature-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .feature-network {
    gap: 2rem;
    padding: 2rem 1rem;
  }
  
  .connection-lines {
    display: none;
  }
}

/* ===================================
   SCROLL ANIMATIONS
   =================================== */
.fade-in-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.6s ease-out 0.2s, transform 0.6s ease-out 0.2s;
}

.slide-in-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.6s ease-out 0.4s, transform 0.6s ease-out 0.4s;
}

.slide-in-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-down {
  opacity: 0;
  transform: translateY(-30px);
  transition: opacity 0.6s ease-out 0.3s, transform 0.6s ease-out 0.3s;
}

.slide-in-down.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-up {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out 0.5s, transform 0.8s ease-out 0.5s;
}

.slide-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================
   LARGER MISSION CARDS
   =================================== */
.mission-cards-horizontal {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin: 3rem auto;
  max-width: 1400px;
  padding: 0 2rem;
}

.mission-card-large {
  background: rgba(12, 14, 44, 0.8);
  backdrop-filter: blur(15px);
  border: 2px solid rgba(111, 158, 255, 0.4);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  text-align: center;
  transition: all var(--transition-base);
  cursor: pointer;
  min-width: 320px;
  flex: 1;
  max-width: 400px;
  position: relative;
  overflow: hidden;
}

.mission-card-large::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-glow);
  opacity: 0;
  transition: var(--transition-base);
}

.mission-card-large:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--accent);
  box-shadow: 0 20px 60px rgba(111, 158, 255, 0.5);
}

.mission-card-large:hover::before {
  opacity: 0.15;
}

.mission-icon-large {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 20px rgba(111, 158, 255, 0.6));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.mission-title-large {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1rem;
  font-family: 'Orbitron', sans-serif;
  background: var(--gradient-futuristic);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mission-tagline {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.mission-desc {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.8;
}

/* ===================================
   SMALLER CAPABILITY NODES
   =================================== */
.feature-node {
  position: relative;
  background: rgba(12, 14, 44, 0.4);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(111, 158, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem;
  transition: all var(--transition-base);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 280px;
}

.feature-node .node-icon-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 15px rgba(111, 158, 255, 0.5));
  transition: var(--transition-base);
}

.feature-node:hover .node-icon-img {
  transform: scale(1.1);
  filter: drop-shadow(0 0 25px rgba(111, 158, 255, 0.8));
}

.feature-node h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--white);
  text-align: center;
}

.feature-node p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  line-height: 1.6;
}

.outcome-node {
  max-width: 420px;
  padding: 2rem 2.5rem;
  background: rgba(111, 158, 255, 0.12);
  border: 2px solid var(--accent);
  box-shadow: 0 15px 50px rgba(111, 158, 255, 0.4);
  min-height: 300px;
}

.outcome-node .node-icon-img {
  width: 120px;
  height: 120px;
}

.outcome-node h3 {
  font-size: 1.6rem;
  font-family: 'Orbitron', sans-serif;
}

.outcome-node p {
  font-size: 1rem;
}

@media (max-width: 1200px) {
  .feature-row {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .mission-card-large {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .feature-row {
    grid-template-columns: 1fr;
  }
  
  .mission-cards-horizontal {
    flex-direction: column;
    gap: 2rem;
  }
  
  .mission-card-large {
    max-width: 100%;
  }
  
  .connection-lines {
    display: none;
  }
}

/* ===================================
   Request Demo Button in Header Styles
   =================================== */

.demo-request-btn-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #6F9EFF 0%, #547dff 100%);
  border: none;
  border-radius: 20px;
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(111, 158, 255, 0.3);
  white-space: nowrap;
}

.demo-request-btn-header:hover {
  background: linear-gradient(135deg, #547dff 0%, #6F9EFF 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(111, 158, 255, 0.5);
}

.demo-request-btn-header:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(111, 158, 255, 0.4);
}

.demo-request-btn-header svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  flex-shrink: 0;
}

.demo-request-btn-header span {
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.3px;
}

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

/* Fix: Make hero section immediately visible (it's above the fold) */
.hero-section.fade-in-section {
  opacity: 1;
  transform: translateY(0);
}

/* Also make header immediately visible */
.header {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Emergency fix: Make all sections visible by default */
.about-section.fade-in-section,
.features-section.fade-in-section,
.collaborators-section.fade-in-section,
.news-section.fade-in-section,
.contact-section.fade-in-section {
  opacity: 1;
  transform: translateY(0);
}

/* Also make slide-in elements visible */
.slide-in-left,
.slide-in-right,
.slide-in-up,
.slide-in-down {
  opacity: 1;
  transform: translateX(0) translateY(0);
}

/* ===================================

/* ===================================
   Offer Page Styles - FIXED
   =================================== */

/* Offer Hero Section */
.offer-hero-section {
  min-height: 50vh;
  padding: 160px 2rem 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: rgba(12, 14, 44, 0.5);
}

.offer-hero-section .section-header {
  position: relative;
  z-index: 10;
  text-align: center;
  margin-bottom: 2rem;
}

.offer-hero-section .section-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(111, 158, 255, 0.2);
  border: 1px solid rgba(111, 158, 255, 0.4);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 0 20px rgba(111, 158, 255, 0.3);
}

.offer-hero-section .section-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--white);
  font-family: 'Orbitron', sans-serif;
  text-shadow: 0 0 30px rgba(111, 158, 255, 0.5);
  position: relative;
  z-index: 10;
}

.offer-hero-section .hero-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 10;
}

/* Offer Blocks Section */
.offer-blocks-section {
  padding: 80px 2rem 100px;
  background: rgba(0, 0, 0, 0.2);
  position: relative;
}

.offer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6rem;
}

.offer-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  background: rgba(12, 14, 44, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(111, 158, 255, 0.2);
  transition: var(--transition-base);
}

.offer-block:hover {
  border-color: var(--accent);
  box-shadow: 0 20px 60px rgba(111, 158, 255, 0.3);
  transform: translateY(-5px);
}

.offer-block-reverse {
  grid-template-columns: 1fr 1fr;
}

.offer-block-reverse .offer-image-wrapper {
  order: 2;
}

.offer-block-reverse .offer-content {
  order: 1;
}

.offer-image-wrapper {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
}

.offer-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.offer-block:hover .offer-image {
  transform: scale(1.05);
}

.offer-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(111, 158, 255, 0.2) 0%, rgba(12, 14, 44, 0.4) 100%);
  opacity: 0.6;
  transition: var(--transition-base);
}

.offer-block:hover .offer-image-overlay {
  opacity: 0.3;
}

.offer-content {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  z-index: 5;
}

.offer-number {
  font-size: 4rem;
  font-weight: 800;
  font-family: 'Orbitron', sans-serif;
  background: var(--gradient-futuristic);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  opacity: 0.3;
  filter: drop-shadow(0 0 20px rgba(111, 158, 255, 0.5));
}

.offer-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--white);
  font-family: 'Orbitron', sans-serif;
  margin-top: 1.5rem;
  line-height: 1.2;
  text-shadow: 0 0 30px rgba(111, 158, 255, 0.6), 0 2px 15px rgba(111, 158, 255, 0.4);
  position: relative;
  z-index: 10;
}

.offer-description {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 10;
}

.offer-features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
  list-style: none;
  padding: 0;
}

.offer-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  line-height: 1.6;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.offer-features li svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 0.25rem;
  color: var(--accent-light);
  filter: drop-shadow(0 0 5px var(--accent));
}

.offer-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: var(--gradient-primary);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition-fast);
  box-shadow: 0 0 30px rgba(111, 158, 255, 0.3);
  width: fit-content;
  margin-top: 1rem;
}

.offer-cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 40px rgba(111, 158, 255, 0.5);
  background: linear-gradient(135deg, #7fa9ff 0%, #457dcf 100%);
}

.offer-cta-btn svg {
  width: 18px;
  height: 18px;
  transition: var(--transition-fast);
}

.offer-cta-btn:hover svg {
  transform: translateX(5px);
}

/* Responsive Design for Offer Page */
@media (max-width: 968px) {
  .offer-block,
  .offer-block-reverse {
    grid-template-columns: 1fr;
  }
  
  .offer-block-reverse .offer-image-wrapper,
  .offer-block-reverse .offer-content {
    order: unset;
  }
  
  .offer-image-wrapper {
    height: 350px;
  }
  
  .offer-content {
    padding: 2rem;
  }
  
  .offer-number {
    font-size: 3rem;
  }
  
  .offer-hero-section .section-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 640px) {
  .offer-blocks-section {
    padding: 60px 1rem 80px;
  }
  
  .offer-container {
    gap: 4rem;
  }
  
  .offer-image-wrapper {
    height: 250px;
  }
  
  .offer-content {
    padding: 1.5rem;
  }
  
  .offer-title {
    font-size: 1.5rem;
  }
  
  .offer-description {
    font-size: 1rem;
  }
  
  .offer-hero-section .section-title {
    font-size: 2rem;
  }
  
  .offer-hero-section {
    padding: 140px 1rem 60px;
  }
}

/* ===================================
   TARGETED TEXT READABILITY FIX
   Only improves white text readability
   Keeps gradient titles AND video background unchanged
   =================================== */

/* Body text - paragraphs and descriptions */
body {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Remove text shadow from gradient titles - keep them as is */
h1, h2, h3, h4, h5, h6,
.hero-title,
.section-title,
.gradient-text,
.glitch {
  text-shadow: none !important;
}

/* Hero subtitle - white text under main title */
.hero-subtitle {
  text-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.9),
    0 4px 15px rgba(0, 0, 0, 0.7);
  background: rgba(12, 14, 44, 0.35);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  backdrop-filter: blur(8px);
}

/* Navigation links */
.nav-link {
  text-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.8),
    0 0 15px rgba(0, 0, 0, 0.6);
  font-weight: 700;
}

/* Card descriptions - white text in cards */
.feature-description,
.news-description,
.mission-desc,
.about-description,
.contact-description,
.section-subtitle {
  text-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.8),
    0 4px 12px rgba(0, 0, 0, 0.6);
  color: rgba(255, 255, 255, 0.98) !important;
  line-height: 1.8;
}

/* Add dark backdrop to cards for better text contrast */
.feature-card,
.news-card,
.mission-card-large {
  background: rgba(12, 14, 44, 0.85) !important;
  backdrop-filter: blur(15px);
}

/* About section text */
.value-text p,
.mission-description {
  text-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.8),
    0 4px 12px rgba(0, 0, 0, 0.6);
}

/* Chatbot messages - white text in chat */
.message-text {
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  background: rgba(12, 14, 44, 0.92) !important;
  color: rgba(255, 255, 255, 0.98);
  line-height: 1.7;
}

.chatbot-messages {
  background: rgba(0, 0, 0, 0.45) !important;
}

/* Feature pills white text */
.feature-pill,
.tag {
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
  background: rgba(111, 158, 255, 0.35) !important;
  border: 2px solid rgba(111, 158, 255, 0.6);
  font-weight: 600;
}

/* Form inputs and placeholders */
.form-input,
.message-input {
  background: rgba(12, 14, 44, 0.85) !important;
  border: 2px solid rgba(111, 158, 255, 0.4);
  color: rgba(255, 255, 255, 0.98);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  font-weight: 500;
}

.form-input::placeholder,
.message-input::placeholder {
  color: rgba(255, 255, 255, 0.65);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.form-input:focus,
.message-input:focus {
  background: rgba(12, 14, 44, 0.95) !important;
  border-color: var(--accent);
}

/* Contact info white text */
.contact-item {
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
  background: rgba(12, 14, 44, 0.45);
  padding: 1rem;
  border-radius: 8px;
  backdrop-filter: blur(8px);
}

.contact-item span,
.contact-item a {
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}

/* Footer text */
.footer {
  background: rgba(12, 14, 44, 0.96) !important;
}

.footer-description,
.footer-link {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

/* Button text */
button,
.btn,
.submit-btn,
.send-btn,
.news-btn {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  font-weight: 600;
}

/* News card content */
.news-content p,
.news-date {
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}

/* Collaborator section text */
.logo-carousel {
  background: rgba(12, 14, 44, 0.65);
  padding: 3rem 0;
  backdrop-filter: blur(12px);
}

/* Career and team pages */
.career-card,
.team-member-card {
  background: rgba(12, 14, 44, 0.88) !important;
  backdrop-filter: blur(15px);
}

.career-description,
.team-member-description {
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

/* Solution page content */
.solution-card {
  background: rgba(12, 14, 44, 0.88) !important;
  backdrop-filter: blur(15px);
}

.solution-description {
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

/* Periodic table element names */
.element .name,
.element .weight {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Status text in chatbot */
.chatbot-status span,
.status-dot + span {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
  font-weight: 600;
}

/* DO NOT change video overlay - keep original brightness */
/* Video overlay is controlled by your existing styles.css */

/* Additional overlay ONLY for sections with lots of text - more subtle */
.hero-section::before,
.features-section::before,
.about-section::before,
.contact-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(12, 14, 44, 0.15); /* Very subtle overlay - reduced from 0.25 */
  pointer-events: none;
  z-index: 0;
}

/* Ensure content is above overlay */
.hero-content,
.features-grid,
.about-content,
.contact-content,
.section-header {
  position: relative;
  z-index: 1;
}

/* Paragraph text in all sections */
p {
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
}

/* List items */
li {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

/* Strong/bold text */
strong, b {
  font-weight: 700;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}

/* Emphasized text */
em, i {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

/* Link text (non-button links) */
a:not(.btn):not(.nav-link):not(.news-btn) {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

a:not(.btn):not(.nav-link):not(.news-btn):hover {
  text-shadow: 
    0 2px 6px rgba(111, 158, 255, 0.8),
    0 0 12px rgba(111, 158, 255, 0.5);
}

/* Mobile menu enhancements */
@media (max-width: 768px) {
  .nav {
    background: rgba(12, 14, 44, 0.98) !important;
    backdrop-filter: blur(20px);
  }
  
  .nav-link {
    padding: 0.75rem 1.5rem;
    background: rgba(111, 158, 255, 0.12);
    margin: 0.25rem 0;
    border-radius: 8px;
  }
  
  /* Ensure all mobile text is readable */
  body {
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
  }
}

/* Table text (if any) */
table td,
table th {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

/* Quote text */
blockquote {
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
  background: rgba(12, 14, 44, 0.4);
  padding: 1rem;
  border-left: 3px solid var(--accent);
  border-radius: 4px;
}

/* Code text */
code {
  background: rgba(12, 14, 44, 0.6);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Small text */
small,
.small-text {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.hero-subtitle {
  text-shadow: 
    0 2px 10px rgba(0, 0, 0, 0.95),
    0 4px 20px rgba(0, 0, 0, 0.8),
    0 6px 30px rgba(0, 0, 0, 0.6);
  background: none !important; /* ← Removed background box */
  padding: 0 !important;
  border-radius: 0 !important;
  backdrop-filter: none !important;
}

/* ===================================
   FIX: Remove text-shadow from chat messages only
   Add this to your existing styles.css or include it separately
   =================================== */

/* Remove text outline/contour from chat message text */
.message-text {
  text-shadow: none !important;
}

/* Also remove text-shadow from chat input field */
.message-input {
  text-shadow: none !important;
}

.message-input::placeholder {
  text-shadow: none !important;
}

/* Optional: Keep other chat elements visible but remove their text-shadow too */
.message-text em,
.message-text strong,
.message-text p,
.message-text span {
  text-shadow: none !important;
}

/* Model Badge Styling */
.model-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
    margin-right: 8px;
    text-transform: uppercase;
}

.model-deepseek {
    background-color: #4A90E2;
    color: white;
}

.model-mattergen {
    background-color: #7B68EE;
    color: white;
}

.model-uma {
    background-color: #FF6B6B;
    color: white;
}

.model-demo {
    background-color: #95a5a6;
    color: white;
}

/* ===================================
   ADDITIONAL CSS FOR COMPLETE FIXES
   Append this to the end of styles.css
   =================================== */

/* ===================================
   Status Dot (Green) - FIXED
   =================================== */
.status-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* ===================================
   Header Actions (History & New Chat Buttons)
   =================================== */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.history-btn,
.new-chat-btn {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  color: var(--white);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.history-btn:hover,
.new-chat-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 15px rgba(111, 158, 255, 0.3);
}

.history-btn svg,
.new-chat-btn svg {
  width: 18px;
  height: 18px;
}

/* ===================================
   Chat History Modal
   =================================== */
.chat-history-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.chat-history-modal.active {
  display: flex;
}

.history-list {
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.history-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(111, 158, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem;
  transition: var(--transition-fast);
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(111, 158, 255, 0.2);
}

.history-item-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 0.75rem;
  gap: 1rem;
}

.history-item-title {
  font-weight: 600;
  color: var(--white);
  flex: 1;
  line-height: 1.4;
}

.history-item-date {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
}

.history-item-actions {
  display: flex;
  gap: 0.5rem;
}

.history-load-btn,
.history-delete-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.history-load-btn {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: 0 0 15px rgba(111, 158, 255, 0.3);
}

.history-load-btn:hover {
  box-shadow: 0 0 25px rgba(111, 158, 255, 0.5);
  transform: translateY(-2px);
}

.history-delete-btn {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.history-delete-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

/* ===================================
   Message Formatting Improvements
   =================================== */
.message-text {
  line-height: 1.7;
  word-wrap: break-word;
}

.message-text strong {
  font-weight: 700;
  color: var(--accent-light);
}

.message-text em {
  font-style: italic;
  color: rgba(255, 255, 255, 0.9);
}

.message-text br {
  display: block;
  content: "";
  margin-top: 0.5rem;
}

/* ===================================
   Typing Indicator Styling
   =================================== */
.typing-indicator {
  display: flex;
  gap: 0.35rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  width: fit-content;
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 5px var(--accent);
  animation: typingBounce 1.4s infinite ease-in-out;
}

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

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

@keyframes typingBounce {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-10px);
  }
}

/* ===================================
   Responsive Adjustments
   =================================== */
@media (max-width: 768px) {
  .header-actions {
    gap: 0.5rem;
  }
  
  .demo-request-btn-header span {
    display: none;
  }
  
  .history-item-header {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .history-item-date {
    align-self: flex-start;
  }
}

/* ===================================
   Scrollbar Styling for History List
   =================================== */
.history-list::-webkit-scrollbar {
  width: 8px;
}

.history-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb {
  background: rgba(111, 158, 255, 0.5);
  border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb:hover {
  background: rgba(111, 158, 255, 0.7);
}


/* ===================================
   Periodic Table Grid Styling
   =================================== */
.periodic-table {
  display: grid;
  grid-template-columns: repeat(18, 1fr);
  grid-template-rows: repeat(9, 1fr);
  gap: 4px;
  max-width: 100%;
  margin: 0 auto;
}

.element {
  aspect-ratio: 1;
  border: 1px solid rgba(111, 158, 255, 0.3);
  border-radius: 4px;
  padding: 4px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.element:not(.empty):hover {
  transform: scale(1.1);
  z-index: 10;
  box-shadow: 0 4px 20px rgba(111, 158, 255, 0.5);
}

.element.selected {
  background: rgba(111, 158, 255, 0.3);
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(111, 158, 255, 0.5);
}

.element.empty {
  border: none;
  cursor: default;
}

.element-number {
  font-size: 0.6rem;
  opacity: 0.7;
}

.element-symbol {
  font-size: 1rem;
  font-weight: 700;
}

.element-name {
  font-size: 0.55rem;
  opacity: 0.8;
  text-align: center;
}

.element-weight {
  font-size: 0.5rem;
  opacity: 0.6;
}


/* ===================================
   Modal Styling Improvements
   =================================== */
.modal-content {
  background: rgba(12, 14, 44, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(111, 158, 255, 0.3);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(111, 158, 255, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin: 0;
}

.modal-close {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 15px rgba(111, 158, 255, 0.3);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid rgba(111, 158, 255, 0.2);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.modal-btn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: 0 0 20px rgba(111, 158, 255, 0.3);
}

.modal-btn-primary:hover {
  box-shadow: 0 0 30px rgba(111, 158, 255, 0.5);
  transform: translateY(-2px);
}

.modal-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: -1;
}

/* Mode Indicator */
.mode-indicator {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(111, 158, 255, 0.1), rgba(111, 158, 255, 0.05));
  border: 1px solid rgba(111, 158, 255, 0.3);
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 14px;
}

.mode-label {
  color: var(--grey);
  font-weight: 500;
}

.mode-name {
  color: var(--accent);
  font-weight: 600;
}

.mode-clear {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--grey);
  cursor: pointer;
  font-size: 18px;
  padding: 0 5px;
  transition: color 0.3s;
}

.mode-clear:hover {
  color: var(--danger);
}

/* Active Tag Style */
.clickable-tag {
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.clickable-tag:hover {
  background: rgba(111, 158, 255, 0.2);
  transform: translateY(-2px);
}

.clickable-tag.active-tag {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 12px rgba(111, 158, 255, 0.4);
}

.clickable-tag.active-tag::after {
  content: '✓';
  margin-left: 5px;
}

/* =================================== 
   Additional Styles for Chat Functionality
   Add these to your styles.css file
   =================================== */

/* Typing Indicator */
.typing-indicator {
  opacity: 1;
  animation: fadeIn 0.3s ease-in;
}

.typing-dots {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-color, #00d4ff);
  animation: typingDot 1.4s infinite;
}

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

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

@keyframes typingDot {
  0%, 60%, 100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  30% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Chat History Modal */
.chat-history-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

.chat-history-modal.active {
  display: flex;
}

.chat-history-modal .modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.chat-history-modal .modal-content {
  position: relative;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 16px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 212, 255, 0.3);
  z-index: 10001;
}

.chat-history-modal .modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(0, 212, 255, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-history-modal .modal-header h3 {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.chat-history-modal .modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
}

.chat-history-modal .modal-close::before {
  content: '×';
  font-size: 24px;
  line-height: 1;
}

.chat-history-modal .modal-close:hover {
  background: rgba(255, 59, 92, 0.2);
  transform: rotate(90deg);
}

.chat-history-modal .modal-body {
  padding: 16px 24px;
  overflow-y: auto;
  flex: 1;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item {
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.history-item:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.3);
  transform: translateX(4px);
}

.history-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.history-item-title {
  color: #ffffff !important;
  font-weight: 500;
  font-size: 14px;
  flex: 1;
  line-height: 1.4;
}

.history-item-date {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

.history-item-delete {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: none;
  background: rgba(255, 59, 92, 0.2);
  color: #ff3b5c;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.history-item-delete:hover {
  background: rgba(255, 59, 92, 0.4);
  transform: scale(1.1);
}

.empty-history {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
}

.chat-history-modal .modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(0, 212, 255, 0.2);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.modal-btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.modal-btn-primary {
  background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
  color: #fff;
}

.modal-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4);
}

.modal-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-btn-secondary:hover {
  background: rgba(255, 59, 92, 0.2);
  border-color: rgba(255, 59, 92, 0.4);
}

/* Periodic Table Modal (if not already styled) */
.periodic-table-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

.periodic-table-modal.active {
  display: flex;
}

/* Button hover states */
.new-chat-btn,
.history-btn,
.send-btn {
  cursor: pointer;
  transition: all 0.3s ease;
}

.new-chat-btn:hover,
.history-btn:hover {
  transform: scale(1.1);
  background: rgba(0, 212, 255, 0.2);
}

.send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Message formatting */
.message-text strong {
  font-weight: 600;
  color: #00d4ff;
}

.message-text em {
  font-style: italic;
  color: rgba(255, 255, 255, 0.8);
}

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

.message {
  animation: fadeIn 0.3s ease-out;
}

/* Clickable tags */
.clickable-tag {
  cursor: pointer;
  transition: all 0.3s ease;
}

.clickable-tag:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 212, 255, 0.4);
}

/* Scrollbar styling for chat history */
.history-list::-webkit-scrollbar {
  width: 6px;
}

.history-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.3);
  border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 255, 0.5);
}

/* =================================== 
   Updated Styles for Chat with Modes
   Add these to your styles.css file
   =================================== */

/* Typing Indicator */
.typing-indicator {
  opacity: 1;
  animation: fadeIn 0.3s ease-in;
}

.typing-dots {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-color, #00d4ff);
  animation: typingDot 1.4s infinite;
}

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

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

@keyframes typingDot {
  0%, 60%, 100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  30% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Mode Message Styling */
.mode-message .message-text {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 153, 255, 0.1) 100%);
  border-left: 3px solid #00d4ff;
  padding: 16px;
  border-radius: 8px;
}

.mode-badge {
  display: inline-block;
  background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 12px;
}

/* Chat History Modal */
.chat-history-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

.chat-history-modal.active {
  display: flex;
}

.chat-history-modal .modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.chat-history-modal .modal-content {
  position: relative;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 16px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 212, 255, 0.3);
  z-index: 10001;
}

.chat-history-modal .modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(0, 212, 255, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-history-modal .modal-header h3 {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

/* Better Close Button - Icon Style */
.chat-history-modal .modal-close {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(0, 212, 255, 0.3);
  background: rgba(0, 212, 255, 0.1);
  color: #00d4ff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  padding: 0;
}

.chat-history-modal .modal-close::before,
.chat-history-modal .modal-close::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.chat-history-modal .modal-close::before {
  transform: rotate(45deg);
}

.chat-history-modal .modal-close::after {
  transform: rotate(-45deg);
}

.chat-history-modal .modal-close:hover {
  background: rgba(0, 212, 255, 0.2);
  border-color: rgba(0, 212, 255, 0.5);
  transform: rotate(90deg);
}

.chat-history-modal .modal-body {
  padding: 16px 24px;
  overflow-y: auto;
  flex: 1;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.history-item:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.3);
  transform: translateX(4px);
}

.history-item-content {
  flex: 1;
  cursor: pointer;
}

.history-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.history-mode-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.history-item-title {
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  flex: 1;
  line-height: 1.4;
}

.history-item-date {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

/* Better Delete Button - Trash Icon */
.history-item-delete {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 59, 92, 0.3);
  background: rgba(255, 59, 92, 0.1);
  color: #ff3b5c;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
  padding: 8px;
}

.history-item-delete svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.history-item-delete:hover {
  background: rgba(255, 59, 92, 0.2);
  border-color: rgba(255, 59, 92, 0.5);
  transform: scale(1.1);
}

.empty-history {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
}

.chat-history-modal .modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(0, 212, 255, 0.2);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.modal-btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.modal-btn-primary {
  background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
  color: #fff;
}

.modal-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4);
}

.modal-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-btn-secondary:hover {
  background: rgba(255, 59, 92, 0.2);
  border-color: rgba(255, 59, 92, 0.4);
}

/* Periodic Table Modal (if not already styled) */
.periodic-table-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

.periodic-table-modal.active {
  display: flex;
}

/* Button hover states */
.new-chat-btn,
.history-btn,
.send-btn {
  cursor: pointer;
  transition: all 0.3s ease;
}

.new-chat-btn:hover,
.history-btn:hover {
  transform: scale(1.1);
  background: rgba(0, 212, 255, 0.2);
}

.send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Message formatting */
.message-text strong {
  font-weight: 600;
  color: #00d4ff;
}

.message-text em {
  font-style: italic;
  color: rgba(255, 255, 255, 0.8);
}

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

.message {
  animation: fadeIn 0.3s ease-out;
}

/* Clickable tags */
.clickable-tag {
  cursor: pointer;
  transition: all 0.3s ease;
}

.clickable-tag:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 212, 255, 0.4);
}

/* Scrollbar styling for chat history */
.history-list::-webkit-scrollbar {
  width: 6px;
}

.history-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.3);
  border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 255, 0.5);
}

/* Modal body scrollbar */
.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.3);
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 255, 0.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .chat-history-modal .modal-content {
    width: 95%;
    max-height: 85vh;
  }
  
  .history-item {
    padding: 12px;
  }
  
  .history-item-title {
    font-size: 13px;
  }
  
  .history-item-date {
    font-size: 11px;
  }
}



/* =================================== 
   Final Enhanced Styles
   - Clean copy button (top-right position)
   - Element badge styles
   - Better animations
   =================================== */

/* Copy Button - Top Right Position */
.message-content {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 40px; /* Space for copy button */
}

.copy-btn-topright {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  backdrop-filter: blur(10px);
  z-index: 10;
}

.copy-btn-topright:hover {
  background: rgba(0, 212, 255, 0.15);
  border-color: rgba(0, 212, 255, 0.4);
  color: #00d4ff;
  transform: scale(1.1);
}

.copy-btn-topright:active {
  transform: scale(0.95);
}

.copy-btn-topright.copied {
  background: rgba(46, 213, 115, 0.2);
  border-color: rgba(46, 213, 115, 0.5);
  color: #2ed573;
  animation: copySuccess 0.4s ease;
}

.copy-btn-topright svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
}

@keyframes copySuccess {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

/* Tooltip for Copy Button */
.copy-btn-topright::before {
  content: attr(title);
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 100;
}

.copy-btn-topright::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 8px;
  margin-top: 2px;
  border: 4px solid transparent;
  border-bottom-color: rgba(0, 0, 0, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 100;
}

.copy-btn-topright:hover::before,
.copy-btn-topright:hover::after {
  opacity: 1;
}

/* Element Badge Styles */
.element-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(0, 153, 255, 0.2) 100%);
  border: 1px solid rgba(0, 212, 255, 0.4);
  border-radius: 6px;
  color: #00d4ff;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.element-badge:hover {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.3) 0%, rgba(0, 153, 255, 0.3) 100%);
  border-color: rgba(0, 212, 255, 0.6);
  transform: scale(1.05);
}

/* Selected Elements Display */
.selected-elements {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.8);
  border-top: 1px solid rgba(0, 212, 255, 0.2);
  margin-top: -1px;
}

.selected-elements-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.selected-elements-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.clear-selection-btn {
  padding: 6px 12px;
  background: rgba(255, 59, 92, 0.1);
  border: 1px solid rgba(255, 59, 92, 0.3);
  border-radius: 6px;
  color: #ff3b5c;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.clear-selection-btn:hover {
  background: rgba(255, 59, 92, 0.2);
  border-color: rgba(255, 59, 92, 0.5);
  transform: scale(1.05);
}

/* Message Text Adjustments for Copy Button Space */
.ai-message .message-text {
  padding-right: 0; /* Copy button is outside now */
}

/* Typing Indicator */
.typing-indicator {
  opacity: 1;
  animation: fadeIn 0.3s ease-in;
}

.typing-dots {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-color, #00d4ff);
  animation: typingDot 1.4s infinite;
}

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

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

@keyframes typingDot {
  0%, 60%, 100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  30% {
    opacity: 1;
    transform: scale(1);
  }
}

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

.message {
  animation: fadeIn 0.3s ease-out;
}

/* Mode Message Styling */
.mode-message .message-text {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 153, 255, 0.1) 100%);
  border-left: 3px solid #00d4ff;
  padding: 16px;
  border-radius: 8px;
}

.mode-badge {
  display: inline-block;
  background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 12px;
}

/* Message formatting */
.message-text strong {
  font-weight: 600;
  color: #00d4ff;
}

.message-text em {
  font-style: italic;
  color: rgba(255, 255, 255, 0.8);
}

/* Clickable tags */
.clickable-tag {
  cursor: pointer;
  transition: all 0.3s ease;
}

.clickable-tag:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 212, 255, 0.4);
}

/* Enhanced Selected Elements Display with Animation */
.selected-elements {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Focus States for Accessibility */
.copy-btn-topright:focus-visible {
  outline: 2px solid #00d4ff;
  outline-offset: 2px;
}

.clear-selection-btn:focus-visible {
  outline: 2px solid #ff3b5c;
  outline-offset: 2px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .selected-elements {
    flex-wrap: wrap;
    padding: 10px 12px;
  }
  
  .selected-elements-label {
    width: 100%;
    margin-bottom: 4px;
  }
  
  .copy-btn-topright {
    width: 28px;
    height: 28px;
  }
  
  .copy-btn-topright svg {
    width: 14px;
    height: 14px;
  }
  
  .element-badge {
    font-size: 12px;
    padding: 3px 8px;
  }
  
  .message-content {
    padding-right: 35px;
  }
}

/* Dark Mode Enhancements */
@media (prefers-color-scheme: dark) {
  .copy-btn-topright {
    background: rgba(255, 255, 255, 0.08);
  }
  
  .element-badge {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.25) 0%, rgba(0, 153, 255, 0.25) 100%);
  }
}

/* Pulse animation for element badge when first selected */
@keyframes elementPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.7);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(0, 212, 255, 0);
  }
}

.element-badge.new {
  animation: elementPulse 1s ease-out;
}

/* Scrollbar styling */
.history-list::-webkit-scrollbar,
.modal-body::-webkit-scrollbar {
  width: 6px;
}

.history-list::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.3);
  border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 255, 0.5);
}

/* Improve copy button visibility on hover of message */
.ai-message:hover .copy-btn-topright {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Smooth transition for copy button appearance */
.copy-btn-topright {
  opacity: 0.7;
}

.ai-message:hover .copy-btn-topright {
  opacity: 1;
}


/* ===================================
   File Upload System Styles
   =================================== */

/* Upload Button */
.upload-file-btn {
  position: relative;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  margin-right: 8px;
}

.upload-file-btn svg {
  width: 20px;
  height: 20px;
  color: white;
}

.upload-file-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.upload-file-btn:active {
  transform: translateY(0);
}

.upload-hint {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  animation: uploadHintBounce 2s ease-in-out infinite;
  pointer-events: none;
}

.upload-hint::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #059669;
}

@keyframes uploadHintBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-5px); }
}

/* Upload Modal */
.upload-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

.upload-modal.active {
  display: flex;
}

.upload-modal .modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(12, 14, 44, 0.9);
  backdrop-filter: blur(10px);
}

.upload-modal-content {
  position: relative;
  background: linear-gradient(135deg, rgba(26, 29, 74, 0.95) 0%, rgba(12, 14, 44, 0.98) 100%);
  border: 1px solid rgba(111, 158, 255, 0.2);
  border-radius: 24px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.upload-modal .modal-header {
  padding: 24px 28px;
  border-bottom: 1px solid rgba(111, 158, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.upload-modal .modal-header h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--light);
  margin: 0;
  font-family: 'Orbitron', sans-serif;
}

.upload-modal .modal-body {
  padding: 28px;
  max-height: calc(80vh - 180px);
  overflow-y: auto;
}

/* Upload Dropzone */
.upload-dropzone {
  border: 2px dashed rgba(111, 158, 255, 0.3);
  border-radius: 16px;
  padding: 48px 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(111, 158, 255, 0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--accent);
  background: rgba(111, 158, 255, 0.08);
  transform: translateY(-2px);
}

.upload-dropzone svg {
  width: 64px;
  height: 64px;
  color: var(--accent);
  opacity: 0.8;
}

.upload-dropzone h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--light);
  margin: 0;
}

.upload-dropzone p {
  font-size: 14px;
  color: var(--grey);
  margin: 0;
}

.upload-dropzone .file-size-limit {
  font-size: 12px;
  color: var(--grey);
  opacity: 0.7;
}

/* Upload Progress */
.upload-progress {
  padding: 32px;
  text-align: center;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(111, 158, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
  border-radius: 4px;
  animation: progressPulse 1.5s ease-in-out infinite;
  width: 100%;
}

@keyframes progressPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.progress-text {
  font-size: 14px;
  color: var(--grey);
  margin: 0;
}

/* Uploaded Files List in Modal */
.uploaded-files-list {
  margin-top: 24px;
}

.uploaded-files-list .no-files {
  text-align: center;
  color: var(--grey);
  font-size: 14px;
  padding: 32px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(111, 158, 255, 0.05);
  border: 1px solid rgba(111, 158, 255, 0.1);
  border-radius: 12px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.file-item:hover {
  background: rgba(111, 158, 255, 0.08);
  border-color: rgba(111, 158, 255, 0.2);
  transform: translateX(4px);
}

.file-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.file-info {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--light);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  font-size: 12px;
  color: var(--grey);
}

.file-actions {
  display: flex;
  gap: 8px;
}

.file-action-btn {
  background: rgba(111, 158, 255, 0.1);
  border: 1px solid rgba(111, 158, 255, 0.2);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.file-action-btn svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.file-action-btn:hover {
  background: rgba(111, 158, 255, 0.2);
  transform: scale(1.1);
}

.file-action-btn.delete-file-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.3);
}

.file-action-btn.delete-file-btn:hover svg {
  color: var(--danger);
}

/* Uploaded Files Panel (in chat area) */
.uploaded-files-panel {
  background: linear-gradient(135deg, rgba(111, 158, 255, 0.08) 0%, rgba(111, 158, 255, 0.04) 100%);
  border: 1px solid rgba(111, 158, 255, 0.15);
  border-radius: 16px;
  margin-bottom: 16px;
  overflow: hidden;
}

.files-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(111, 158, 255, 0.05);
  cursor: pointer;
  user-select: none;
}

.files-panel-header span {
  font-size: 14px;
  font-weight: 600;
  color: var(--light);
}

.files-panel-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.files-panel-toggle svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.files-panel-toggle.collapsed svg {
  transform: rotate(-180deg);
}

.files-panel-content {
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(111, 158, 255, 0.1);
  border: 1px solid rgba(111, 158, 255, 0.2);
  border-radius: 20px;
  font-size: 13px;
  color: var(--light);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.file-chip:hover {
  background: rgba(111, 158, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(111, 158, 255, 0.2);
}

.file-chip.active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  border-color: var(--accent-light);
  box-shadow: 0 4px 12px rgba(111, 158, 255, 0.3);
}

.file-chip-icon {
  font-size: 16px;
}

.file-chip-name {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-chip-badge {
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: 8px;
  text-transform: uppercase;
}

.file-chip-remove {
  background: rgba(0, 0, 0, 0.2);
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: white;
  transition: all 0.3s ease;
  margin-left: 4px;
}

.file-chip-remove:hover {
  background: var(--danger);
  transform: scale(1.2);
}

/* Toast Notification Enhancements */
.toast.success {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.toast.error {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
}

.toast.info {
  background: linear-gradient(135deg, #6F9EFF 0%, #547dff 100%);
}

/* Responsive Design */
@media (max-width: 768px) {
  .upload-modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .upload-dropzone {
    padding: 32px 16px;
  }

  .upload-dropzone svg {
    width: 48px;
    height: 48px;
  }

  .file-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .file-actions {
    align-self: flex-end;
  }

  .file-chip-name {
    max-width: 100px;
  }
}

/* Scrollbar Styling for Modal */
.upload-modal .modal-body::-webkit-scrollbar {
  width: 8px;
}

.upload-modal .modal-body::-webkit-scrollbar-track {
  background: rgba(111, 158, 255, 0.05);
  border-radius: 4px;
}

.upload-modal .modal-body::-webkit-scrollbar-thumb {
  background: rgba(111, 158, 255, 0.3);
  border-radius: 4px;
}

.upload-modal .modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(111, 158, 255, 0.5);
}

/* Animation for file items */
@keyframes fileItemSlideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.file-item {
  animation: fileItemSlideIn 0.3s ease-out;
}

/* Loading state for file processing */
.file-item.processing {
  opacity: 0.6;
  pointer-events: none;
}

.file-item.processing::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(111, 158, 255, 0.2),
    transparent
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

#uploadedFilesPanel {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 0;
  margin: 0;
}

/* File chips */
.file-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 4px 10px;
  border-radius: 8px;
  color: white;
  font-size: 13px;
}

.file-chip-remove {
  cursor: pointer;
  font-weight: bold;
  opacity: 0.7;
}

.file-chip-remove:hover {
  opacity: 1;
  color: #ff4d4d;
}

.file-drop-zone {
  display: none;
  position: fixed;
  inset: 0;
  backdrop-filter: blur(4px);
  background: rgba(60, 80, 200, 0.15);
  border: 2px dashed rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  color: #fff;
  font-size: 22px;
  font-weight: 500;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: 0.2s ease-in-out;
}

.file-drop-zone.active {
  display: flex;
}

