/* Honor Christmas Campaign - Custom Styles */

/* ============================================
   ANIMATIONS
   ============================================ */

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

.animate-fade-in {
  animation: fade-in 0.5s ease-out;
}

@keyframes fall {
  to {
    transform: translateY(100vh);
  }
}

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

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

.animate-spin {
  animation: spin 1s linear infinite;
}

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

/* ============================================
   GLOBAL STYLES
   ============================================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

#root {
  min-height: 100vh;
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #22c55e, #16a34a);
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #16a34a, #15803d);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #22c55e rgba(0, 0, 0, 0.1);
}

/* ============================================
   BUTTON STYLES
   ============================================ */

button {
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

button:active {
  transform: scale(0.98);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

button:focus {
  outline: none;
}

button:focus-visible {
  ring: 2px;
  ring-offset: 2px;
}

/* ============================================
   INPUT STYLES
   ============================================ */

input, 
textarea, 
select {
  transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: #9ca3af;
}

/* Remove spinner from number inputs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

/* ============================================
   VIDEO STYLES
   ============================================ */

video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   IMAGE STYLES
   ============================================ */

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   CARD HOVER EFFECTS
   ============================================ */

.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ============================================
   TEMPLATE SELECTION
   ============================================ */

.template-item {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.template-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(220, 38, 38, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.template-item:hover::before {
  opacity: 1;
}

.template-item img {
  transition: transform 0.3s ease;
}

.template-item:hover img {
  transform: scale(1.05);
}

/* ============================================
   LOADING SPINNER
   ============================================ */

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ============================================
   PROGRESS INDICATOR
   ============================================ */

.progress-step {
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-step::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%);
  transition: background 0.4s ease;
}

.progress-step.completed::after {
  background: #22c55e;
}

/* ============================================
   ALERT/ERROR MESSAGES
   ============================================ */

.alert {
  animation: slide-down 0.3s ease-out;
}

@keyframes slide-down {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ============================================
   SNOWFLAKE ANIMATION
   ============================================ */

.snowflake {
  position: absolute;
  color: rgba(255, 255, 255, 0.3);
  pointer-events: none;
  user-select: none;
  animation: fall linear infinite;
}

/* ============================================
   GLASS MORPHISM EFFECT
   ============================================ */

.glass {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ============================================
   GRADIENT TEXT
   ============================================ */

.gradient-text {
  background: linear-gradient(135deg, #22c55e, #dc2626);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   SHADOW EFFECTS
   ============================================ */

.shadow-glow-green {
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.shadow-glow-red {
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

@media (max-width: 768px) {
  .mobile-padding {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .no-print {
    display: none !important;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 2px solid #22c55e;
  outline-offset: 2px;
}

/* ============================================
   CUSTOM UTILITIES
   ============================================ */

.no-select {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.cursor-pointer {
  cursor: pointer;
}

.cursor-not-allowed {
  cursor: not-allowed;
}

/* ============================================
   TRANSITION UTILITIES
   ============================================ */

.transition-smooth {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.transition-bounce {
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ============================================
   Z-INDEX LAYERS
   ============================================ */

.z-base {
  z-index: 0;
}

.z-overlay {
  z-index: 10;
}

.z-modal {
  z-index: 50;
}

.z-toast {
  z-index: 100;
}