/* =============================================
   ТУТОРИАЛ - Стили
   ============================================= */

/* =============================================
   ПРИВЕТСТВЕННЫЕ СЛАЙДЫ
   ============================================= */

#tutorial-welcome-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

#tutorial-welcome-overlay.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

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

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

.tutorial-welcome-container {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.tutorial-welcome-card {
  background: rgba(60,50,90,0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 24px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  animation: slideUp 0.4s ease;
}

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

.tutorial-welcome-icon {
  font-size: 64px;
  margin-bottom: 16px;
  animation: bounce 2s infinite;
}

.tutorial-welcome-image {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.tutorial-welcome-title {
  font-size: 24px;
  font-weight: 700;
  color: white;
  margin: 0 0 12px 0;
}

.tutorial-welcome-text {
  font-size: 15px;
  color: rgba(255,255,255,0.8);
  line-height: 1.5;
  margin: 0 0 20px 0;
}

/* Маскот */
.tutorial-mascot {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255,200,100,0.15);
  border: 1px solid rgba(255,200,100,0.3);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 20px;
  text-align: left;
}

.tutorial-mascot.inline {
  background: rgba(255,200,100,0.15);
  border: 1px solid rgba(255,200,100,0.3);
}

.tutorial-mascot.small {
  padding: 8px;
  gap: 8px;
  background: rgba(255,200,100,0.1);
  border: 1px solid rgba(255,200,100,0.2);
  border-radius: 8px;
  margin: 8px 0;
}

.tutorial-mascot-icon {
  font-size: 32px;
  animation: wiggle 2s infinite;
  flex-shrink: 0;
}

.tutorial-mascot.small .tutorial-mascot-icon {
  font-size: 20px;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

.tutorial-mascot-bubble {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  color: white;
  position: relative;
}

.tutorial-mascot-bubble::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 12px;
  border: 6px solid transparent;
  border-right-color: rgba(255,255,255,0.15);
}

.tutorial-mascot.small .tutorial-mascot-text {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
}

/* Точки прогресса */
.tutorial-welcome-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.tutorial-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transition: all 0.3s;
}

.tutorial-dot.active {
  background: #667eea;
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(102,126,234,0.5);
}

.tutorial-dot.completed {
  background: #00d9a5;
}

/* Кнопки */
.tutorial-welcome-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.tutorial-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.tutorial-btn.primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.tutorial-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.tutorial-btn.secondary {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.2);
}

.tutorial-btn.secondary:hover {
  background: rgba(255,255,255,0.25);
}

.tutorial-btn.small {
  padding: 8px 16px;
  font-size: 13px;
}

.tutorial-btn.full {
  width: 100%;
}

/* =============================================
   МОДАЛКА ВЫБОРА РЕГИОНА
   ============================================= */

#tutorial-region-prompt {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
}

.tutorial-modal-overlay {
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.tutorial-modal {
  background: rgba(60,50,90,0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  width: 100%;
  max-width: 380px;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

.tutorial-modal-header {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 16px 20px;
  font-size: 18px;
  font-weight: 600;
}

.tutorial-modal-body {
  padding: 20px;
}

.tutorial-region-tips {
  margin: 16px 0;
}

.tutorial-tip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.9);
}

.tutorial-tip-icon {
  font-size: 18px;
}

/* =============================================
   ИНТЕРАКТИВНЫЕ ПОДСКАЗКИ (TOOLTIPS)
   ============================================= */

#tutorial-tooltip {
  position: fixed;
  z-index: 10001;
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.2s ease;
  pointer-events: none;
}

#tutorial-tooltip.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.tutorial-tooltip-card {
  background: rgba(60,50,90,0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  max-width: 260px;
  position: relative;
}

.tutorial-tooltip-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
}

.tutorial-tooltip-close:hover {
  background: rgba(255,255,255,0.25);
  color: white;
}

.tutorial-tooltip-title {
  font-size: 16px;
  font-weight: 700;
  color: white;
  margin-bottom: 6px;
  padding-right: 20px;
}

.tutorial-tooltip-text {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  line-height: 1.4;
  margin-bottom: 10px;
}

.tutorial-tooltip-arrow {
  position: absolute;
  width: 16px;
  height: 16px;
  background: rgba(60,50,90,0.95);
  transform: rotate(45deg);
  border: 1px solid rgba(255,255,255,0.15);
}

/* Position variants */
#tutorial-tooltip.position-top {
  transform-origin: bottom center;
}
#tutorial-tooltip.position-top .tutorial-tooltip-card {
  margin-bottom: 10px;
}
#tutorial-tooltip.position-top .tutorial-tooltip-arrow {
  bottom: 2px;
  left: 50%;
  margin-left: -8px;
}

#tutorial-tooltip.position-bottom {
  transform-origin: top center;
}
#tutorial-tooltip.position-bottom .tutorial-tooltip-card {
  margin-top: 10px;
}
#tutorial-tooltip.position-bottom .tutorial-tooltip-arrow {
  top: 2px;
  left: 50%;
  margin-left: -8px;
}

