.features {
  padding: 6rem 0;
  background: linear-gradient(135deg, var(--ifm-color-emphasis-50) 0%, var(--ifm-background-color) 100%);
  border-top: 1px solid var(--ifm-color-emphasis-200);
  position: relative;
  overflow: hidden;
}

.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 70% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 30% 80%, rgba(236, 72, 153, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.featuresHeader {
  text-align: center;
  margin-bottom: 4rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 2;
}

.featuresTitle {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--ifm-font-color-base);
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, var(--ifm-font-color-base) 0%, var(--ifm-color-emphasis-600) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.featuresSubtitle {
  font-size: 1.125rem;
  color: var(--ifm-color-emphasis-700);
  line-height: 1.6;
  margin: 0;
  font-weight: 400;
}

.featureCard {
  background: var(--ifm-background-color);
  border: 1px solid var(--ifm-color-emphasis-200);
  border-radius: 16px;
  padding: 2.5rem;
  height: 100%;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.featureCard::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #ec4899, #a855f7);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.featureCard::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.02) 0%, rgba(236, 72, 153, 0.02) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.featureCard:hover::before {
  opacity: 1;
}

.featureCard:hover::after {
  opacity: 1;
}

.featureCard:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
}

[data-theme='dark'] .featureCard {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

[data-theme='dark'] .featureCard:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.featureHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
}

.featureIcon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--ifm-color-emphasis-100) 0%, var(--ifm-color-emphasis-200) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ifm-color-emphasis-700);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.featureIcon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.featureIcon svg {
  position: relative;
  z-index: 2;
  transition: transform 0.4s ease;
}

.featureCard:hover .featureIcon::before {
  opacity: 1;
}

.featureCard:hover .featureIcon {
  color: white;
  transform: scale(1.1) rotate(5deg);
}

.featureCard:hover .featureIcon svg {
  transform: scale(1.1);
}

.featureMetric {
  text-align: right;
  position: relative;
  z-index: 2;
}

.metricNumber {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--ifm-font-color-base);
  line-height: 1;
  margin-bottom: 0.25rem;
  background: linear-gradient(135deg, var(--ifm-font-color-base) 0%, var(--ifm-color-emphasis-600) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.metricLabel {
  font-size: 0.75rem;
  color: var(--ifm-color-emphasis-700);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.featureContent {
  flex: 1;
  position: relative;
  z-index: 2;
}

.featureTitle {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--ifm-font-color-base);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.featureDescription {
  color: var(--ifm-color-emphasis-700);
  line-height: 1.7;
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
}

.featureDescription code {
  background: linear-gradient(135deg, var(--ifm-color-emphasis-100) 0%, var(--ifm-color-emphasis-200) 100%);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--ifm-font-color-base);
  font-weight: 600;
  border: 1px solid var(--ifm-color-emphasis-200);
}

@media screen and (max-width: 996px) {
  .features {
    padding: 4rem 0;
  }
  
  .featuresTitle {
    font-size: 2rem;
  }
  
  .featuresHeader {
    margin-bottom: 3rem;
  }
  
  .featureCard {
    margin-bottom: 2rem;
    padding: 2rem;
  }
  
  .featureIcon {
    width: 48px;
    height: 48px;
  }
}

@media screen and (max-width: 768px) {
  .features {
    padding: 3rem 0;
  }
  
  .featuresTitle {
    font-size: 1.75rem;
  }
  
  .featuresSubtitle {
    font-size: 1rem;
  }
  
  .featureCard {
    padding: 1.5rem;
  }
  
  .featureHeader {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .featureMetric {
    text-align: left;
    align-self: flex-end;
  }
  
  .featureIcon {
    width: 44px;
    height: 44px;
  }
}
