*
{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.ai-dashboard-container
{
  padding: 100px 0 20px 0;
  max-width: 1200px;
  margin: 0 auto;
}

.ai-dashboard-header
{
  text-align: center;
  margin-bottom: 40px;
  animation: aiFadeInDown 0.8s ease-out;
}

.ai-dashboard-header h1
{
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.ai-dashboard-header p
{
  color: #64748b;
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.ai-dashboard
{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 25px;
}

.ai-provider-card
{
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: all 0.3s ease;
  animation: aiFadeInUp 0.6s ease-out;
  border: 1px solid #e2e8f0;
}

.ai-provider-card:hover
{
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.ai-provider-card.ai-active-provider
{
  border: 2px solid #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.ai-provider-header
{
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.ai-provider-header::after
{
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 20px;
  background: #ffffff;
  border-radius: 50% 50% 0 0;
}

.ai-provider-info
{
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-provider-icon
{
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.ai-provider-name
{
  font-size: 1.4rem;
  font-weight: 700;
}

.ai-provider-status
{
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

.ai-active-status
{
  background: #10b981;
}

.ai-provider-content
{
  padding: 25px 20px 20px;
}

.ai-api-key-section
{
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
}

.ai-api-key-label
{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-weight: 600;
  color: #1e293b;
  font-size: 0.95rem;
}

.ai-api-key-display
{
  width: 100%;
  padding: 12px 15px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-api-key-actions
{
  display: flex;
  gap: 10px;
}

.ai-btn
{
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-btn-primary
{
  background: #6366f1;
  color: white;
}

.ai-btn-primary:hover
{
  background: #4f46e5;
  transform: translateY(-2px);
}

.ai-btn-success
{
  background: #10b981;
  color: white;
}

.ai-btn-success:hover
{
  background: #0da271;
  transform: translateY(-2px);
}

.ai-btn-secondary
{
  background: #f8fafc;
  color: #1e293b;
  border: 1px solid #e2e8f0;
}

.ai-btn-secondary:hover
{
  background: #e2e8f0;
  transform: translateY(-2px);
}

.ai-models-section h3
{
  margin-bottom: 15px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
}

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

.ai-model-item
{
  background: #f8fafc;
  padding: 15px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.ai-model-item:hover
{
  background: #f1f5f9;
}

.ai-model-info
{
  flex-grow: 1;
}

.ai-model-name
{
  font-weight: 600;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-model-status
{
  font-size: 0.8rem;
  color: #64748b;
}

.ai-active-indicator
{
  color: #10b981;
  font-weight: 600;
}

.ai-activate-btn
{
  background: #10b981;
  color: white;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.ai-activate-btn:hover
{
  background: #0da271;
  transform: translateY(-2px);
}

.ai-active-model
{
  background: #e8f6f3;
  border-left: 4px solid #10b981;
}

/* Modal Styles */
.ai-modal
{
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
  animation: aiFadeIn 0.3s ease-out;
}

.ai-modal-content
{
  background-color: white;
  padding: 30px;
  border-radius: 16px;
  width: 90%;
  max-width: 480px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: aiSlideUp 0.4s ease-out;
}

.ai-modal-header
{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e2e8f0;
}

.ai-modal-title
{
  font-size: 1.4rem;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-close-btn
{
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #64748b;
  transition: color 0.2s;
}

.ai-close-btn:hover
{
  color: #0f172a;
}

.ai-modal-body
{
  margin-bottom: 25px;
}

.ai-form-group
{
  margin-bottom: 20px;
}

.ai-form-label
{
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-form-input
{
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.ai-form-input:focus
{
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.ai-modal-footer
{
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.ai-notification
{
  position: fixed;
  top: 30px;
  right: 30px;
  padding: 16px 20px;
  border-radius: 10px;
  color: white;
  font-weight: 600;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transform: translateX(150%);
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-notification.ai-show
{
  transform: translateX(0);
}

.ai-notification.ai-success
{
  background: #10b981;
}

.ai-notification.ai-error
{
  background: #ef4444;
}

.ai-stats-bar
{
  display: flex;
  justify-content: space-between;
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  animation: aiFadeIn 0.8s ease-out;
}

.ai-stat-item
{
  text-align: center;
  flex: 1;
}

.ai-stat-value
{
  font-size: 2rem;
  font-weight: 800;
  color: #6366f1;
  margin-bottom: 5px;
}

.ai-stat-label
{
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 600;
}

/* Animations */
@keyframes aiFadeIn
{
  from
  {
    opacity: 0;
  }

  to
  {
    opacity: 1;
  }
}

@keyframes aiFadeInDown
{
  from
  {
    opacity: 0;
    transform: translateY(-20px);
  }

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

@keyframes aiFadeInUp
{
  from
  {
    opacity: 0;
    transform: translateY(20px);
  }

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

@keyframes aiSlideUp
{
  from
  {
    opacity: 0;
    transform: translateY(30px);
  }

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

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

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

.ai-provider-card:nth-child(3)
{
  animation-delay: 0.3s;
}

.ai-provider-card:nth-child(4)
{
  animation-delay: 0.4s;
}

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

  .ai-stats-bar
  {
    flex-direction: column;
    gap: 20px;
  }

  .ai-dashboard-header h1
  {
    font-size: 2rem;
  }
}