/* ============================================================
   TUTORIAL — Interactive spotlight tour
   Karartma overlay · Parlatılmış spotlight · Liquid Glass tooltip · Senaryo modal
   ============================================================ */

/* ─── Overlay (full screen dark layer) ─────────────────────── */
.tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: auto;
  animation: tutorial-overlay-in 320ms cubic-bezier(0.32, 0.72, 0, 1);
}
@keyframes tutorial-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Karartma elementi — spotlight DIŞI alanı koyu yapan inset shadow.
   Yavaş, akıcı geçişler — Patron'un gözü hangi alana bakacağını
   takip edebilmeli. Çift pulse: KW kırmızı + beyaz halka. */
.tutorial-spotlight {
  position: absolute;
  border-radius: 12px;
  pointer-events: none;
  background: transparent;
  box-shadow:
    0 0 0 9999px rgba(0, 0, 0, 0.68),
    0 0 0 2px rgba(255, 255, 255, 0.55),
    0 0 36px 10px rgba(200, 16, 46, 0.34);
  transition:
    top 480ms cubic-bezier(0.32, 0.72, 0, 1),
    left 480ms cubic-bezier(0.32, 0.72, 0, 1),
    width 480ms cubic-bezier(0.32, 0.72, 0, 1),
    height 480ms cubic-bezier(0.32, 0.72, 0, 1),
    border-radius 320ms ease;
  animation: spotlight-pulse 3.2s ease-in-out infinite;
  will-change: top, left, width, height;
}
@keyframes spotlight-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 9999px rgba(0, 0, 0, 0.68),
      0 0 0 2px rgba(255, 255, 255, 0.45),
      0 0 32px 8px rgba(200, 16, 46, 0.30);
  }
  50% {
    box-shadow:
      0 0 0 9999px rgba(0, 0, 0, 0.68),
      0 0 0 3px rgba(255, 255, 255, 0.85),
      0 0 64px 18px rgba(200, 16, 46, 0.58);
  }
}

/* Border tracer — spotlight çerçevesinin ÜZERİNDE dolaşan parlak kırmızı arc.
   Download progress indicator gibi: dar bir parlak ışık border boyunca koşar. */
.tutorial-spotlight::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: conic-gradient(
    from var(--spot-angle, 0deg),
    transparent 0deg 270deg,
    rgba(200, 16, 46, 0.0) 280deg,
    rgba(200, 16, 46, 0.55) 320deg,
    rgba(255, 77, 109, 1) 350deg,
    rgba(255, 200, 210, 1) 358deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  padding: 2.5px;
  filter: blur(0.4px) drop-shadow(0 0 6px rgba(200, 16, 46, 0.6));
  pointer-events: none;
  animation: spotlight-border-trace 2.6s linear infinite;
  opacity: 0.95;
}
@property --spot-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes spotlight-border-trace {
  from { --spot-angle: 0deg; }
  to   { --spot-angle: 360deg; }
}
/* Fallback for browsers without @property support — basit rotate */
@supports not (background: conic-gradient(from 0deg, red, blue)) {
  .tutorial-spotlight::after { display: none; }
}

/* Hedef element üzerindeki ek glow (tutorial-target sınıfı eklenir) */
.tutorial-target {
  position: relative;
  z-index: 9001 !important;
  filter: drop-shadow(0 0 0 transparent);
  animation: target-glow 3.2s ease-in-out infinite;
}
@keyframes target-glow {
  0%, 100% { filter: drop-shadow(0 0 0 transparent); }
  50%      { filter: drop-shadow(0 0 14px rgba(200, 16, 46, 0.55)); }
}

