/* Shadcn UI Design System - CSS Variables & Base Styles */
:root {
  /* Colors - Custom Theme */
  --background: 0 0% 100%; /* $bg-primary: #ffffff */
  --foreground: 217 33% 17%; /* $text-primary: #1e293b */
  
  --card: 0 0% 100%;
  --card-foreground: 217 33% 17%;
  
  --popover: 0 0% 100%;
  --popover-foreground: 217 33% 17%;
  
  --primary: 217 91% 60%; /* $color-primary: #3b82f6 */
  --primary-foreground: 0 0% 100%; /* $text-inverse: #ffffff */
  
  --secondary: 210 40% 96.1%; /* $bg-tertiary: #f1f5f9 */
  --secondary-foreground: 217 33% 17%;
  
  --muted: 210 40% 98%; /* $bg-secondary: #f8fafc */
  --muted-foreground: 215 19% 35%; /* $text-secondary: #475569 */
  
  --accent: 210 40% 96.1%; /* $bg-tertiary: #f1f5f9 */
  --accent-foreground: 217 33% 17%;
  
  --destructive: 0 84% 60%; /* $color-error: #ef4444 */
  --destructive-foreground: 0 0% 100%;
  
  --border: 214 32% 91%; /* $border-primary: #e2e8f0 */
  --input: 214 32% 91%;
  --ring: 217 91% 60%; /* $border-focus: $color-primary */
  
  --radius: 0.5rem;
}

.dark {
  --background: 222 47% 11%;
  --foreground: 210 40% 98%;
  
  --card: 222 47% 11%;
  --card-foreground: 210 40% 98%;
  
  --popover: 222 47% 11%;
  --popover-foreground: 210 40% 98%;
  
  --primary: 217 91% 60%;
  --primary-foreground: 0 0% 100%;
  
  --secondary: 217 33% 17%;
  --secondary-foreground: 210 40% 98%;
  
  --muted: 217 33% 17%;
  --muted-foreground: 215 20% 65%;
  
  --accent: 217 33% 17%;
  --accent-foreground: 210 40% 98%;
  
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 0 0% 98%;
  
  --border: 217 33% 17%;
  --input: 217 33% 17%;
  --ring: 217 91% 60%;
}

/* Base Reset & Typography */
body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Animation Utilities */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

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

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

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

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

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

@keyframes gradient-shift {
  0% { 
    background-position: 0% 50%; 
    opacity: 0.3;
  }
  50% { 
    background-position: 100% 50%; 
    opacity: 0.6;
  }
  100% { 
    background-position: 0% 50%; 
    opacity: 0.3;
  }
}

.animate-fade-in {
  animation: fadeIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-up {
  animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-in-right {
  animation: fadeInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scale-in {
  animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

.animate-gradient-shift {
  background: linear-gradient(-45deg, hsl(var(--primary)/0.1), hsl(var(--secondary)/0.1), hsl(var(--accent)/0.1));
  background-size: 400% 400%;
  animation: gradient-shift 6s ease infinite;
}

.animate-typewriter {
  overflow: hidden;
  border-right: 2px solid hsl(var(--primary));
  white-space: nowrap;
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: hsl(var(--primary)); }
}

/* Star Particle Animation */
@keyframes star-explode {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0) rotate(0deg);
  }
  20% {
    opacity: 1;
    transform: translate(var(--tx), var(--ty)) scale(1) rotate(180deg);
  }
  80% {
    opacity: 0.8;
    transform: translate(var(--tx-end), var(--ty-end)) scale(0.8) rotate(360deg);
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx-end), var(--ty-end)) scale(0) rotate(450deg);
  }
}

@keyframes star-pulse {
  0%, 100% { 
    transform: scale(1); 
    opacity: 1; 
  }
  50% { 
    transform: scale(1.2); 
    opacity: 0.8; 
  }
}

/* Stagger animations for sequential reveal */
.animate-stagger-1 { animation-delay: 0.1s; }
.animate-stagger-2 { animation-delay: 0.2s; }
.animate-stagger-3 { animation-delay: 0.3s; }
.animate-stagger-4 { animation-delay: 0.4s; }
.animate-stagger-5 { animation-delay: 0.5s; }
.animate-stagger-6 { animation-delay: 0.6s; }
.animate-stagger-7 { animation-delay: 0.7s; }
.animate-stagger-8 { animation-delay: 0.8s; }
.animate-stagger-9 { animation-delay: 0.9s; }
.animate-stagger-10 { animation-delay: 1.0s; }

/* Star Random Flying Animation */
.star-btn {
  position: relative;
  overflow: visible;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.star-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.3);
}

.star-icon {
  position: absolute;
  width: 16px;
  height: 16px;
  fill: currentColor;
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  z-index: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Random star animations */
.star-btn:hover .star-icon {
  opacity: 1;
  animation: starFlyOut 0.8s ease-out forwards;
}

/* Individual star delays */
.star-btn:hover .star-1 { animation-delay: 0s; }
.star-btn:hover .star-2 { animation-delay: 0.1s; }
.star-btn:hover .star-3 { animation-delay: 0.2s; }
.star-btn:hover .star-4 { animation-delay: 0.3s; }
.star-btn:hover .star-5 { animation-delay: 0.4s; }

/* Random flying animation - explode and stay */
@keyframes starFlyOut {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0) rotate(0deg);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(var(--scale)) rotate(72deg);
  }
  60% {
    opacity: 0.9;
    transform: translate(var(--tx), var(--ty)) scale(var(--scale)) rotate(180deg);
  }
  80% {
    opacity: 0.8;
    transform: translate(var(--tx), var(--ty)) scale(var(--scale)) rotate(360deg);
  }
  100% {
    opacity: 0.6;
    transform: translate(var(--tx), var(--ty)) scale(var(--scale)) rotate(450deg);
  }
}

