/* Cursor Trail Effect - September 2025 */
/* Navigation styles handled by shared-header.js component */

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--lovelace-header-height, 96px) + 2rem) 2rem 2rem 2rem;
  position: relative;
  background: transparent;
}

/* Dark hero for dark theme */
body.dark-theme .hero {
  background: transparent;
}

.hero-content {
  max-width: 700px;
  z-index: 1;
  margin-right: auto;
  margin-left: auto;
}

.hero h1 {
  margin-bottom: 1.5rem;
  line-height: 1.1;
  animation: fadeInUp 1s ease 0.2s both;
  position: relative;
  filter: drop-shadow(0 1px 6px rgba(79, 172, 254, 0.15));
}

.hero .gradient-page-title {
  font-size: clamp(3.25rem, 8vw, 5rem);
  position: relative;
  display: inline-block;
  z-index: 0;
}

.hero .gradient-page-title::after {
  display: none;
}

/* Enhanced text glow on hover */
.hero h1:hover {
  filter: drop-shadow(0 2px 10px rgba(79, 172, 254, 0.15));
  transform: scale(1.01);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hero .subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease 0.4s both;
}

/* Floating Hero Card - September 2025 Enhanced */
@media (min-width: 1200px) {
  .hero-card {
    position: absolute;
    left: calc(50% + 350px); /* Moved even further right to clear content */
    top: calc(50% - 200px); /* Positioned to avoid header overlap */
    transform: translateY(-50%);
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.9), rgba(40, 40, 40, 0.8));
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 2rem;
    width: 300px; /* Restored original size */
    animation: floatCard 6s ease-in-out infinite;
    z-index: 2;
    box-shadow:
      0 20px 50px rgba(0, 0, 0, 0.5),
      0 0 40px rgba(79, 172, 254, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  }

  .hero-card:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow:
      0 30px 70px rgba(0, 0, 0, 0.6),
      0 0 60px rgba(79, 172, 254, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }
}

@media (max-width: 1199px) {
  .hero-card {
    display: none;
  }
}

.hero-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(79, 172, 254, 0.15) 0%, transparent 70%);
  animation: rotate-glow 20s linear infinite;
}

@keyframes rotate-glow {
  0% {
    opacity: 0.1;
  }
  50% {
    opacity: 0.15;
  }
  100% {
    opacity: 0.1;
  }
}

@keyframes floatCard {
  0%,
  100% {
    transform: translateY(-50%) translateX(0);
  }
  25% {
    transform: translateY(-60%) translateX(10px);
  }
  50% {
    transform: translateY(-40%) translateX(-5px);
  }
  75% {
    transform: translateY(-55%) translateX(5px);
  }
}

.hero-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.hero-card-asset {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.asset-icon {
  width: 24px;
  height: 24px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.8rem;
}

.hero-card-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #43e97b;
}

.hero-card-change {
  font-size: 0.9rem;
  color: #43e97b;
}

.hero-card-buttons {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}

.card-btn {
  flex: 1;
  padding: 0.75rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}

