/* Tutorial Overlay */
.tutorial-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 20, 0.93);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  overflow: hidden;
}

.tutorial-progress-bar-wrap {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,0.1);
}
.tutorial-progress-bar {
  height: 100%;
  background: var(--accent, #3fb950);
  width: 100%;
  transition: none;
}

.tutorial-game-label {
  position: absolute;
  top: 14px;
  left: 0; right: 0;
  text-align: center;
  font-size: clamp(0.6rem, 2vw, 0.72rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.35);
}

.tutorial-step-content {
  text-align: center;
  max-width: 360px;
  padding: 0 24px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.tutorial-caption {
  position: absolute;
  bottom: 44px;
  left: 0; right: 0;
  text-align: center;
  font-size: clamp(0.72rem, 2.5vw, 0.82rem);
  color: rgba(255,255,255,0.45);
  padding: 0 24px;
  animation: tutFadeIn 0.5s ease forwards;
}

.tutorial-skip-btn {
  position: absolute;
  bottom: 14px;
  right: 18px;
  font-size: clamp(0.65rem, 2vw, 0.72rem);
  color: rgba(255,255,255,0.25);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.4s ease, color 0.2s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  padding: 8px 4px;
}
.tutorial-skip-btn.tutorial-skip-visible {
  opacity: 1;
}
.tutorial-skip-btn:hover {
  color: rgba(255,255,255,0.6);
}

.tutorial-flash-text {
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  font-weight: 900;
  animation: tutFlash 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.tutorial-score-pop {
  position: absolute;
  font-size: clamp(0.85rem, 3vw, 1rem);
  font-weight: 700;
  color: var(--accent, #3fb950);
  animation: tutPop 1.2s ease forwards;
  pointer-events: none;
  white-space: nowrap;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.tutorial-countdown {
  font-size: clamp(3rem, 12vw, 5rem);
  font-weight: 900;
  animation: tutFlash 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.tutorial-exiting {
  animation: tutFadeOut 0.3s ease forwards;
}

/* Keyframes */
@keyframes tutFlash {
  0%   { opacity: 0; transform: scale(0.7); }
  60%  { opacity: 1; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes tutPop {
  0%   { opacity: 0; transform: translate(-50%, -30%); }
  20%  { opacity: 1; transform: translate(-50%, -60%); }
  70%  { opacity: 1; transform: translate(-50%, -80%); }
  100% { opacity: 0; transform: translate(-50%, -100%); }
}

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

@keyframes tutFadeOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.96); }
}
