/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

 /*
 *= require movies
 */

/* ===========================
   ANIMATIONS & TRANSITIONS
   =========================== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

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

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

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

@keyframes glow {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
  }
  50% {
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
  }
}

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

main {
  animation: fadeIn 0.3s ease-out;
}

.page-header {
  animation: slideUp 0.5s ease-out;
}

.card, .alert {
  animation: slideUp 0.4s ease-out backwards;
}

.card:nth-child(1) {
  animation-delay: 0.1s;
}

.card:nth-child(2) {
  animation-delay: 0.2s;
}

.card:nth-child(3) {
  animation-delay: 0.3s;
}

.card:nth-child(4) {
  animation-delay: 0.4s;
}

.card:nth-child(5) {
  animation-delay: 0.5s;
}

.card:nth-child(n+6) {
  animation-delay: 0.6s;
}

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

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

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

a {
  transition: color 0.3s ease;
}

.navbar-brand:hover {
  opacity: 0.9;
}

/* ===========================
   SMOOTH SCROLLING
   =========================== */

html {
  scroll-behavior: smooth;
}

/* ===========================
   FORM STYLING
   =========================== */

.form-control:focus,
.form-select:focus {
  border-color: #8B5CF6 !important;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
  animation: slideUp 0.2s ease-out;
}

/* ===========================
   LOADING STATES
   =========================== */

.btn:disabled,
.btn[disabled] {
  opacity: 0.6;
  pointer-events: none;
}

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

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

/* ===========================
   RESPONSIVE BEHAVIOR
   =========================== */

@media (max-width: 768px) {
  .card {
    animation-delay: 0 !important;
  }
}

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

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

/* ===========================
   UTILITY CLASSES
   =========================== */

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

.transition-colors {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

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

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

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

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

/* ===========================
   TEXT SELECTION
   =========================== */

::selection {
  background: #8B5CF6;
  color: white;
}

::-moz-selection {
  background: #8B5CF6;
  color: white;
}
