/* =========================================
   PREMIUM UI ENHANCEMENTS v4.0
   Advanced Animations & Micro-interactions
   ========================================= */

/* ─── ENHANCED ANIMATIONS ─── */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
  }
  50% {
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.8), 0 0 60px rgba(6, 214, 255, 0.5);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

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

@keyframes rotate-infinite {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes scan-line {
  0% {
    top: 0;
  }
  100% {
    top: 100%;
  }
}

@keyframes neon-flicker {
  0%, 100% {
    text-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary);
  }
  50% {
    text-shadow: 0 0 5px var(--primary), 0 0 10px var(--primary), 0 0 30px rgba(168, 85, 247, 0.5);
  }
}

/* ─── ENHANCED ELEMENTS ─── */

/* Cards with premium styling */
.card-premium {
  position: relative;
  background: linear-gradient(135deg, rgba(13, 13, 30, 0.8), rgba(20, 20, 45, 0.6));
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 20px;
  padding: 24px;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  animation: slideInUp 0.6s ease-out;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

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

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

.card-premium:hover {
  transform: translateY(-12px) scale(1.02);
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 24px 60px -8px rgba(168, 85, 247, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  background: linear-gradient(135deg, rgba(13, 13, 30, 0.95), rgba(26, 26, 53, 0.8));
}

/* Premium Button Styles */
.btn-premium {
  position: relative;
  padding: 12px 32px;
  border: 2px solid transparent;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  letter-spacing: 0.5px;
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.3);
}

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

.btn-premium:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(168, 85, 247, 0.5);
  filter: brightness(1.15);
}

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

.btn-premium:active {
  transform: translateY(-1px) scale(0.98);
}

.btn-premium-secondary {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.3);
}

.btn-premium-secondary:hover {
  box-shadow: 0 12px 40px rgba(249, 115, 22, 0.5);
}

.btn-premium-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  box-shadow: none;
}

.btn-premium-outline:hover {
  background: var(--primary);
  color: white;
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.4);
}

/* Header with premium styling */
.header-premium {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, rgba(4, 4, 10, 0.95), rgba(6, 6, 18, 0.9));
  border-bottom: 1px solid rgba(168, 85, 247, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 16px 24px;
  animation: slideInDown 0.6s ease-out;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.header-premium-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInLeft 0.8s ease-out;
}

.header-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--grad-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 16px;
}

/* Navigation styles */
.nav-premium {
  display: flex;
  gap: 8px;
  list-style: none;
  animation: slideInRight 0.8s ease-out;
}

.nav-item {
  position: relative;
  padding: 8px 16px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 8px;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--grad-primary);
  transition: width 0.3s ease;
  border-radius: 1px;
}

.nav-item:hover {
  color: var(--primary);
}

.nav-item:hover::after {
  width: 100%;
}

.nav-item.active {
  color: var(--primary);
  background: rgba(168, 85, 247, 0.1);
}

.nav-item.active::after {
  width: 100%;
}

/* Section with premium styling */
.section-premium {
  margin: 60px 0;
  animation: slideInUp 0.8s ease-out;
}

.section-premium-title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--primary), var(--tertiary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
}

.section-premium-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.6;
}

/* Grid with premium cards */
.grid-premium {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

@media (max-width: 768px) {
  .grid-premium {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Feature cards */
.feature-card {
  background: linear-gradient(135deg, rgba(20, 20, 45, 0.5), rgba(13, 13, 30, 0.7));
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-radius: 16px;
  padding: 24px;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(15px);
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  animation: slideInUp 0.6s ease-out;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 0 0, rgba(168, 85, 247, 0.1), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-12px);
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 20px 50px rgba(168, 85, 247, 0.2);
}

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

.feature-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 24px;
  transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: rotate(10deg) scale(1.1);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.4);
}

.feature-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.feature-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Input fields with premium styling */
.input-premium {
  position: relative;
  width: 100%;
}

.input-premium input,
.input-premium textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(13, 13, 30, 0.5);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.input-premium input::placeholder,
.input-premium textarea::placeholder {
  color: var(--text-muted);
}

.input-premium input:focus,
.input-premium textarea:focus {
  outline: none;
  background: rgba(13, 13, 30, 0.7);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1), 0 0 20px rgba(168, 85, 247, 0.2);
}

/* Badge styles */
.badge-premium {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(168, 85, 247, 0.15);
  color: var(--primary-light);
  border: 1px solid rgba(168, 85, 247, 0.3);
  letter-spacing: 0.5px;
}

.badge-premium.secondary {
  background: rgba(249, 115, 22, 0.15);
  color: var(--secondary-light);
  border-color: rgba(249, 115, 22, 0.3);
}

.badge-premium.success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green-bright);
  border-color: rgba(16, 185, 129, 0.3);
}

/* Divider with gradient */
.divider-premium {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.3), transparent);
  margin: 32px 0;
}

/* Footer with premium styling */
.footer-premium {
  background: linear-gradient(135deg, rgba(4, 4, 10, 0.95), rgba(6, 6, 18, 0.9));
  border-top: 1px solid rgba(168, 85, 247, 0.12);
  padding: 48px 24px;
  margin-top: 80px;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.footer-link {
  display: block;
  color: var(--text-secondary);
  margin-bottom: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.footer-link:hover {
  color: var(--primary);
  transform: translateX(4px);
}

.footer-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.2), transparent);
  margin-bottom: 24px;
}

.footer-bottom {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 1px;
}

/* Responsive improvements */
@media (max-width: 1024px) {
  .section-premium-title {
    font-size: 32px;
  }
  
  .grid-premium {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 640px) {
  .header-premium {
    padding: 12px 16px;
  }
  
  .header-premium-content {
    flex-direction: column;
    gap: 12px;
  }
  
  .nav-premium {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .section-premium-title {
    font-size: 24px;
  }
  
  .grid-premium {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .btn-premium {
    width: 100%;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dark mode enhancements */
[data-theme="dark"] .card-premium,
[data-theme="dark"] .header-premium,
[data-theme="dark"] .footer-premium {
  background: linear-gradient(135deg, rgba(6, 6, 18, 0.9), rgba(13, 13, 30, 0.85));
}

/* Light mode adjustments */
[data-theme="light"] .card-premium,
[data-theme="light"] .header-premium,
[data-theme="light"] .footer-premium {
  background: linear-gradient(135deg, rgba(240, 240, 248, 0.95), rgba(255, 255, 255, 0.9));
}

[data-theme="light"] .feature-card {
  background: linear-gradient(135deg, rgba(245, 245, 255, 0.7), rgba(255, 255, 255, 0.5));
  border-color: rgba(124, 58, 237, 0.2);
}
