
/* Premium Nebula Creator Styles */
:root {
  --nebula-50: #f5f3ff;
  --nebula-100: #ede9fe;
  --nebula-200: #ddd6fe;
  --nebula-300: #c4b5fd;
  --nebula-400: #a78bfa;
  --nebula-500: #8b5cf6;
  --nebula-600: #7c3aed;
  --nebula-700: #6d28d9;
  --nebula-800: #5b21b6;
  --nebula-900: #4c1d95;
  --nebula-950: #2e1065;
  
  --cosmic-50: #ecfeff;
  --cosmic-100: #cffafe;
  --cosmic-200: #a5f3fc;
  --cosmic-300: #67e8f9;
  --cosmic-400: #22d3ee;
  --cosmic-500: #06b6d4;
  --cosmic-600: #0891b2;
  --cosmic-700: #0e7490;
  --cosmic-800: #155e75;
  --cosmic-900: #164e63;
  --cosmic-950: #083344;
  
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Base Styles */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Premium Grid Background */
.grid-bg {
  background-color: #020617;
  background-image: 
    radial-gradient(circle at 1px 1px, rgba(139, 92, 246, 0.15) 1px, transparent 0),
    radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.03) 0%, transparent 50%),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.9), #020617);
  background-size: 40px 40px, 100% 100%, 100% 100%;
  background-attachment: fixed;
}

/* Enhanced Typography */
h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.02em;
  font-weight: 600;
}

/* Focus Rings - Accessibility */
*:focus-visible {
  outline: 2px solid var(--nebula-500);
  outline-offset: 2px;
  border-radius: 4px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--nebula-500);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.2);
}

/* Premium Card Styles */
.card-premium {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 16px;
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all var(--transition-slow);
}

.card-premium:hover {
  border-color: rgba(139, 92, 246, 0.2);
  box-shadow: 
    0 20px 25px -5px rgba(0, 0, 0, 0.2),
    0 10px 10px -5px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

/* Micro-interactions */
.interactive-element {
  transition: all var(--transition-base);
}

.interactive-element:hover {
  transform: translateY(-1px);
}

.interactive-element:active {
  transform: translateY(0);
}

/* Button Premium Styles */
.btn-premium {
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.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::before {
  left: 100%;
}

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

/* Loading Skeleton */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(30, 41, 59, 0.8) 25%,
    rgba(51, 65, 85, 0.8) 50%,
    rgba(30, 41, 59, 0.8) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 8px;
}

.skeleton-text {
  height: 1em;
  margin-bottom: 0.5em;
  border-radius: 4px;
}

.skeleton-circle {
  border-radius: 50%;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Dropdown Animations */
.dropdown-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: all var(--transition-fast);
  transform-origin: top;
}

.dropdown-menu.active,
.group:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Tab Transitions */
.tab-content {
  opacity: 0;
  transform: translateX(-10px);
  transition: all var(--transition-base);
}

.tab-content.active {
  opacity: 1;
  transform: translateX(0);
}

/* Input Focus States */
.input-premium {
  transition: all var(--transition-fast);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.input-premium:hover {
  border-color: rgba(148, 163, 184, 0.4);
}

.input-premium:focus {
  border-color: var(--nebula-500);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

/* Glass Effect */
.glass {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Gradient Text Animation */
.gradient-text-animated {
  background: linear-gradient(90deg, #a78bfa, #22d3ee, #a78bfa);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

/* Pulse Glow */
.pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(139, 92, 246, 0.3); }
  50% { box-shadow: 0 0 40px rgba(139, 92, 246, 0.5); }
}

/* Hover Lift Effect */
.hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-slow);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.3);
}

/* Status Indicators */
.status-dot {
  position: relative;
}

.status-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.4;
  animation: status-pulse 2s ease-in-out infinite;
}

@keyframes status-pulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.5); opacity: 0; }
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.5);
}

/* Table Row Hover */
.table-row-hover {
  transition: background-color var(--transition-fast);
}

.table-row-hover:hover {
  background-color: rgba(30, 41, 59, 0.5);
}

/* Toast Notification */
.toast {
  transform: translateX(100%);
  opacity: 0;
  transition: all var(--transition-bounce);
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

/* Image Preview Container */
.preview-container {
  position: relative;
  overflow: hidden;
}

.preview-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.4) 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
  z-index: 1;
}

.preview-container:hover::before {
  opacity: 1;
}

/* Chip/Tag Styles */
.chip {
  transition: all var(--transition-fast);
}

.chip:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  cursor: pointer;
  transition: all var(--transition-base);
}

.toggle-switch::before {
  transition: transform var(--transition-bounce);
}

/* Loading Spinner */
.spinner {
  border: 3px solid rgba(30, 41, 59, 0.5);
  border-top-color: var(--nebula-500);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Fade In Animation */
.fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

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

/* Stagger Children Animation */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  animation: staggerFadeIn 0.5s ease-out forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.6s; }

@keyframes staggerFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pricing Card Highlight */
.pricing-highlight {
  position: relative;
  overflow: hidden;
}

.pricing-highlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--nebula-500), var(--cosmic-500), transparent);
  animation: border-glow 3s ease-in-out infinite;
}

@keyframes border-glow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* File Drop Zone */
.drop-zone {
  transition: all var(--transition-base);
  border: 2px dashed rgba(148, 163, 184, 0.3);
}

.drop-zone.drag-over {
  border-color: var(--nebula-500);
  background: rgba(139, 92, 246, 0.05);
  transform: scale(1.02);
}

/* Tooltip */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: 6px 12px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  pointer-events: none;
  z-index: 50;
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-4px);
}

/* Card Base (legacy support) */
.card {
  max-width: 620px;
  margin: 0 auto;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  transition: all var(--transition-slow);
}

.card:hover {
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.3);
}
