/* ========================================
   TUTORIAL MODAL STYLES
   Professional Tutorial Presentation Design
   ======================================== */

/* Enhanced How to Play Modal - Presentation Style */
#howToPlayOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.how-to-play-content {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.98),
    rgba(248, 250, 252, 0.98)
  );
  border: 1px solid rgba(99, 102, 241, 0.1);
  border-radius: 32px;
  width: 95vw;
  max-width: 1200px;
  height: 85vh;
  max-height: 800px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.2),
    0 15px 45px rgba(99, 102, 241, 0.1);
  backdrop-filter: blur(20px);
  position: relative;
  animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.tutorial-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 40px;
  border-bottom: 2px solid rgba(99, 102, 241, 0.1);
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.05),
    rgba(139, 92, 246, 0.05)
  );
}

.tutorial-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tutorial-icon {
  font-size: 3rem;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 20px;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.tutorial-title h1 {
  font-family: "Poppins", sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.close-tutorial-btn {
  background: #f1f5f9;
  border: 2px solid #e2e8f0;
  border-radius: 50%;
  color: #64748b;
  font-size: 1.2rem;
  font-weight: 600;
  width: 48px;
  height: 48px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-tutorial-btn:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
  transform: scale(1.1) rotate(90deg);
}

.tutorial-slides {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.tutorial-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 40px;
  display: flex;
  align-items: center;
}

.tutorial-slide.active {
  opacity: 1;
  transform: translateX(0);
}

.tutorial-slide.prev {
  transform: translateX(-100%);
}

.slide-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  width: 100%;
  height: 100%;
  align-items: center;
}

.slide-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.slide-text {
  padding: 20px 0;
}

.slide-text h2 {
  font-family: "Poppins", sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 16px 0;
  line-height: 1.2;
}

.slide-text p {
  font-size: 1.2rem;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 32px;
}

/* Welcome slide styles */
.welcome-animation {
  text-align: center;
}

.quiz-mockup {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 24px;
  padding: 32px;
  color: white;
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.3);
  animation: float 6s ease-in-out infinite;
}

.mockup-header {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.mockup-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mockup-option {
  background: rgba(255, 255, 255, 0.2);
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
}

.slide-features {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(99, 102, 241, 0.1);
  padding: 16px 20px;
  border-radius: 16px;
  border: 2px solid rgba(99, 102, 241, 0.2);
  font-weight: 600;
  color: #374151;
}

.feature-icon {
  font-size: 1.5rem;
}

/* Setup demo styles */
.setup-demo {
  display: flex;
  flex-direction: column;
  gap: 32px;
  background: white;
  padding: 32px;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

.demo-section {
  text-align: center;
}

.demo-label {
  font-size: 1.2rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 16px;
}

.demo-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.demo-btn {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.3s ease;
}

.demo-btn.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-color: #6366f1;
  color: white;
}

.setup-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(99, 102, 241, 0.05);
  border-radius: 12px;
  border-left: 4px solid #6366f1;
}

.step-number {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.step-text {
  font-size: 1.1rem;
  color: #374151;
  font-weight: 500;
}

/* Gameplay demo styles */
.gameplay-demo {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}

.question-mockup {
  background: white;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

.question-header {
  text-align: center;
  font-weight: 600;
  color: #6366f1;
  margin-bottom: 20px;
}

.question-text {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  text-align: center;
  margin-bottom: 24px;
}

.answer-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.answer-option {
  padding: 12px 16px;
  border-radius: 8px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.answer-option.correct {
  background: #dcfce7;
  border-color: #22c55e;
  color: #166534;
}

.score-display {
  display: flex;
  gap: 16px;
}

.team-score {
  padding: 12px 20px;
  background: #f1f5f9;
  border-radius: 12px;
  font-weight: 600;
  color: #64748b;
}

.team-score.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
}

.team-score span {
  font-weight: 700;
}

.gameplay-flow {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.flow-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 12px;
  text-align: center;
  font-weight: 600;
  color: #374151;
}

.flow-icon {
  font-size: 1.5rem;
}

.flow-arrow {
  font-size: 1.5rem;
  color: #6366f1;
  font-weight: bold;
}

/* Time Attack demo styles */
.timeattack-demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.timer-display {
  text-align: center;
}

.timer-circle {
  width: 120px;
  height: 120px;
  border: 8px solid #6366f1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  animation: pulse 2s ease-in-out infinite;
}

.timer-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
}

.timer-label {
  font-size: 1.1rem;
  color: #64748b;
  font-weight: 600;
}

.time-options {
  display: flex;
  gap: 12px;
}

.time-btn {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.3s ease;
}

.time-btn.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-color: #6366f1;
  color: white;
}

.timeattack-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.feature-highlight {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: rgba(99, 102, 241, 0.05);
  border-radius: 16px;
  border-left: 4px solid #6366f1;
}

.highlight-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.highlight-text strong {
  display: block;
  font-size: 1.1rem;
  color: #1e293b;
  margin-bottom: 4px;
}

.highlight-text p {
  color: #64748b;
  margin: 0;
  font-size: 1rem;
}

/* Victory demo styles */
.victory-demo {
  text-align: center;
}

.trophy-display {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border-radius: 24px;
  padding: 40px;
  color: white;
  box-shadow: 0 20px 60px rgba(251, 191, 36, 0.3);
}

.trophy {
  font-size: 4rem;
  margin-bottom: 16px;
  animation: bounce 2s ease-in-out infinite;
}

.winner-text {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.final-scores {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.final-score {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-weight: 600;
}

.final-score.winner {
  background: rgba(255, 255, 255, 0.3);
  font-weight: 700;
  transform: scale(1.05);
}

.victory-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: rgba(99, 102, 241, 0.05);
  border-radius: 16px;
  border-left: 4px solid #6366f1;
}

.card-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.card-content strong {
  display: block;
  color: #1e293b;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.card-content p {
  color: #64748b;
  margin: 0;
}

/* Tutorial navigation */
.tutorial-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 40px 32px;
  border-top: 2px solid rgba(99, 102, 241, 0.1);
  background: rgba(248, 250, 252, 0.5);
}

.nav-btn {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border: none;
  border-radius: 16px;
  color: white;
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  padding: 16px 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.nav-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.nav-btn:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
}

.nav-icon {
  font-size: 1rem;
}

.slide-indicators {
  display: flex;
  gap: 12px;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e2e8f0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  transform: scale(1.2);
}

.indicator:hover {
  background: #cbd5e1;
  transform: scale(1.1);
}

/* Responsive design */
@media (max-width: 1024px) {
  .slide-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .tutorial-title h1 {
    font-size: 2rem;
  }

  .slide-text h2 {
    font-size: 1.8rem;
  }
}

@media (max-width: 768px) {
  .how-to-play-content {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    margin: 0;
  }

  .tutorial-header {
    padding: 20px;
  }

  .tutorial-title h1 {
    font-size: 1.5rem;
  }

  .tutorial-icon {
    width: 48px;
    height: 48px;
    font-size: 2rem;
  }

  .tutorial-slide {
    padding: 20px;
  }

  .tutorial-navigation {
    padding: 16px 20px;
  }

  .nav-btn {
    padding: 12px 16px;
    font-size: 0.9rem;
  }
}
