/* ============================================
   SMART PACKAGE QUIZ SYSTEM
   Interactive recommendation engine for service packages
   2026 conversion pattern - personalized guidance
   ============================================ */

.package-quiz-section {
  padding: 8rem 0;
  background: linear-gradient(180deg, 
    rgba(11,14,24,0.8) 0%,
    rgba(15,18,28,0.95) 50%,
    rgba(11,14,24,0.8) 100%
  );
  position: relative;
  overflow: hidden;
}

/* Background Animation Orbs */
.package-quiz-section::before,
.package-quiz-section::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

.package-quiz-section::before {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(138,43,226,0.4) 0%, transparent 70%);
  top: -200px;
  left: -150px;
  animation: float-orb-1 25s ease-in-out infinite;
}

.package-quiz-section::after {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59,130,246,0.3) 0%, transparent 70%);
  bottom: -250px;
  right: -200px;
  animation: float-orb-2 30s ease-in-out infinite;
}

@keyframes float-orb-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(100px, -50px) scale(1.1); }
  66% { transform: translate(-50px, 100px) scale(0.9); }
}

@keyframes float-orb-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-120px, 80px) scale(0.9); }
  66% { transform: translate(80px, -100px) scale(1.1); }
}

.quiz-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* Quiz Header */
.quiz-header {
  text-align: center;
  margin-bottom: 4rem;
  animation: fade-in-up 0.8s ease-out;
}

.quiz-header h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.quiz-header p {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.7);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Quiz Progress Bar */
.quiz-progress {
  margin-bottom: 3rem;
  animation: fade-in 0.5s ease-out 0.2s backwards;
}

.progress-bar-container {
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6 0%, #3b82f6 100%);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255,255,255,0.3) 50%, 
    transparent 100%
  );
  animation: progress-shimmer 2s linear infinite;
}

@keyframes progress-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
}

.progress-steps {
  display: flex;
  gap: 0.5rem;
}

.progress-step {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: all 0.3s ease;
}

.progress-step.active {
  background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
  transform: scale(1.2);
  box-shadow: 0 0 12px rgba(139,92,246,0.5);
}

.progress-step.completed {
  background: #10b981;
  animation: pulse-check 0.4s ease;
}

@keyframes pulse-check {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

/* Question Card */
.quiz-question {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px;
  padding: 3rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  animation: slide-in-up 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: bottom center;
}

@keyframes slide-in-up {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.quiz-question::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(139,92,246,0.5) 50%, transparent 100%);
}

.quiz-question.fade-out {
  animation: slide-out-down 0.4s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

@keyframes slide-out-down {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
}

.question-number {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #8b5cf6;
  background: rgba(139,92,246,0.1);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(139,92,246,0.2);
}

.question-text {
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2rem;
  line-height: 1.4;
}

/* Answer Options */
.quiz-options {
  display: grid;
  gap: 1rem;
}

.quiz-option {
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.quiz-option::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(139,92,246,0.1) 0%, rgba(59,130,246,0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.quiz-option:hover {
  border-color: rgba(139,92,246,0.5);
  transform: translateX(4px);
  background: rgba(255,255,255,0.08);
}

.quiz-option:hover::before {
  opacity: 1;
}

.quiz-option.selected {
  border-color: #8b5cf6;
  background: rgba(139,92,246,0.15);
  transform: translateX(4px);
}

.quiz-option.selected::before {
  opacity: 1;
}

.option-radio {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  transition: all 0.3s ease;
  margin-top: 0.125rem;
}

.quiz-option:hover .option-radio {
  border-color: #8b5cf6;
}

.quiz-option.selected .option-radio {
  border-color: #8b5cf6;
  background: #8b5cf6;
  box-shadow: 0 0 16px rgba(139,92,246,0.5);
}

.quiz-option.selected .option-radio::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  animation: check-pop 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
}

@keyframes check-pop {
  0% { transform: translate(-50%, -50%) scale(0); }
  50% { transform: translate(-50%, -50%) scale(1.2); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

.option-content {
  flex: 1;
}

.option-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.25rem;
  transition: color 0.3s ease;
}

.quiz-option:hover .option-title,
.quiz-option.selected .option-title {
  color: #fff;
}

.option-description {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
}

/* Navigation Buttons */
.quiz-navigation {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  animation: fade-in 0.5s ease-out 0.3s backwards;
}

.quiz-nav-btn {
  flex: 1;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  position: relative;
  overflow: hidden;
}

.quiz-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

.quiz-nav-btn.btn-back {
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.2);
}

.quiz-nav-btn.btn-back:hover:not(:disabled) {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.3);
  transform: translateX(-2px);
}

.quiz-nav-btn.btn-next {
  background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 4px 20px rgba(139,92,246,0.3);
}

.quiz-nav-btn.btn-next:hover:not(:disabled) {
  box-shadow: 0 6px 30px rgba(139,92,246,0.5);
  transform: translateY(-2px);
}

.quiz-nav-btn.btn-next::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
  transition: left 0.5s ease;
}