/* ─── Tooltip card (Liquid Glass — DAİMA LIGHT, dark tema'da invert) ─── */
/* Dark tema'da popup light kalır → daha çok dikkat çeker */
.tutorial-tooltip {
  position: absolute;
  z-index: 9100;
  min-width: 320px;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(60px) saturate(200%);
  -webkit-backdrop-filter: blur(60px) saturate(200%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 22px;
  padding: 24px 26px 22px;
  /* Tüm tooltip iç yazıları light theme renklerine zorla (kullanıcı dark mode'da bile) */
  color: #1D1D1F;
  --tt-text-primary: #1D1D1F;
  --tt-text-secondary: #6E6E73;
  --tt-text-tertiary: #86868B;
  --tt-bg-soft: rgba(0, 0, 0, 0.04);
  --tt-bg-soft-hover: rgba(0, 0, 0, 0.08);
  --tt-border: rgba(0, 0, 0, 0.08);
  --tt-dot-idle: rgba(0, 0, 0, 0.12);
  box-shadow:
    0 32px 80px -24px rgba(0, 0, 0, 0.55),
    0 8px 24px -8px rgba(200, 16, 46, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  animation: tooltip-in 360ms cubic-bezier(0.32, 0.72, 0, 1);
  transition:
    top 380ms cubic-bezier(0.32, 0.72, 0, 1),
    left 380ms cubic-bezier(0.32, 0.72, 0, 1);
  will-change: top, left;
  overflow: hidden;
}
/* Tooltip üst çubuğu — KW kırmızı progress fill (dolan) */
.tutorial-tooltip::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  height: 3px;
  width: var(--tt-progress, 0%);
  background: linear-gradient(90deg, #C8102E, #FF4D6D);
  box-shadow: 0 0 12px rgba(200, 16, 46, 0.55);
  transition: width 520ms cubic-bezier(0.32, 0.72, 0, 1);
  pointer-events: none;
  z-index: 1;
}
/* Dark tema → tooltip'in shadow'u daha güçlü, ama içerik aynı (light) */
[data-theme="dark"] .tutorial-tooltip {
  box-shadow:
    0 32px 80px -16px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 60px -8px rgba(255, 255, 255, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
@keyframes tooltip-in {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Tooltip arrow (pointer) */
.tutorial-tooltip::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: inherit;
  border: inherit;
  transform: rotate(45deg);
  pointer-events: none;
}
.tutorial-tooltip[data-arrow="left"]::before {
  left: -7px; top: 50%; margin-top: -7px;
  border-right: none; border-top: none;
}
.tutorial-tooltip[data-arrow="right"]::before {
  right: -7px; top: 50%; margin-top: -7px;
  border-left: none; border-bottom: none;
}
.tutorial-tooltip[data-arrow="top"]::before {
  top: -7px; left: 50%; margin-left: -7px;
  border-bottom: none; border-right: none;
}
.tutorial-tooltip[data-arrow="bottom"]::before {
  bottom: -7px; left: 50%; margin-left: -7px;
  border-top: none; border-left: none;
}
.tutorial-tooltip[data-arrow="none"]::before { display: none; }

/* Progress strip */
.tutorial-progress {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
  font-size: 11px;
  color: var(--tt-text-tertiary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.tutorial-progress-dots {
  display: flex; gap: 4px;
  flex: 1;
}
.tutorial-progress-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tt-dot-idle);
  transition: all 280ms cubic-bezier(0.32, 0.72, 0, 1);
}
.tutorial-progress-dot.done    { background: rgba(200, 16, 46, 0.55); }
.tutorial-progress-dot.current {
  background: linear-gradient(135deg, #C8102E, #FF4D6D);
  width: 18px;
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(200, 16, 46, 0.5);
}
.tutorial-counter {
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* Icon + Title + Body */
.tutorial-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.12), rgba(255, 77, 109, 0.06));
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 12px;
}
.tutorial-h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.018em;
  margin: 0 0 8px;
  line-height: 1.3;
  color: var(--tt-text-primary);
}
.tutorial-body {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--tt-text-secondary);
  letter-spacing: -0.005em;
  margin: 0 0 14px;
}
.tutorial-example {
  background: rgba(200, 16, 46, 0.06);
  border-left: 3px solid #C8102E;
  border-radius: 0 10px 10px 0;
  padding: 10px 14px;
  font-size: 12.5px;
  font-style: italic;
  color: var(--tt-text-secondary);
  margin: 0 0 18px;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.tutorial-example .tip-icon { flex-shrink: 0; font-style: normal; }

/* Action buttons */
.tutorial-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.tutorial-btn {
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 180ms cubic-bezier(0.32, 0.72, 0, 1);
  border: 1px solid var(--tt-border);
  background: var(--tt-bg-soft);
  color: var(--tt-text-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.tutorial-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 0, 0, 0.16);
  background: var(--tt-bg-soft-hover);
}
.tutorial-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}
.tutorial-btn.primary {
  background: linear-gradient(135deg, #C8102E, #FF4D6D);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px -2px rgba(200, 16, 46, 0.35);
}
.tutorial-btn.primary:hover {
  box-shadow: 0 8px 20px -4px rgba(200, 16, 46, 0.50);
  transform: translateY(-1px);
}
.tutorial-btn.primary:active { transform: translateY(0) scale(0.97); }

.tutorial-skip {
  margin-left: auto;
  font-size: 12px;
  color: var(--tt-text-tertiary);
  cursor: pointer;
  padding: 8px 6px;
  text-decoration: none;
  transition: color 180ms;
  user-select: none;
}
.tutorial-skip:hover { color: var(--tt-text-secondary); }

/* ─── DEV Skip Toolbar (sağ üst köşe — geliştirme için) ────── */
.tutorial-dev-toolbar {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9500;
  display: flex;
  gap: 6px;
  padding: 6px;
  background: rgba(20, 20, 22, 0.85);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.4);
  font-size: 11px;
}
.tutorial-dev-toolbar .label {
  display: inline-flex;
  align-items: center;
  padding: 0 8px 0 10px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 10px;
}
.tutorial-dev-btn {
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: all 160ms cubic-bezier(0.32, 0.72, 0, 1);
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tutorial-dev-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.18);
}
.tutorial-dev-btn.danger {
  background: rgba(200, 16, 46, 0.18);
  border-color: rgba(200, 16, 46, 0.35);
  color: #FF6B7D;
}
.tutorial-dev-btn.danger:hover {
  background: rgba(200, 16, 46, 0.28);
  border-color: rgba(200, 16, 46, 0.55);
}

