/* ========================================
   SaaS Generator - Custom Styles
   ======================================== */

/* Glassmorphism card */
.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Animated gradient bg */
.animated-gradient {
  background: linear-gradient(-45deg, #6366f1, #a855f7, #ec4899, #8b5cf6);
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Floating animation */
.float-animation {
  animation: float 3s ease-in-out infinite;
}

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

/* Step indicator */
.step-indicator {
  position: relative;
}

.step-indicator::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -50%;
  width: 100%;
  height: 2px;
  background: #e5e7eb;
  z-index: 0;
}

.step-indicator:last-child::after {
  display: none;
}

.step-active .step-number {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: white;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.step-done .step-number {
  background: #10b981;
  color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Editor toolbar */
.editor-toolbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  transition: opacity 0.2s, transform 0.2s;
}

.editor-toolbar.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-10px);
}

/* Editable highlight */
[contenteditable="true"]:hover {
  outline: 2px dashed rgba(99, 102, 241, 0.4);
  outline-offset: 4px;
  border-radius: 4px;
}

[contenteditable="true"]:focus {
  outline: 2px solid #6366f1;
  outline-offset: 4px;
  border-radius: 4px;
}

/* Scrap log */
.scrap-log {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
}

.scrap-log .log-success { color: #10b981; }
.scrap-log .log-error { color: #ef4444; }
.scrap-log .log-info { color: #3b82f6; }
.scrap-log .log-warn { color: #f59e0b; }

/* Template card hover */
.template-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.template-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Sidebar */
.sidebar-link {
  transition: all 0.2s ease;
}
.sidebar-link:hover, .sidebar-link.active {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
}
.sidebar-link.active {
  border-right: 3px solid #6366f1;
}

/* Pulse dot */
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Slide image placeholder */
.slide-placeholder {
  background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* WhatsApp preview */
.wa-preview {
  background: #e5ddd5;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9c3b8' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Hero slider */
.hero-slide {
  transition: opacity 0.5s ease-in-out;
}

/* ========================================
   Hero Section Animations
   ======================================== */

/* Hero stagger fade-in on load */
.hero-animate {
  opacity: 0;
  transform: translateY(24px);
  animation: hero-fade-in-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes hero-fade-in-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-delay-1 { animation-delay: 0.1s; }
.hero-delay-2 { animation-delay: 0.25s; }
.hero-delay-3 { animation-delay: 0.4s; }
.hero-delay-4 { animation-delay: 0.55s; }

/* Gradient text shimmer pulse */
.shimmer-pulse {
  animation: shimmer-pulse 3s ease-in-out infinite;
}

@keyframes shimmer-pulse {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.25); }
}

/* Typewriter cursor blink */
.wa-green {
  color: #25D366;
}

.cursor-blink {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: #25D366;
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: cursor-blink-anim 0.8s steps(2) infinite;
}

@keyframes cursor-blink-anim {
  0%   { opacity: 1; }
  50%  { opacity: 0; }
  100% { opacity: 1; }
}

/* Typewriter text — hidden by default, JS types characters */
.typewriter-text {
  visibility: hidden;
}

.typewriter-text.typing-active {
  visibility: visible;
}

/* Scroll reveal (triggered by IntersectionObserver) */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children reveal */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0s; opacity: 1; transform: translateY(0); }
.reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }

/* Pulse ring for badge */
.badge-pulse {
  position: relative;
}

.badge-pulse::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #6366f1, #d946ef);
  opacity: 0;
  animation: badge-pulse-ring 2.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  z-index: -1;
}

@keyframes badge-pulse-ring {
  0%   { transform: scale(0.95); opacity: 0.3; }
  70%  { transform: scale(1.08); opacity: 0; }
  100% { transform: scale(1.08); opacity: 0; }
}

/* Responsive table */
.table-responsive {
  overflow-x: auto;
}

/* Loading spinner */
.spinner {
  border: 3px solid #f3f4f6;
  border-top: 3px solid #6366f1;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 0.8s linear infinite;
}

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