.features {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5rem 0;
  width: 100%;
  background: linear-gradient(135deg, #F6F8FA 0%, #FFFFFF 50%, #F0F3F6 100%);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* Dark theme features section */
[data-theme='dark'] .features {
  background: linear-gradient(135deg, #161B22 0%, #21262D 50%, #161B22 100%);
}

.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 25% 25%, rgba(88, 166, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(253, 181, 22, 0.05) 0%, transparent 50%);
  pointer-events: none;
  animation: featuresBackgroundFlow 10s ease-in-out infinite;
  transition: all 0.3s ease;
}

/* Dark theme features background */
[data-theme='dark'] .features::before {
  background-image:
    radial-gradient(circle at 25% 25%, rgba(88, 166, 255, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(253, 181, 22, 0.08) 0%, transparent 50%);
}

.featuresHeader {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  z-index: 1;
}

.featuresTitle {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(45deg, #58A6FF, #FDB516, #A855F7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: featuresTitleGlow 4s ease-in-out infinite;
}

.featuresSubtitle {
  font-size: 1.2rem;
  color: #656D76;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
  transition: color 0.3s ease;
}

/* Dark theme subtitle */
[data-theme='dark'] .featuresSubtitle {
  color: #8B949E;
}

/* Goals Banner */
.goalsBanner {
  max-width: 900px;
  margin: 0 auto 3rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Goals Container */
.goalsContainer {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.bannerImage {
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(9, 105, 218, 0.15);
  transition: all 0.3s ease;
}

.bannerImage:hover {
  transform: scale(1.02);
  box-shadow: 0 16px 50px rgba(9, 105, 218, 0.25);
}

/* Dark theme banner */
[data-theme='dark'] .bannerImage {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

[data-theme='dark'] .bannerImage:hover {
  box-shadow: 0 16px 50px rgba(88, 166, 255, 0.3);
}

/* Goal Item */
.goalItem {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.2rem 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(88, 166, 255, 0.2);
  border-radius: 16px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(9, 105, 218, 0.08);
}

/* Dark theme goal item */
[data-theme='dark'] .goalItem {
  background: rgba(33, 38, 45, 0.9);
  border-color: rgba(88, 166, 255, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.goalItem:hover {
  transform: translateX(8px);
  border-color: rgba(88, 166, 255, 0.5);
  box-shadow: 0 8px 24px rgba(9, 105, 218, 0.15);
}

/* Dark theme goal item hover */
[data-theme='dark'] .goalItem:hover {
  border-color: rgba(88, 166, 255, 0.6);
  box-shadow: 0 8px 24px rgba(88, 166, 255, 0.2);
}

/* Goal Number */
.goalNumber {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #58A6FF, #0969DA);
  color: white;
  font-size: 1.3rem;
  font-weight: 800;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(9, 105, 218, 0.3);
  transition: all 0.3s ease;
}

.goalItem:hover .goalNumber {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 16px rgba(9, 105, 218, 0.4);
}

/* Goal Text */
.goalText {
  flex: 1;
  font-size: 1.05rem;
  color: #1F2328;
  font-weight: 600;
  line-height: 1.5;
  transition: color 0.3s ease;
}

/* Dark theme goal text */
[data-theme='dark'] .goalText {
  color: #F0F6FC;
}

.featureCard {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(88, 166, 255, 0.2);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  margin: 1rem;
  transition: all 0.4s ease;
  backdrop-filter: blur(15px);
  box-shadow:
    0 8px 32px rgba(9, 105, 218, 0.1),
    0 0 0 1px rgba(88, 166, 255, 0.1);
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* Dark theme feature card */
[data-theme='dark'] .featureCard {
  background: rgba(33, 38, 45, 0.9);
  border-color: rgba(88, 166, 255, 0.3);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(88, 166, 255, 0.2);
}

.featureCard::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(88, 166, 255, 0.05) 0%, transparent 50%, rgba(253, 181, 22, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

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

.featureCard:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow:
    0 20px 60px rgba(9, 105, 218, 0.2),
    0 0 0 1px rgba(88, 166, 255, 0.3),
    0 0 40px rgba(88, 166, 255, 0.2);
  border-color: rgba(88, 166, 255, 0.4);
}

/* Dark theme feature card hover */
[data-theme='dark'] .featureCard:hover {
  box-shadow:
    0 20px 60px rgba(88, 166, 255, 0.25),
    0 0 0 1px rgba(88, 166, 255, 0.4),
    0 0 40px rgba(88, 166, 255, 0.3);
  border-color: rgba(88, 166, 255, 0.5);
}

.featureTitle {
  color: #1F2328;
  font-weight: 800;
  margin: 0 0 1.5rem 0;
  font-size: 1.4rem;
  line-height: 1.3;
  position: relative;
  z-index: 1;
  background: linear-gradient(45deg, #0969DA, #FDB516);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.3s ease;
}

/* Dark theme feature title */
[data-theme='dark'] .featureTitle {
  color: #F0F6FC;
  background: linear-gradient(45deg, #58A6FF, #FDB516);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.featureDescription {
  color: #656D76;
  line-height: 1.7;
  margin-bottom: 0;
  font-size: 1rem;
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
}

/* Dark theme feature description */
[data-theme='dark'] .featureDescription {
  color: #8B949E;
}

.featureDescription strong {
  color: #0969DA;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(9, 105, 218, 0.2);
  transition: color 0.3s ease;
}

/* Dark theme strong text */
[data-theme='dark'] .featureDescription strong {
  color: #58A6FF;
  text-shadow: 0 0 8px rgba(88, 166, 255, 0.3);
}

/* Animations */
@keyframes featuresBackgroundFlow {
  0%, 100% {
    transform: translateX(0) translateY(0) rotate(0deg);
  }
  33% {
    transform: translateX(20px) translateY(-10px) rotate(1deg);
  }
  66% {
    transform: translateX(-10px) translateY(20px) rotate(-1deg);
  }
}

@keyframes featuresTitleGlow {
  0%, 100% {
    filter: drop-shadow(0 0 12px rgba(88, 166, 255, 0.4));
  }
  33% {
    filter: drop-shadow(0 0 16px rgba(253, 181, 22, 0.6));
  }
  66% {
    filter: drop-shadow(0 0 14px rgba(168, 85, 247, 0.5));
  }
}

/* Responsive Design */
@media screen and (max-width: 996px) {
  .featuresTitle {
    font-size: 2rem;
  }

  .featuresSubtitle {
    font-size: 1.1rem;
  }

  .featureCard {
    margin: 0.5rem;
    padding: 2rem 1.5rem;
  }

  .goalsBanner {
    margin-bottom: 2rem;
  }

  .goalsContainer {
    gap: 1.2rem;
  }

  .goalItem {
    padding: 1.2rem 1.5rem;
  }

  .goalText {
    font-size: 1.05rem;
  }
}

@media screen and (max-width: 768px) {
  .features {
    padding: 3rem 0;
  }

  .featuresHeader {
    margin-bottom: 2rem;
  }

  .featuresTitle {
    font-size: 1.8rem;
  }

  .featuresSubtitle {
    font-size: 1rem;
    padding: 0 1rem;
  }

  .featureCard {
    margin: 0.5rem 0;
    padding: 1.5rem;
  }

  .featureTitle {
    font-size: 1.2rem;
  }

  .featureDescription {
    font-size: 0.9rem;
  }

  .goalsBanner {
    margin-bottom: 1.5rem;
  }

  .goalsContainer {
    gap: 1rem;
  }

  .goalItem {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1rem;
    gap: 1rem;
  }

  .goalItem:hover {
    transform: translateY(-4px);
  }

  .goalNumber {
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
  }

  .goalText {
    font-size: 0.95rem;
  }

  .bannerImage {
    border-radius: 12px;
  }
}
