/* Premium Animations & Rich Content - Match Madgicx.com Quality */

/* Madgicx-Style Animated Button with Rotating Border */
@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.animated-button {
  position: relative;
  display: inline-block;
  padding: 1.125rem 2.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.125rem;
  transition: all 0.3s ease;
  z-index: 1;
  overflow: hidden;
}

.animated-button::after,
.animated-button::before {
  content: '';
  position: absolute;
  height: 100%;
  width: 100%;
  background-image: conic-gradient(from var(--angle), transparent 50%, #917aff);
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  z-index: -1;
  padding: 1px;
  border-radius: 999px;
  animation: 3s spin linear infinite;
}

.animated-button::before {
  filter: blur(1.5rem);
  opacity: 0.5;
}

@keyframes spin {
  from {
    --angle: 0deg;
  }
  to {
    --angle: 360deg;
  }
}

.animated-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.4);
}

/* Madgicx-Style Animated Screen Border */
@property --angleScreen {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@property --angleScreenTwo {
  syntax: "<angle>";
  initial-value: 360deg;
  inherits: false;
}

.animated-screen {
  position: relative;
  display: inline-block;
}

.animated-screen::after,
.animated-screen::before {
  content: '';
  position: absolute;
  height: 100%;
  width: 100%;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  z-index: -1;
  padding: 1px;
  border-radius: 40px;
}

.animated-screen::after {
  background-image: conic-gradient(from var(--angleScreen), transparent 95%, #cab7ff);
  animation: 9s spinScreen linear infinite;
}

.animated-screen::before {
  background-image: conic-gradient(from var(--angleScreenTwo), #cab7ff, transparent 5%);
  animation: 9s spinScreenTwo linear infinite;
}

@keyframes spinScreen {
  from {
    --angleScreen: 0deg;
  }
  to {
    --angleScreen: 360deg;
  }
}

@keyframes spinScreenTwo {
  from {
    --angleScreenTwo: 360deg;
  }
  to {
    --angleScreenTwo: 0deg;
  }
}

@media (max-width: 767px) {
  .animated-screen::after,
  .animated-screen::before {
    border-radius: 24px;
  }
}

/* Floating Animation */
@keyframes float {
  0%, 100% { 
    transform: translateY(0px) rotate(0deg); 
  }
  50% { 
    transform: translateY(-20px) rotate(2deg); 
  }
}

/* Pulse Glow Effect */
@keyframes pulse-glow {
  0%, 100% { 
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4),
                0 0 40px rgba(139, 92, 246, 0.2);
  }
  50% { 
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.8),
                0 0 80px rgba(139, 92, 246, 0.4);
  }
}

/* Shimmer Effect */
@keyframes shimmer {
  0% { 
    background-position: -1000px 0; 
  }
  100% { 
    background-position: 1000px 0; 
  }
}

/* Slide In Up */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade In */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Scale In */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Gradient Shift */
@keyframes gradientShift {
  0%, 100% { 
    transform: translate(0, 0) rotate(0deg); 
  }
  33% { 
    transform: translate(30px, 30px) rotate(120deg); 
  }
  66% { 
    transform: translate(-20px, 20px) rotate(240deg); 
  }
}

/* Rich Content Sections */
.rich-content-section {
  position: relative;
  overflow: hidden;
  padding: 4rem 0;
}

.animated-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 40% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
  animation: gradientShift 20s ease infinite;
  z-index: 0;
  pointer-events: none;
}

/* Interactive Cards */
.interactive-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.interactive-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.3);
}

/* GIF Container */
.gif-container {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  background: rgba(15, 23, 42, 0.5);
}

.gif-container img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.gif-container:hover img {
  transform: scale(1.05);
}

/* Video Demo */
.video-demo {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
  background: rgba(15, 23, 42, 0.8);
}

.video-demo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Stats Counter */
.stats-counter {
  font-size: 3.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pulse-glow 2s ease-in-out infinite;
  line-height: 1.2;
}

/* Feature Icons */
.feature-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-icon:hover {
  transform: scale(1.1) rotate(5deg);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.4) 0%, rgba(139, 92, 246, 0.4) 100%);
}

.feature-icon:hover::before {
  opacity: 1;
}

/* Tool Preview */
.tool-preview {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.tool-preview:hover {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.2);
  transform: translateY(-4px);
}

/* Premium CTA Button */
.cta-button-premium {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
  padding: 1rem 2rem;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.cta-button-premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.cta-button-premium:hover::before {
  left: 100%;
}

.cta-button-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.4);
}

