/* Interactive Features Showcase - X Factor Implementation */

/* Main Features Section Redesign */
.main-simple {
  padding: 80px 0 120px 0;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  overflow: hidden;
  position: relative;
}

.main-simple::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(59, 130, 246, 0.3),
    transparent
  );
}

/* Header Section */
.features-header {
  text-align: center;
  margin-bottom: 60px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.features-header .h2 {
  margin-bottom: 20px;
  background: linear-gradient(135deg, #3d61df, #21dd90);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.features-header p {
  font-size: 18px;
  line-height: 28px;
  color: #64748b;
  margin-bottom: 40px;
}

/* Interactive Feature Categories */
.feature-categories {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.category-tab {
  padding: 12px 24px;
  border-radius: 50px;
  border: 2px solid transparent;
  background: white;
  color: #64748b;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.category-tab::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: left 0.5s ease;
}

.category-tab:hover::before {
  left: 100%;
}

.category-tab.active {
  background: linear-gradient(135deg, #3d61df, #21dd90);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(61, 97, 223, 0.3);
}

.category-tab.explore.active {
  background: linear-gradient(135deg, #3d61df, #6366f1);
}

.category-tab.challenge.active {
  background: linear-gradient(135deg, #f3b900, #f59e0b);
}

.category-tab.profit.active {
  background: linear-gradient(135deg, #e81c72, #ec4899);
}

.category-tab.float.active {
  background: linear-gradient(135deg, #21dd90, #10b981);
}

/* Flowing Features Container */
.flowing-features-container {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow: hidden;
  padding: 40px 0;
}

.flowing-features {
  display: flex;
  gap: 24px;
  animation: flowRight 60s linear infinite;
  width: fit-content;
}

.flowing-features.paused {
  animation-play-state: paused;
}

/* Individual Feature Cards */
.feature-card {
  flex-shrink: 0;
  width: 320px;
  height: 400px;
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3d61df, #21dd90);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.feature-card.explore::before {
  background: linear-gradient(90deg, #3d61df, #6366f1);
}

.feature-card.challenge::before {
  background: linear-gradient(90deg, #f3b900, #f59e0b);
}

.feature-card.profit::before {
  background: linear-gradient(90deg, #e81c72, #ec4899);
}

.feature-card.float::before {
  background: linear-gradient(90deg, #21dd90, #10b981);
}

/* Feature Card Content */
.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
}

.feature-title {
  font-size: 20px;
  font-weight: 900;
  color: #1e293b;
  margin-bottom: 12px;
  line-height: 1.3;
}

.feature-description {
  font-size: 14px;
  line-height: 1.6;
  color: #64748b;
  margin-bottom: 20px;
}

.feature-preview {
  background: #f8fafc;
  border-radius: 12px;
  padding: 16px;
  margin-top: auto;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.feature-card:hover .feature-preview {
  background: #f1f5f9;
  transform: translateY(-2px);
}

.preview-text {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.preview-content {
  font-size: 13px;
  color: #374151;
  font-weight: 500;
  line-height: 1.4;
}

/* Typing Animation */
.typing-animation {
  border-right: 2px solid #3d61df;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%,
  50% {
    border-color: #3d61df;
  }
  51%,
  100% {
    border-color: transparent;
  }
}

/* Flow Animation */
@keyframes flowRight {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Interactive Demo Section */
.interactive-demo {
  background: white;
  border-radius: 20px;
  padding: 40px;
  margin: 60px auto;
  max-width: 1000px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
}

.demo-header {
  text-align: center;
  margin-bottom: 30px;
}

.demo-title {
  font-size: 24px;
  font-weight: 900;
  color: #1e293b;
  margin-bottom: 12px;
}

.demo-subtitle {
  color: #64748b;
  font-size: 16px;
}

.demo-interface {
  background: #f8fafc;
  border-radius: 16px;
  padding: 24px;
  border: 2px solid #e2e8f0;
  position: relative;
  overflow: hidden;
}

.demo-interface::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(61, 97, 223, 0.1),
    transparent
  );
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-simple {
    padding: 60px 0 80px 0;
  }

  .features-header {
    margin-bottom: 40px;
    padding: 0 20px;
  }

  .features-header .h2 {
    font-size: 28px;
    line-height: 36px;
  }

  .category-tab {
    padding: 10px 20px;
    font-size: 13px;
  }

  .feature-card {
    width: 280px;
    height: 360px;
    padding: 24px;
  }

  .feature-title {
    font-size: 18px;
  }

  .flowing-features {
    gap: 16px;
  }

  .interactive-demo {
    margin: 40px 20px;
    padding: 30px 20px;
  }
}

/* Touch Optimizations */
@media (hover: none) and (pointer: coarse) {
  .feature-card:hover {
    transform: none;
  }

  .feature-card:active {
    transform: translateY(-4px) scale(0.98);
  }
}

/* Accessibility */
.feature-card:focus {
  outline: 3px solid #3d61df;
  outline-offset: 2px;
}

.category-tab:focus {
  outline: 3px solid #3d61df;
  outline-offset: 2px;
}

/* Performance Optimizations */
.flowing-features {
  will-change: transform;
}

.feature-card {
  will-change: transform;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .flowing-features {
    animation: none;
  }

  .feature-card {
    transition: none;
  }

  .typing-animation {
    animation: none;
    border-right: none;
  }
}