/* Logo star animation - circular fly out */
@keyframes logoStarFlyOut {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(var(--scale));
  }
  100% {
    opacity: 0;
    transform: translate(calc(cos(var(--angle)) * var(--distance)), calc(sin(var(--angle)) * var(--distance))) scale(var(--scale));
  }
}

/* Logo star hover effect */
.group:hover .logo-star-1 { animation: logoStarFlyOut 0.8s ease-out forwards; animation-delay: 0s; }
.group:hover .logo-star-2 { animation: logoStarFlyOut 0.8s ease-out forwards; animation-delay: 0.05s; }
.group:hover .logo-star-3 { animation: logoStarFlyOut 0.8s ease-out forwards; animation-delay: 0.1s; }
.group:hover .logo-star-4 { animation: logoStarFlyOut 0.8s ease-out forwards; animation-delay: 0.15s; }
.group:hover .logo-star-5 { animation: logoStarFlyOut 0.8s ease-out forwards; animation-delay: 0.2s; }
.group:hover .logo-star-6 { animation: logoStarFlyOut 0.8s ease-out forwards; animation-delay: 0.25s; }

/* Hero specific animations */
.hero-badge {
  animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-title {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-subtitle {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.2s;
}

.hero-cta {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.4s;
}

.hero-features {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.6s;
}

.hero-platforms {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.8s;
}

/* Page Transition */
body {
  animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Button Hover Enhancement */
.btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* Card & Video Hover Scale */
.card, .video-card {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, box-shadow;
}

.card:hover, .video-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.bg-background { background-color: hsl(var(--background)); }
.bg-foreground { background-color: hsl(var(--foreground)); }
.bg-card { background-color: hsl(var(--card)); }
.bg-popover { background-color: hsl(var(--popover)); }
.bg-primary { background-color: hsl(var(--primary)); }
.bg-secondary { background-color: hsl(var(--secondary)); }
.bg-muted { background-color: hsl(var(--muted)); }
.bg-accent { background-color: hsl(var(--accent)); }
.bg-destructive { background-color: hsl(var(--destructive)); }

.text-background { color: hsl(var(--background)); }
.text-foreground { color: hsl(var(--foreground)); }
.text-primary { color: hsl(var(--primary)); }
.text-primary-foreground { color: hsl(var(--primary-foreground)); }
.text-secondary { color: hsl(var(--secondary)); }
.text-secondary-foreground { color: hsl(var(--secondary-foreground)); }
.text-muted { color: hsl(var(--muted)); }
.text-muted-foreground { color: hsl(var(--muted-foreground)); }
.text-accent-foreground { color: hsl(var(--accent-foreground)); }
.text-destructive { color: hsl(var(--destructive)); }
.text-destructive-foreground { color: hsl(var(--destructive-foreground)); }

.border-border { border-color: hsl(var(--border)); }
.border-input { border-color: hsl(var(--input)); }
.border-primary { border-color: hsl(var(--primary)); }
.border-secondary { border-color: hsl(var(--secondary)); }

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  height: 2.5rem; /* h-10 */
  padding-left: 1rem;
  padding-right: 1rem;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
  outline: 2px solid transparent;
  outline-offset: 2px;
  cursor: pointer;
}

.btn:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.btn:disabled {
  pointer-events: none;
  opacity: 0.5;
}

.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}
.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}
.btn-secondary:hover {
  background-color: hsl(var(--secondary) / 0.8);
}

.btn-outline {
  border: 1px solid hsl(var(--input));
  background-color: hsl(var(--background));
}
.btn-outline:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.btn-ghost {
  background-color: transparent;
  color: hsl(var(--foreground));
}
.btn-ghost:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.btn-link {
  color: hsl(var(--primary));
  text-decoration-line: underline;
  text-underline-offset: 4px;
}
.btn-link:hover {
  color: hsl(var(--primary) / 0.8);
}

/* Card */
.card {
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.card-header {
  display: flex;
  flex-direction: column;
  space-y: 1.5rem;
  padding: 1.5rem;
}

.card-title {
  font-weight: 600;
  line-height: none;
  letter-spacing: -0.025em;
}

.card-description {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.card-content {
  padding: 1.5rem;
  padding-top: 0;
}

.card-footer {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  padding-top: 0;
}

/* Input */
.input {
  display: flex;
  height: 2.5rem; /* h-10 */
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--input));
  background-color: hsl(var(--background));
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: hsl(var(--foreground)); /* text-sm */
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.input::placeholder {
  color: hsl(var(--muted-foreground));
}

.input:focus-visible {
  outline: none;
  border-color: hsl(var(--ring)); /* Ring color usually applied to border or ring shadow */
  box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring));
}

.input:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid transparent;
  padding-left: 0.625rem;
  padding-right: 0.625rem;
  padding-top: 0.125rem;
  padding-bottom: 0.125rem;
  font-size: 0.75rem;
  font-weight: 600;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.badge:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px hsl(var(--ring)), 0 0 0 4px hsl(var(--background));
}

.badge-secondary {
  border-color: transparent;
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

.badge-secondary:hover {
  background-color: hsl(var(--secondary) / 0.8);
}

.badge-outline {
  color: hsl(var(--foreground));
}