#tutorial-tooltip.position-left {
  transform-origin: right center;
}
#tutorial-tooltip.position-left .tutorial-tooltip-card {
  margin-right: 10px;
}
#tutorial-tooltip.position-left .tutorial-tooltip-arrow {
  right: 2px;
  top: 50%;
  margin-top: -8px;
}

#tutorial-tooltip.position-right {
  transform-origin: left center;
}
#tutorial-tooltip.position-right .tutorial-tooltip-card {
  margin-left: 10px;
}
#tutorial-tooltip.position-right .tutorial-tooltip-arrow {
  left: 2px;
  top: 50%;
  margin-top: -8px;
}

/* Highlight effect */
.tutorial-highlight {
  position: relative;
  z-index: 10000;
  animation: pulse-highlight 1.5s infinite;
}

@keyframes pulse-highlight {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.3);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(102, 126, 234, 0.1);
  }
}

/* =============================================
   СПРАВКА
   ============================================= */

.help-sections {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.help-section-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  width: 100%;
}

.help-section-btn:hover {
  background: rgba(255,255,255,0.2);
  transform: translateX(4px);
}

.help-section-icon {
  font-size: 24px;
}

.help-section-title {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: white;
}

.help-section-arrow {
  color: rgba(255,255,255,0.5);
  font-size: 18px;
}

.help-content {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.9);
}

.help-content h4 {
  font-size: 15px;
  color: white;
  margin: 16px 0 8px 0;
}

.help-content h4:first-child {
  margin-top: 0;
}

.help-content p {
  margin: 0 0 10px 0;
}

.help-content ul, .help-content ol {
  margin: 0 0 12px 0;
  padding-left: 20px;
}

.help-content li {
  margin-bottom: 4px;
}

/* =============================================
   АДАПТИВНОСТЬ
   ============================================= */

@media (max-width: 480px) {
  .tutorial-welcome-card {
    padding: 24px 16px;
  }
  
  .tutorial-welcome-icon {
    font-size: 48px;
  }
  
  .tutorial-welcome-title {
    font-size: 20px;
  }
  
  .tutorial-welcome-text {
    font-size: 14px;
  }
  
  .tutorial-tooltip-card {
    max-width: 220px;
    padding: 12px;
  }
  
  .tutorial-tooltip-title {
    font-size: 14px;
  }
  
  .tutorial-tooltip-text {
    font-size: 12px;
  }
}

/* =============================================
   ТУР ПО ИНТЕРФЕЙСУ
   ============================================= */

.interface-tour-tooltip {
  position: fixed;
  z-index: 10001;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.interface-tour-tooltip.visible {
  opacity: 1;
  pointer-events: auto;
}

.interface-tour-tooltip.position-right {
  transform: translateY(-50%) translateX(0);
}

.interface-tour-tooltip.position-left {
  transform: translateY(-50%) translateX(-100%);
}

.interface-tour-tooltip.position-right.visible {
  transform: translateY(-50%) translateX(0);
}

.interface-tour-tooltip.position-left.visible {
  transform: translateY(-50%) translateX(-100%);
}

.tour-tooltip-card {
  background: rgba(60, 50, 90, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 16px 20px;
  min-width: 240px;
  max-width: 280px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  color: white;
}

.tour-tooltip-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.tour-tooltip-icon {
  font-size: 24px;
}

.tour-tooltip-title {
  font-size: 18px;
  font-weight: 700;
  flex: 1;
}

.tour-tooltip-counter {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
}

.tour-tooltip-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
  margin-bottom: 12px;
}

.tour-tooltip-mascot {
  font-size: 13px;
  color: #ffd93d;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tour-tooltip-btn {
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.tour-tooltip-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.tour-tooltip-btn:active {
  transform: translateY(0);
}

/* Стрелка подсказки */
.tour-tooltip-arrow {
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border: 10px solid transparent;
  transform: translateY(-50%);
}

.position-right .tour-tooltip-arrow {
  left: -20px;
  border-right-color: rgba(60, 50, 90, 0.98);
}

.position-left .tour-tooltip-arrow {
  right: -20px;
  border-left-color: rgba(60, 50, 90, 0.98);
}

/* Подсветка кнопки во время тура */
.tour-highlight {
  position: relative;
  z-index: 10000;
  animation: tourPulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.5), 0 0 20px rgba(102, 126, 234, 0.3) !important;
  border-radius: 12px;
}

@keyframes tourPulse {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.5), 0 0 20px rgba(102, 126, 234, 0.3);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(102, 126, 234, 0.3), 0 0 30px rgba(102, 126, 234, 0.5);
  }
}

/* Мобильная адаптация тура */
@media (max-width: 768px) {
  .tour-tooltip-card {
    min-width: 200px;
    max-width: 240px;
    padding: 14px 16px;
  }
  
  .tour-tooltip-title {
    font-size: 16px;
  }
  
  .tour-tooltip-text {
    font-size: 13px;
  }
  
  .tour-tooltip-btn {
    padding: 10px 16px;
    font-size: 14px;
  }
}

