/* ============================================================
   CinVerse - movie-match.css
   AI Movie Matchmaker - Luxury Glassmorphic Interface
   All styles strictly scoped to .movie-match-page to eliminate
   any global CSS leakage. 100% unified cinema purple palette.
   ============================================================ */

.movie-match-page {
  min-height: 100vh;
  padding: 120px 20px 80px;
  background: radial-gradient(circle at 50% 10%, rgba(139, 92, 246, 0.12) 0%, #07090E 70%);
  color: #FFFFFF;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ambient glow accents */
.movie-match-page::before {
  content: "";
  position: absolute;
  top: 80px;
  left: 20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
}

.movie-match-page::after {
  content: "";
  position: absolute;
  top: 250px;
  right: 15%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.08) 0%, transparent 70%);
  filter: blur(90px);
  pointer-events: none;
}

/* ===============================
   Wizard Container
================================ */
.movie-match-page .wizard-container {
  max-width: 960px;
  margin: 0 auto;
  background: linear-gradient(160deg, #111728 0%, #0b0f1a 100%);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 28px;
  padding: 48px 44px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 40px rgba(139, 92, 246, 0.15);
  position: relative;
  z-index: 2;
  backdrop-filter: blur(20px);
}

/* Wizard AI Header & Progress */
.movie-match-page .match-wizard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.movie-match-page .match-ai-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #C084FC;
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(139, 92, 246, 0.35);
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.2);
}

.movie-match-page .progress-step-pill {
  font-size: 0.85rem;
  font-weight: 700;
  color: #94A3B8;
  letter-spacing: 0.5px;
}

.movie-match-page .progress-wrapper {
  margin-bottom: 40px;
}

.movie-match-page .progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.movie-match-page .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #8B5CF6 0%, #C084FC 50%, #38BDF8 100%);
  border-radius: 999px;
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.7);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===============================
   Question Step Pages
================================ */
.movie-match-page .question-page {
  text-align: center;
}

.movie-match-page .question-page h1 {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 2.1rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: #FFFFFF;
  letter-spacing: 0.5px;
}

.movie-match-page .question-page p {
  color: #94A3B8;
  font-size: 1.05rem;
  margin-bottom: 34px;
}

/* ===============================
   Interactive Choice Cards
================================ */
.movie-match-page .card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 10px;
}

.movie-match-page .choice-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  padding: 22px 18px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.02rem;
  font-weight: 600;
  color: #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  user-select: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.movie-match-page .choice-card:hover {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(192, 132, 252, 0.45);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.25);
  color: #FFFFFF;
}

.movie-match-page .choice-card.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.4) 0%, rgba(109, 40, 217, 0.65) 100%);
  border-color: #C084FC;
  color: #FFFFFF;
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.35);
  transform: translateY(-2px) scale(1.02);
}

/* ===============================
   Wizard Navigation Buttons
================================ */
.movie-match-page .wizard-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 42px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.movie-match-page .btn {
  border: none;
  padding: 13px 32px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.96rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.movie-match-page .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.movie-match-page .btn-primary {
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.movie-match-page .btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #c084fc 0%, #8b5cf6 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(139, 92, 246, 0.65);
}

.movie-match-page .btn-secondary {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #E2E8F0 !important;
}

.movie-match-page .btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  transform: translateY(-2px);
}

.movie-match-page .btn-success {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.movie-match-page .btn-success:hover:not(:disabled) {
  background: linear-gradient(135deg, #34D399 0%, #10B981 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(16, 185, 129, 0.65);
}

/* ===============================
   AI Loading Screen
================================ */
.movie-match-page .loading-card-wrap {
  padding: 40px 20px;
}

.movie-match-page .ai-loading-orb {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7 0%, #38bdf8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 2rem;
  color: #fff;
  box-shadow: 0 0 35px rgba(139, 92, 246, 0.65);
  animation: orbPulse 1.8s infinite ease-in-out;
}

@keyframes orbPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 30px rgba(139, 92, 246, 0.6); }
  50% { transform: scale(1.08); box-shadow: 0 0 50px rgba(56, 189, 248, 0.8); }
}

.movie-match-page .loading-bar {
  width: 100%;
  max-width: 500px;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  margin: 28px auto;
  overflow: hidden;
}

.movie-match-page .loading-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #8B5CF6 0%, #C084FC 50%, #38BDF8 100%);
  animation: matchLoading 2.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes matchLoading {
  0% { width: 0%; }
  40% { width: 45%; }
  75% { width: 85%; }
  100% { width: 100%; }
}

.movie-match-page .loading-list {
  list-style: none;
  padding: 0;
  max-width: 380px;
  margin: 0 auto;
  text-align: left;
}

.movie-match-page .loading-list li {
  margin: 10px 0;
  color: #CBD5E1;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.movie-match-page .loading-list li i {
  color: #34D399;
}

/* ===============================
   Step 7 : Recommendations & Results
================================ */
.movie-match-page .preference-card {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-left: 5px solid #8B5CF6;
  padding: 20px 24px;
  border-radius: 16px;
  margin: 24px auto 32px;
  text-align: left;
  max-width: 820px;
}

.movie-match-page .preference-card h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #C084FC;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.movie-match-page .preference-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.movie-match-page .pref-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: #E2E8F0;
  font-weight: 600;
}

/* 1080p Results Grid */
.movie-match-page .movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.movie-match-page .movie-card {
  background: #131A2B;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  text-align: left;
}

.movie-match-page .movie-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.8), 0 0 25px rgba(139, 92, 246, 0.35);
}

.movie-match-page .movie-card img {
  width: 100%;
  height: 310px;
  object-fit: cover;
  display: block;
}

.movie-match-page .match-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #FFFFFF;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5);
}

.movie-match-page .movie-details {
  padding: 16px;
}

.movie-match-page .movie-details h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-match-page .movie-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  color: #FBBF24;
  font-size: 0.85rem;
  font-weight: 700;
}

.movie-match-page .movie-actions {
  display: flex;
  gap: 8px;
}

.movie-match-page .movie-actions .btn {
  flex: 1;
  padding: 9px 12px;
  font-size: 0.82rem;
}

.movie-match-page .btn-active-fav {
  background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%) !important;
  color: #FFFFFF !important;
  border-color: #A855F7 !important;
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.5);
}

/* No Results Fallback */
.movie-match-page .no-results-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 50px 24px;
  text-align: center;
  margin: 35px auto;
  max-width: 600px;
}

.movie-match-page .no-results-card i {
  font-size: 48px;
  color: #A855F7;
  margin-bottom: 16px;
  display: block;
}

.movie-match-page .no-results-card h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: #FFFFFF;
}

.movie-match-page .no-results-card p {
  color: #94A3B8;
  margin-bottom: 24px;
  font-size: 0.95rem;
}

/* Animations & Zero Overlap */
.movie-match-page .fade-in {
  animation: matchFadeIn 0.28s ease-out;
}

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

.movie-match-page .question-page.ng-leave,
.movie-match-page .question-page.ng-leave-active {
  display: none !important;
  position: absolute !important;
  visibility: hidden !important;
  height: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Responsive */
@media (max-width: 768px) {
  .movie-match-page {
    padding: 100px 14px 60px;
  }

  .movie-match-page .wizard-container {
    padding: 28px 20px;
    border-radius: 20px;
  }

  .movie-match-page .question-page h1 {
    font-size: 1.6rem;
  }

  .movie-match-page .card-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .movie-match-page .wizard-buttons {
    flex-direction: column-reverse;
    gap: 14px;
  }

  .movie-match-page .btn {
    width: 100%;
  }

  .movie-match-page .movie-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}