.cta-button-premium:active {
  transform: translateY(0);
}

/* Animated Text */
.animated-text {
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
  background-size: 200% 100%;
}

/* Scroll Animations */
.fade-in-up {
  animation: slideInUp 0.6s ease-out;
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.scale-in {
  animation: scaleIn 0.6s ease-out;
}

/* Section Separators (Madgicx Style) */
.section-separator {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
  opacity: 0.1;
  transition: opacity 0.3s ease;
}

.section-separator.is-visible {
  opacity: 1;
}

.section-separator.is-desktop {
  display: block;
}

.section-separator.is-mobile {
  display: none;
}

@media (max-width: 479px) {
  .section-separator.is-desktop {
    display: none;
  }
  
  .section-separator.is-mobile {
    display: block;
  }
}

/* Screen Component (for screenshots with animated borders) */
.screen-component {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.8);
}

.screen-component img {
  width: 100%;
  height: auto;
  display: block;
}

/* Feature Screen Component (with side features) */
.features-screen-component {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
}

.features-screen-features {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.features-screen-feature {
  position: relative;
  padding-left: 2rem;
}

.features-screen-feature::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 1px;
  height: calc(100% - 1rem);
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.5) 0%, transparent 100%);
}

.features-screen-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.features-screen-description {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Scroll-triggered Animations */
.is-first-scroll-in,
.is-second-scroll-in,
.is-third-scroll-in,
.is-fourth-scroll-in {
  opacity: 0;
  transform: translate3d(0px, 3rem, 0px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.is-first-scroll-in.visible,
.is-second-scroll-in.visible,
.is-third-scroll-in.visible,
.is-fourth-scroll-in.visible {
  opacity: 1;
  transform: translate3d(0px, 0rem, 0px);
}

/* Tabbed Hero Section (Madgicx Style) */
.screen-tabs_component {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.screen-tabs_menu {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.screen-tabs_link {
  padding: 1rem 2rem;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  position: relative;
}

.screen-tabs_link:hover {
  color: rgba(255, 255, 255, 0.9);
}

.screen-tabs_link.w--current {
  color: #FFFFFF;
  border-bottom-color: #6366F1;
}

.screen-tabs_content {
  position: relative;
  min-height: 600px;
}

.screen-tabs_pane {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.screen-tabs_pane.w--tab-active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
}

.screen-tabs_img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Video Embed Styles */
.screen_video {
  position: relative;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  background: rgba(15, 23, 42, 0.8);
}

.screen_video video {
  width: 100%;
  height: auto;
  display: block;
}

/* Hero Grid (AI Ads Style) */
.opt-hero_component {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.opt-hero_scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.opt-hero_scroll::-webkit-scrollbar {
  display: none;
}

.opt-hero_grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1rem 0;
  min-width: min-content;
}

.opt-hero_width {
  min-width: 300px;
}

.opt-hero_img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

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

.opt-hero_anim {
  will-change: transform;
  transition: transform 0.3s ease;
}

.opt-hero_back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.opt-hero_back_item {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
  border-radius: 20px;
}

.opt-hero_back_anim {
  will-change: transform;
  animation: floatBackground 6s ease-in-out infinite;
}

.opt-hero_back_anim.is-second {
  animation-delay: -1.5s;
}

.opt-hero_back_anim.is-third {
  animation-delay: -3s;
}

.opt-hero_back_anim.is-fourth {
  animation-delay: -4.5s;
}

@keyframes floatBackground {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* CTA Component */
.cta_component {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 4rem 0;
}

.cta_text {
  z-index: 1;
}

.cta_title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  color: var(--text-primary);
}

.cta_par {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.cta_buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.cta_component img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
  .stats-counter {
    font-size: 2.5rem;
  }
  
  .feature-icon {
    width: 48px;
    height: 48px;
  }
  
  .features-screen-component {
    grid-template-columns: 1fr;
  }
  
  .features-screen-features {
    order: 2;
  }
  
  .screen-component {
    order: 1;
  }
  
  .screen-tabs_menu {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .screen-tabs_link {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }
  
  .opt-hero_grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .opt-hero_width {
    min-width: 200px;
  }
  
  .cta_component {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .cta_title {
    font-size: 2rem;
  }
}

@media (max-width: 479px) {
  .opt-hero_grid {
    grid-template-columns: 1fr;
  }
  
  .opt-hero_width {
    min-width: 100%;
  }
}
