/**
 * Modern Tutorial Styles
 * Clean and modern design for tutorial popup
 */

/* Tutorial Overlay */
#tutorialOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

#tutorialOverlay.hidden {
  display: none;
}

/* Tutorial Popup */
#tutorialPopup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #2c3e50 0%, #4a5568 100%);
  padding: 0;
  border-radius: 20px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
  z-index: 10001;
  max-width: 90%;
  width: 450px;
  animation: slideInBounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  overflow: hidden;
}

#tutorialPopup.hidden {
  display: none;
}

/* Tutorial Header */
#tutorialPopup > div:first-child {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 25px 30px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  text-align: center;
}

#tutorialPopup strong {
  color: white;
  font-size: 28px;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.5px;
}

/* Tutorial Content */
.popup-controls {
  padding: 30px;
  color: white;
  font-size: 18px;
  line-height: 2;
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
}

.popup-controls br {
  display: block;
  margin: 8px 0;
  content: "";
}

.popup-controls span {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 6px;
  font-weight: 900;
  text-decoration: none !important;
  margin-right: 8px;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Tutorial Icon Emoji */
.tutorial-icon {
  font-size: 48px;
  margin-bottom: 15px;
  display: block;
}

/* Close Button */
#closeTutorial {
  width: calc(100% - 60px);
  margin: 20px 30px 30px 30px;
  padding: 16px 40px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid white;
  color: white;
  font-size: 18px;
  font-weight: 700;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  backdrop-filter: blur(10px);
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#closeTutorial:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

#closeTutorial:active {
  transform: scale(0.98) translateY(0);
}

/* Mobile optimizations */
@media (max-width: 768px) {
  #tutorialPopup {
    width: 95%;
    max-width: 95%;
  }

  #tutorialPopup strong {
    font-size: 24px;
  }

  .popup-controls {
    font-size: 16px;
    padding: 25px;
    line-height: 1.8;
  }

  .popup-controls span {
    font-size: 14px;
    padding: 3px 10px;
  }

  #closeTutorial {
    font-size: 16px;
    padding: 14px 30px;
    margin: 15px 20px 25px 20px;
    width: calc(100% - 40px);
  }

  .tutorial-icon {
    font-size: 40px;
    margin-bottom: 10px;
  }
}

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

@keyframes slideInBounce {
  0% {
    opacity: 0;
    transform: translate(-50%, -60%) scale(0.8);
  }
  50% {
    transform: translate(-50%, -48%) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Touch devices */
@media (hover: none) and (pointer: coarse) {
  #closeTutorial {
    min-height: 50px;
  }

  .popup-controls span {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  #tutorialPopup {
    animation: none;
  }

  #tutorialOverlay {
    animation: none;
  }

  #closeTutorial {
    transition: none;
  }
}

/* Focus states for accessibility */
#closeTutorial:focus {
  outline: 3px solid rgba(255, 255, 255, 0.6);
  outline-offset: 4px;
}

/* Instruction rows */
.instruction-row {
  display: flex;
  align-items: center;
  margin: 12px 0;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.instruction-row:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(5px);
}

.instruction-icon {
  font-size: 24px;
  margin-right: 15px;
  min-width: 30px;
  text-align: center;
}

.instruction-text {
  flex: 1;
  font-size: 16px;
  line-height: 1.5;
}
