* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Heebo", sans-serif;
  background: #0b1426; /* Modern dark blue base */
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  color: #ffffff;
  animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced background with modern gradient and glow */
.space-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    #0b1426 0%,
    #1a2f5c 25%,
    #2d1b69 50%,
    #4c1d95 75%,
    #6b46c1 100%
  );
  z-index: -3;
}

.space-background::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 20% 80%,
      rgba(251, 191, 36, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(34, 211, 238, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(168, 85, 247, 0.1) 0%,
      transparent 50%
    );
  z-index: -2;
}

/* Improved stars with golden and cyan colors */
.stars {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
      2px 2px at 20px 30px,
      rgba(250, 204, 21, 0.8),
      transparent
    ),
    radial-gradient(1px 1px at 40px 70px, rgba(34, 211, 238, 0.6), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(250, 204, 21, 0.9), transparent),
    radial-gradient(2px 2px at 130px 80px, rgba(34, 211, 238, 0.7), transparent),
    radial-gradient(1px 1px at 160px 30px, rgba(168, 85, 247, 0.5), transparent);
  background-repeat: repeat;
  background-size: 300px 200px;
  z-index: -2;
  opacity: 0.7;
}

/* Keeping particles hidden for performance */
.floating-particles {
  display: none;
}

.header {
  text-align: center;
  padding: 4.5rem 1rem 3.5rem; /* Slightly more space */
  position: relative;
  z-index: 10;
}

.header-content {
  position: relative;
  z-index: 2;
}

/* Enhanced title with modern gradient text and animation */
.main-title {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 200;
  background: linear-gradient(135deg, #fbbf24, #22d3ee, #a855f7, #fbbf24);
  background-size: 300% 300%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(251, 191, 36, 0.6), 0 4px 8px rgba(0, 0, 0, 0.8);
  margin-bottom: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  letter-spacing: 3px;
  animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.title-icon {
  font-size: 0.8em;
  color: #fbbf24; /* Golden */
  filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.9));
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.9));
  }
  50% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 30px rgba(34, 211, 238, 0.9));
  }
}

.subtitle {
  font-size: clamp(1rem, 3vw, 1.4rem);
  color: rgba(255, 255, 255, 0.9); /* Improved contrast */
  font-weight: 300;
  margin-bottom: 3.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 5;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  margin-bottom: 4.5rem;
}

/* Enhanced feature cards with modern colors and glow effect */
.feature-card {
  background: rgba(26, 47, 92, 0.5); /* Modern blue background */
  border: 1px solid rgba(250, 204, 21, 0.4);
  border-radius: 18px;
  padding: 2.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.feature-card::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #fbbf24, #22d3ee, #a855f7, #fbbf24);
  background-size: 400% 400%;
  border-radius: 20px;
  z-index: -1;
  opacity: 0;
  animation: borderGlow 3s ease-in-out infinite;
  transition: opacity 0.3s ease;
}

.feature-card:hover::after {
  opacity: 1;
}