.quiz-nav-btn.btn-next:hover::before {
  left: 100%;
}

/* Results Card */
.quiz-results {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px;
  padding: 3rem;
  position: relative;
  overflow: hidden;
  animation: scale-in 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scale-in {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.quiz-results::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #8b5cf6 0%, #3b82f6 50%, #10b981 100%);
}

.results-header {
  text-align: center;
  margin-bottom: 2rem;
}

.results-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, rgba(139,92,246,0.2) 0%, rgba(59,130,246,0.2) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  animation: bounce-in 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s backwards;
  border: 2px solid rgba(139,92,246,0.3);
}

@keyframes bounce-in {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.results-title {
  font-size: 1.25rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.5rem;
}

.results-package {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.results-description {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.8);
  max-width: 500px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

/* Recommended Features List */
.results-features {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.results-features h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.results-features h3::before {
  content: '✨';
  font-size: 1.5rem;
}

.feature-list {
  display: grid;
  gap: 1rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255,255,255,0.02);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
  animation: fade-in-up 0.5s ease-out backwards;
}

.feature-item:nth-child(1) { animation-delay: 0.1s; }
.feature-item:nth-child(2) { animation-delay: 0.2s; }
.feature-item:nth-child(3) { animation-delay: 0.3s; }
.feature-item:nth-child(4) { animation-delay: 0.4s; }

.feature-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(139,92,246,0.2) 0%, rgba(59,130,246,0.2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(139,92,246,0.3);
}

.feature-text {
  flex: 1;
}

.feature-text strong {
  color: #fff;
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}

.feature-text span {
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Results Actions */
.results-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.results-cta {
  flex: 1;
  padding: 1.25rem 2rem;
  border-radius: 12px;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  text-decoration: none;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.results-cta.primary {
  background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(139,92,246,0.3);
}

.results-cta.primary:hover {
  box-shadow: 0 6px 30px rgba(139,92,246,0.5);
  transform: translateY(-2px);
}

.results-cta.secondary {
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.2);
}

.results-cta.secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.3);
}

/* Restart Link */
.restart-quiz {
  text-align: center;
  margin-top: 1.5rem;
}

.restart-quiz button {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 0.875rem;
  cursor: pointer;
  transition: color 0.3s ease;
  text-decoration: underline;
}

.restart-quiz button:hover {
  color: rgba(255,255,255,0.8);
}

/* Responsive Design */
@media (max-width: 768px) {
  .package-quiz-section {
    padding: 4rem 0;
  }
  
  .quiz-header h2 {
    font-size: 2rem;
  }
  
  .quiz-header p {
    font-size: 1rem;
  }
  
  .quiz-question {
    padding: 2rem 1.5rem;
  }
  
  .question-text {
    font-size: 1.25rem;
  }
  
  .quiz-option {
    padding: 1.25rem;
    flex-direction: row;
  }
  
  .option-title {
    font-size: 1rem;
  }
  
  .quiz-navigation {
    flex-direction: column-reverse;
  }
  
  .quiz-nav-btn {
    width: 100%;
  }
  
  .quiz-results {
    padding: 2rem 1.5rem;
  }
  
  .results-package {
    font-size: 2rem;
  }
  
  .results-actions {
    flex-direction: column;
  }
  
  .results-cta {
    width: 100%;
  }
}

/* Accessibility */
.quiz-option:focus-visible {
  outline: 2px solid #8b5cf6;
  outline-offset: 2px;
}

.quiz-nav-btn:focus-visible {
  outline: 2px solid #8b5cf6;
  outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .package-quiz-section::before,
  .package-quiz-section::after,
  .progress-bar-fill::after,
  .quiz-nav-btn.btn-next::before {
    animation: none;
  }
  
  .quiz-question,
  .quiz-results,
  .feature-item,
  .results-icon {
    animation: none;
  }
  
  * {
    transition-duration: 0.01ms !important;
  }
}