/* ─── Skip Confirm Dialog ──────────────────────────────────── */
.tutorial-skip-confirm {
  position: fixed;
  inset: 0;
  z-index: 9300;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: tutorial-overlay-in 240ms cubic-bezier(0.32, 0.72, 0, 1);
}
.tutorial-skip-card {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(60px) saturate(200%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  padding: 28px 30px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  /* Light theme zorla */
  color: #1D1D1F;
  --tt-text-primary: #1D1D1F;
  --tt-text-secondary: #6E6E73;
  --tt-text-tertiary: #86868B;
  --tt-bg-soft: rgba(0, 0, 0, 0.04);
  --tt-bg-soft-hover: rgba(0, 0, 0, 0.08);
  --tt-border: rgba(0, 0, 0, 0.08);
  box-shadow:
    0 32px 80px -16px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  animation: tooltip-in 280ms cubic-bezier(0.32, 0.72, 0, 1);
}
[data-theme="dark"] .tutorial-skip-card {
  /* Dark mode → ek glow */
  box-shadow:
    0 32px 80px -16px rgba(0, 0, 0, 0.85),
    0 0 60px -8px rgba(255, 255, 255, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.tutorial-skip-card h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--tt-text-primary);
}
.tutorial-skip-card p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--tt-text-secondary);
  margin: 0 0 22px;
}
.tutorial-skip-card .actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