.card-btn.long {
  background: var(--success-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(67, 233, 123, 0.3);
}

.card-btn.short {
  background: linear-gradient(135deg, #ff6b6b, #ff4757);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.card-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.card-btn:active {
  transform: translateY(0) scale(0.98);
}

/* Ripple effect on card buttons */
.card-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

.card-btn:active::after {
  width: 300px;
  height: 300px;
}

.hero-card-details {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.hero-card-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin: 3rem 0;
  animation: fadeInUp 1s ease 0.6s both;
}

.stat-item {
  text-align: center;
  position: relative;
  padding: 1.5rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), transparent);
  backdrop-filter: blur(10px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
}

/* Enhanced glow effect on stat items */
.stat-item::before {
  content: "";
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: radial-gradient(circle, rgba(79, 172, 254, 0.15) 0%, transparent 40%);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.stat-item:hover::before {
  opacity: 1;
  animation: rotate-slow 8s linear infinite;
}

@keyframes rotate-slow {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.stat-item::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  background: linear-gradient(45deg, transparent, rgba(79, 172, 254, 0.15), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.stat-item:hover {
  transform: translateY(-5px) scale(1.05);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.2),
    0 0 30px rgba(79, 172, 254, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.stat-item:hover::after {
  opacity: 1;
  animation: gradient-sweep 3s linear infinite;
}

@keyframes gradient-sweep {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 50%, #4facfe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(79, 172, 254, 0.15));
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.5rem;
  transition: color 0.4s ease;
}

.stat-item:hover .stat-label {
  color: var(--text-secondary);
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease 0.8s both;
  position: relative;
  z-index: 2;
}

/* Enhanced CTA buttons with September 2025 micro-interactions */
.hero-cta .btn-primary,
.hero-cta .btn-secondary {
  will-change: transform;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.hero-cta .btn-primary:active,
.hero-cta .btn-secondary:active {
  transform: translateY(-1px) scale(0.98);
  transition: transform 0.1s ease;
}

/* Features Section */
.features {
  padding: 3rem 2rem;
  background: transparent;
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Dark features for dark theme */
body.dark-theme .features {
  background: transparent;
}

.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.section-title {
  text-align: center;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline-block;
  width: 100%;
  filter: drop-shadow(0 2px 15px rgba(79, 172, 254, 0.15));
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.section-title:hover {
  transform: scale(1.02);
  filter: drop-shadow(0 4px 25px rgba(79, 172, 254, 0.15));
}

.section-subtitle {
  text-align: center;
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 4rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  opacity: 0.9;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.section-subtitle:hover {
  opacity: 1;
  transform: scale(1.02);
  color: var(--text-primary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.feature-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2.5rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

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

.feature-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.feature-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  position: relative;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow:
    0 10px 30px rgba(79, 172, 254, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.feature-icon::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(45deg, #4facfe, #00f2fe);
  opacity: 0;
  z-index: -1;
  filter: blur(15px);
  transition: opacity 0.4s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.15) rotate(5deg);
  box-shadow:
    0 15px 40px rgba(79, 172, 254, 0.15),
    0 0 30px rgba(79, 172, 254, 0.15);
}

.feature-card:hover .feature-icon::after {
  opacity: 0.6;
  animation: pulse-glow 2s ease-in-out infinite;
}

.feature-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
}

.feature-card:hover h3 {
  color: #4facfe;
  transform: translateY(-2px);
  text-shadow: 0 0 20px rgba(79, 172, 254, 0.15);
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.feature-card:hover p {
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* How It Works - September 2025 Enhanced */
.how-it-works {
  padding: 3rem 2rem;
  background: transparent;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Animated background pattern */
.how-it-works::before {
  content: none;
}

@keyframes float-pattern {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -30px) rotate(120deg);
  }
  66% {
    transform: translate(-20px, 20px) rotate(240deg);
  }
}

/* Dark how-it-works for dark theme */
body.dark-theme .how-it-works {
  background: transparent;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  margin-top: 3rem;
}

.step {
  position: relative;
  text-align: center;
}

.step::before,
.step::after {
  display: none;
}

.step.step-card {
  padding: clamp(2rem, 3vw, 2.5rem);
}

.step-number {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  position: relative;
  box-shadow:
    0 6px 20px rgba(79, 172, 254, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.step-number::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(45deg, #4facfe, #00f2fe);
  opacity: 0;
  z-index: -1;
  filter: blur(10px);
  transition: opacity 0.4s ease;
}

.step-card:hover .step-number {
  transform: scale(1.15);
  box-shadow:
    0 10px 30px rgba(79, 172, 254, 0.15),
    0 0 25px rgba(79, 172, 254, 0.15);
}

.step-card:hover .step-number::after {
  opacity: 0.6;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.3;
  }
}

.step h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 600;
  transition: color 0.4s ease;
}

.step-card:hover h3 {
  color: #4facfe;
  text-shadow: 0 0 20px rgba(79, 172, 254, 0.15);
}

.step p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
  transition: color 0.4s ease;
}

.step-card:hover p {
  color: var(--text-primary);
}

/* Footer styles handled by shared-footer.js component */

/* 🚀 ENHANCED MICRO-INTERACTIONS - V1.2.1 - SEPTEMBER 2025 STANDARDS */
.feature-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2.5rem;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  /* Subtle gradient overlay for depth */
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 50%, rgba(0, 0, 0, 0.03) 100%);
}

/* Ambient glow effect on cards */
.feature-card::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(79, 172, 254, 0.15) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.feature-card:hover::after {
  opacity: 1;
}

.feature-card:hover {
  transform: translateY(-15px) scale(1.02);
  background: rgba(255, 255, 255, 0.15);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.4),
    0 0 50px rgba(79, 172, 254, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Settings styles moved to shared-header.js */

/* Animations - duplicates removed, using page-shared.css */

.pulse {
  animation: pulse 2s infinite;
}

/* Neumorphism effect for dark mode cards - September 2025 */
body.dark-theme .feature-card {
  box-shadow:
    8px 8px 16px rgba(0, 0, 0, 0.6),
    -8px -8px 16px rgba(255, 255, 255, 0.05),
    inset 1px 1px 2px rgba(255, 255, 255, 0.03);
  background: linear-gradient(135deg, rgba(30, 30, 30, 0.9), rgba(40, 40, 40, 0.8));
}

body.dark-theme .feature-card:hover {
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.5),
    0 0 50px rgba(79, 172, 254, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 20px rgba(79, 172, 254, 0.15);
  background: linear-gradient(135deg, rgba(40, 40, 40, 0.95), rgba(50, 50, 50, 0.85));
}

/* =================================== */
/* MOBILE-FIRST RESPONSIVE DESIGN v2.0 */
/* 2025 Industry Standards - Maximum Width Utilization */
/* =================================== */

/* Small Mobile (320px-390px) - MAXIMUM WIDTH UTILIZATION */
@media (max-width: 390px) {
  /* HEADER/NAVBAR mobile optimization - CRITICAL FIX */
  /* CONTENT SECTIONS - full width utilization */
  .hero {
    width: 100vw !important;
    margin: 0 !important;
    padding: 0.5rem !important;
    padding-top: calc(
      var(--lovelace-header-height, 96px) + 1rem
    ) !important; /* Header clearance synced with shared navigation height */
    box-sizing: border-box;
    min-height: 85vh;
  }
  .hero-content {
    width: 100% !important;
    margin: 0 !important;
    padding: 1rem !important;
  }
  .hero h1 {
    font-size: 2rem !important;
    line-height: 1.2;
  }
  .hero-card {
    display: none; /* Hide floating card on mobile */
  }
  .hero-stats {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  .hero-cta {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  .stat-item {
    width: 100% !important;
    max-width: 100% !important;
  }
  .features,
  .steps,
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100% !important;
    margin: 0 !important;
  }
  .feature-card {
    padding: 1.5rem;
    width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box;
  }
  .steps {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100% !important;
    margin: 0 !important;
  }
  .step-card {
    width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box;
  }
}

/* Large Mobile (391px-430px) */
@media (min-width: 391px) and (max-width: 430px) {
  .hero {
    width: 100vw !important;
    margin: 0 !important;
    padding: 0.75rem !important;
    padding-top: calc(
      var(--lovelace-header-height, 96px) + 1rem
    ) !important; /* Header clearance synced with shared navigation height */
    box-sizing: border-box;
    min-height: 90vh;
  }
  .hero-content {
    width: 100% !important;
    margin: 0 !important;
    padding: 1.25rem !important;
  }
  .hero-card {
    display: none;
  }
  .hero-stats {
    flex-direction: column;
    gap: 1.25rem;
    align-items: stretch;
  }
  .hero-cta {
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
  }
  .stat-item {
    width: 100% !important;
    max-width: 100% !important;
  }
  .features,
  .steps,
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .feature-card {
    padding: 1.75rem;
  }
  .steps {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

/* Mobile & Small Tablets (431px-768px) - MAXIMUM WIDTH */
@media (min-width: 431px) and (max-width: 768px) {
  .hero {
    width: 100vw !important;
    margin: 0 !important;
    padding: clamp(0.75rem, 2vw, 1rem) !important;
    padding-top: calc(
      var(--lovelace-header-height, 96px) + 1rem
    ) !important; /* Header clearance synced with shared navigation height */
    box-sizing: border-box;
    min-height: 90vh;
  }
  .hero-content {
    width: 100% !important;
    margin: 0 !important;
    padding: 1.5rem !important;
  }
  .hero-card {
    display: none;
  }
  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
    align-items: stretch;
  }
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  .stat-item {
    width: 100% !important;
    max-width: 100% !important;
  }
  .features,
  .steps,
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .feature-card {
    padding: 2rem;
  }
  .steps {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  /* Enhanced text wrapping for medium screens */
  .hero h1,
  .feature-card h3,
  .step-card h3 {
    word-break: break-word;
    hyphens: auto;
    line-height: 1.4;
  }
}

/* Tablets (769px-1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero {
    width: 100vw !important;
    margin: 0 !important;
    padding: 2rem !important;
    padding-top: calc(
      var(--lovelace-header-height, 96px) + 1rem
    ) !important; /* Header clearance synced with shared navigation height */
    box-sizing: border-box;
  }
  .hero-content {
    width: 100% !important;
    margin: 0 !important;
  }
  .features,
  .steps,
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  .steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

/* Large Tablets & Small Laptops (1025px-1199px) */
@media (min-width: 1025px) and (max-width: 1199px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* PERFORMANCE OPTIMIZATIONS */
@media (max-width: 768px) {
  /* Performance optimizations handled via shared UI scripts */
}