@keyframes borderGlow {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.feature-card:hover {
  transform: translateY(-7px) scale(1.02);
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 15px 40px rgba(34, 211, 238, 0.25);
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #fbbf24, #22d3ee, #a855f7);
}

.feature-icon {
  font-size: 2.7rem;
  margin-bottom: 1.2rem;
  display: block;
  color: #fbbf24; /* Golden yellow */
}

.feature-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  background: linear-gradient(135deg, #22d3ee, #a855f7);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.feature-description {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.7;
  font-size: 1.05rem;
}

.chat-interface {
  background: rgba(26, 47, 92, 0.6);
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: 24px;
  overflow: hidden;
  margin: 2.5rem 0;
  backdrop-filter: blur(15px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.35);
}

.chat-header {
  background: linear-gradient(
    135deg,
    rgba(251, 191, 36, 0.3),
    rgba(34, 211, 238, 0.3)
  );
  padding: 1.7rem;
  border-bottom: 1px solid rgba(34, 211, 238, 0.4);
  text-align: center;
}

.chat-header h3 {
  background: linear-gradient(135deg, #fbbf24, #22d3ee);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

#messagesArea {
  height: 450px; /* Slightly taller chat area */
  overflow-y: auto;
  padding: 1.7rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  background: rgba(13, 28, 23, 0.4); /* Slightly darker for contrast */
}

.message {
  max-width: 80%;
  padding: 1.2rem 1.7rem;
  border-radius: 20px;
  word-wrap: break-word;
  line-height: 1.6;
  position: relative;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.user {
  background: rgba(97, 218, 103, 0.25);
  border: 1px solid rgba(97, 218, 103, 0.5);
  margin-right: 0;
  margin-left: auto;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.message.ai {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin-left: 0;
  margin-right: auto;
  color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.message.error {
  background: rgba(255, 89, 89, 0.25); /* Brighter red */
  border: 1px solid rgba(255, 89, 89, 0.5);
  color: #ffffff;
  margin-left: 0;
  margin-right: auto;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.empty-state-icon {
  font-size: 3.5rem;
  margin-bottom: 1.2rem;
  opacity: 0.8;
  color: #61da67; /* Brighter green */
}

.empty-state-text {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.7rem;
  color: rgba(255, 255, 255, 0.9);
}

.empty-state-subtext {
  font-size: 1rem;
  opacity: 0.8;
}

.input-container {
  padding: 1.7rem;
  border-top: 1px solid rgba(97, 218, 103, 0.4);
  background: rgba(97, 218, 103, 0.07);
}

.input-wrapper {
  display: flex;
  gap: 1.2rem;
  align-items: end;
}

#promptInput {
  flex: 1;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(97, 218, 103, 0.4);
  border-radius: 14px;
  padding: 1.2rem 1.7rem;
  color: #ffffff;
  font-size: 1.05rem;
  resize: none;
  min-height: 55px;
  max-height: 140px;
  font-family: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#promptInput:focus {
  outline: none;
  border-color: rgba(97, 218, 103, 0.7);
  box-shadow: 0 0 0 3px rgba(97, 218, 103, 0.25);
}

#promptInput::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

#sendBtn {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border: none;
  border-radius: 14px;
  padding: 1.1rem 2.2rem;
  color: white;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 110px;
  height: 55px;
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
  position: relative;
  overflow: hidden;
}

#sendBtn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

#sendBtn:hover::before {
  left: 100%;
}

#sendBtn:hover:not(:disabled) {
  background: linear-gradient(135deg, #22d3ee, #06b6d4);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(34, 211, 238, 0.5);
}

#sendBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Improved typing indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.2rem 1.7rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  margin-left: 0;
  margin-right: auto;
  max-width: 80%;
  color: rgba(255, 255, 255, 0.8);
}

.typing-dots {
  display: flex;
  gap: 5px;
}

.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(97, 218, 103, 0.7);
  animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}
.typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}
.typing-dot:nth-child(3) {
  animation-delay: 0s;
}

@keyframes typingBounce {
  0%,
  80%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .header {
    padding: 1rem;
    min-height: auto;
  }

  .logo {
    width: 40px;
    height: 40px;
  }

  .site-title {
    font-size: 18px;
  }

  .main-title {
    font-size: clamp(2rem, 8vw, 3rem);
    gap: 1rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .feature-card {
    padding: 1.5rem;
  }

  .message {
    max-width: 95%;
  }

  .input-wrapper {
    flex-direction: column;
    gap: 1rem;
  }

  #sendBtn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.5rem;
  }

  .header {
    padding: 0.5rem 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  }

  .logo {
    width: 35px;
    height: 35px;
    margin-left: 8px;
  }

  .site-title {
    font-size: 16px;
  }

  .content {
    padding: 0.5rem;
    height: calc(100vh - 70px);
    overflow-y: auto;
  }

  .chat-interface {
    margin: 0.5rem 0;
    border-radius: 16px;
    height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
  }

  #messagesArea {
    height: calc(100vh - 200px);
    padding: 1rem;
    flex: 1;
    overflow-y: auto;
  }

  .input-container {
    padding: 1rem;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    background: rgba(97, 218, 103, 0.07);
    border-top: 1px solid rgba(97, 218, 103, 0.4);
  }
}

/* Added scrollbar styling for better UX */
#messagesArea::-webkit-scrollbar {
  width: 8px;
}

#messagesArea::-webkit-scrollbar-track {
  background: rgba(13, 28, 23, 0.4);
}

#messagesArea::-webkit-scrollbar-thumb {
  background: rgba(97, 218, 103, 0.3);
  border-radius: 4px;
}

#messagesArea::-webkit-scrollbar-thumb:hover {
  background: rgba(97, 218, 103, 0.5);
}

/* הסרתי את כל האנימציות הכבדות והשארתי רק את הנחוצות ביותר */