/* ─── Senaryo Modal (Adım 12 — TEK EKRAN, scroll yok) ───────── */
/* Card: max-height 92vh, içerik sıkıştırılmış. Light theme her durumda. */
.tutorial-scenario {
  position: fixed;
  inset: 0;
  z-index: 9200;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;          /* dikey ortala */
  justify-content: center;
  padding: 16px;
  animation: tutorial-overlay-in 320ms cubic-bezier(0.32, 0.72, 0, 1);
}
.tutorial-scenario-card {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(60px) saturate(200%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 22px;
  padding: 22px 28px 20px;       /* sıkıştırıldı: 40 → 22 */
  max-width: 680px;
  width: 100%;
  max-height: 94vh;
  overflow: hidden;              /* scroll YOK */
  display: flex;
  flex-direction: column;
  /* Light theme renkleri zorla — kullanıcı dark mode'da bile */
  color: #1D1D1F;
  --sc-text-primary: #1D1D1F;
  --sc-text-secondary: #6E6E73;
  --sc-text-tertiary: #86868B;
  --sc-bg-soft: rgba(0, 0, 0, 0.03);
  --sc-border: rgba(0, 0, 0, 0.08);
  box-shadow:
    0 32px 80px -16px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  animation: scenario-card-in 480ms cubic-bezier(0.32, 0.72, 0, 1);
}
[data-theme="dark"] .tutorial-scenario-card {
  /* Dark mode → ek glow, ama içerik aynı (light) */
  box-shadow:
    0 32px 80px -16px rgba(0, 0, 0, 0.85),
    0 0 60px -8px rgba(255, 255, 255, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
@keyframes scenario-card-in {
  from { opacity: 0; transform: scale(0.95) translateY(12px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.scenario-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--sc-text-tertiary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.scenario-progress .left { color: #C8102E; }

.scenario-h1 {
  font-size: 22px;               /* sıkıştırıldı: 28 → 22 */
  font-weight: 600;
  letter-spacing: -0.024em;
  margin: 0 0 4px;
  line-height: 1.2;
  color: var(--sc-text-primary);
  flex-shrink: 0;
}
.scenario-sub {
  font-size: 13px;               /* sıkıştırıldı: 14.5 → 13 */
  color: var(--sc-text-secondary);
  margin: 0 0 14px;
  letter-spacing: -0.005em;
  flex-shrink: 0;
}

.scenario-timeline {
  background: var(--sc-bg-soft);
  border-radius: 14px;
  padding: 4px;
  margin: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;                 /* flex shrink çalışsın */
}

.scenario-event {
  padding: 9px 14px;             /* sıkıştırıldı: 16/20 → 9/14 */
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: relative;
  opacity: 0;
  animation: scenario-fade 500ms cubic-bezier(0.32, 0.72, 0, 1) forwards;
}
.scenario-event:nth-child(1) { animation-delay: 150ms; }
.scenario-event:nth-child(2) { animation-delay: 280ms; }
.scenario-event:nth-child(3) { animation-delay: 410ms; }
.scenario-event:nth-child(4) { animation-delay: 540ms; }
.scenario-event:nth-child(5) { animation-delay: 670ms; }
.scenario-event:nth-child(n+2) {
  border-top: 1px dashed var(--sc-border);
  margin-top: -1px;
}
@keyframes scenario-fade {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}

.scenario-event-time {
  font-size: 11px;
  font-weight: 600;
  color: #C8102E;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.scenario-event-time .icon {
  font-size: 12px;
  color: var(--sc-text-secondary);
}
.scenario-event-body {
  font-size: 12.5px;             /* sıkıştırıldı: 14 → 12.5 */
  line-height: 1.45;
  color: var(--sc-text-primary);
  letter-spacing: -0.005em;
}

.scenario-summary {
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.07), rgba(255, 77, 109, 0.04));
  border-left: 3px solid #C8102E;
  border-radius: 0 10px 10px 0;
  padding: 9px 13px;
  margin: 12px 0 8px;
  font-size: 12.5px;
  color: var(--sc-text-primary);
  line-height: 1.45;
  font-weight: 500;
  letter-spacing: -0.005em;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  flex-shrink: 0;
  opacity: 0;
  animation: scenario-fade 500ms cubic-bezier(0.32, 0.72, 0, 1) 820ms forwards;
}
.scenario-summary .icon { font-style: normal; flex-shrink: 0; }

.scenario-final {
  font-size: 17px;               /* sıkıştırıldı: 22 → 17 */
  font-weight: 600;
  letter-spacing: -0.018em;
  text-align: center;
  margin: 8px 0 12px;
  background: linear-gradient(135deg, #C8102E, #FF4D6D);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  flex-shrink: 0;
  opacity: 0;
  animation: scenario-fade 500ms cubic-bezier(0.32, 0.72, 0, 1) 940ms forwards;
}

.scenario-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto;
  padding: 11px 28px;            /* sıkıştırıldı: 14/32 → 11/28 */
  background: linear-gradient(135deg, #C8102E, #FF4D6D);
  color: white;
  border-radius: 12px;
  font-size: 14px;               /* sıkıştırıldı: 15 → 14 */
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  border: none;
  font-family: inherit;
  flex-shrink: 0;
  box-shadow:
    0 8px 22px -4px rgba(200, 16, 46, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: all 240ms cubic-bezier(0.32, 0.72, 0, 1);
  opacity: 0;
  animation: scenario-fade 500ms cubic-bezier(0.32, 0.72, 0, 1) 1060ms forwards;
}
.scenario-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -6px rgba(200, 16, 46, 0.55);
}
.scenario-cta:active { transform: translateY(0) scale(0.98); }
