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

body {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell,
    sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

header {
  text-align: center;
  margin-bottom: 60px;
  animation: fadeInDown 0.6s ease-out;
}

h1 {
  color: white;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 15px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
  font-weight: 300;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.tool-card {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.tool-card:nth-child(1) {
  animation-delay: 0.1s;
}

.tool-card:nth-child(2) {
  animation-delay: 0.2s;
}

.tool-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.tool-icon {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  margin-bottom: 25px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tool-card:nth-child(2) .tool-icon {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.tool-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 15px;
}

.tool-description {
  font-size: 1.1rem;
  color: #718096;
  line-height: 1.6;
  margin-bottom: 25px;
}

.tool-meta {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 25px;
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: #edf2f7;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #4a5568;
  font-weight: 500;
}

.meta-badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #48bb78;
  margin-right: 8px;
}

.launch-button {
  width: 100%;
  padding: 16px 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.3s ease;
  text-align: center;
}

.tool-card:nth-child(2) .launch-button {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.launch-button:hover {
  opacity: 0.9;
}

footer {
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 40px;
  animation: fadeIn 0.6s ease-out 0.4s both;
}

footer p {
  font-size: 0.95rem;
}

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

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

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

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .tools-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .tool-card {
    padding: 30px;
  }

  .tool-title {
    font-size: 1.5rem;
  }

  .tool-description {
    font-size: 1rem;
  }
}

.status-indicator {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(72, 187, 120, 0.1);
  color: #2f855a;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 10px;
}

.version {
  font-size: 0.875rem;
  color: #a0aec0;
  margin-top: 10px;
}

/* Chat Widget Styles */
#chat-widget-button {
  position: fixed;
  bottom: 24px;
  right: 24px;
  min-width: 56px;
  height: 56px;
  padding: 0 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 28px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 1000;
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
}

#chat-widget-button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

#chat-widget-button svg {
  width: 24px;
  height: 24px;
  color: white;
  flex-shrink: 0;
}

#chat-widget-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 380px;
  height: 600px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: none;
  flex-direction: column;
  z-index: 1001;
  overflow: hidden;
}

#chat-widget-container.open {
  display: flex;
}

#chat-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#chat-header h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

#chat-header-buttons {
  display: flex;
  gap: 8px;
}

#chat-header button {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.2s;
}

#chat-header button:hover {
  background: rgba(255, 255, 255, 0.2);
}

#chat-header button svg {
  width: 20px;
  height: 20px;
}

#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#chat-messages::-webkit-scrollbar {
  width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
  background: #f1f1f1;
}

#chat-messages::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.chat-message {
  display: flex;
  animation: slideIn 0.3s ease;
}

.chat-message.user {
  justify-content: flex-end;
}

.chat-message-content {
  max-width: 80%;
  padding: 12px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
  word-wrap: break-word;
}

.chat-message.user .chat-message-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.chat-message.assistant .chat-message-content {
  background: white;
  color: #2d3748;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chat-empty {
  text-align: center;
  color: #718096;
  margin-top: 60px;
}

.chat-empty svg {
  width: 64px;
  height: 64px;
  color: #cbd5e0;
  margin-bottom: 16px;
}

.chat-loading {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  width: fit-content;
}

.chat-loading-dot {
  width: 8px;
  height: 8px;
  background: #718096;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.chat-loading-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.chat-loading-dot:nth-child(2) {
  animation-delay: -0.16s;
}

#chat-input-form {
  padding: 16px;
  border-top: 1px solid #e2e8f0;
  background: white;
  display: flex;
  gap: 8px;
}

#chat-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

#chat-input:focus {
  border-color: #667eea;
}

#chat-send-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
}

#chat-send-button:hover:not(:disabled) {
  opacity: 0.9;
}

#chat-send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#chat-send-button svg {
  width: 20px;
  height: 20px;
}

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

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}
