/* ═══════════════════════════════════════════════════════════════════════════
   📖 TUTORIAL OVERLAY — Öğretici Sistemi Stilleri
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Ana Overlay Container ──────────────────────────────────────────────── */
#tutorial-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 300;
    pointer-events: none; /* Oyun kontrollerine engel olma */
    display: none;
}
#tutorial-overlay.active { display: flex; flex-direction: column; align-items: center; }

/* ── İlerleme Barı (8 Nokta) ──────────────────────────────────────────── */
.tutorial-progress {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    pointer-events: auto;
}
.tutorial-progress-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    transition: all 0.4s ease;
}
.tutorial-progress-dot.completed {
    background: var(--color-success, #00ff88);
    border-color: var(--color-success, #00ff88);
    box-shadow: 0 0 8px rgba(0,255,136,0.6);
}
.tutorial-progress-dot.active {
    background: var(--color-primary, #00eaff);
    border-color: var(--color-primary, #00eaff);
    box-shadow: 0 0 12px rgba(0,234,255,0.8);
    animation: tutorial-dot-pulse 1.5s ease-in-out infinite;
}

/* ── Mesaj Kutusu ─────────────────────────────────────────────────────── */
.tutorial-message-box {
    margin-top: 20px;
    background: rgba(0, 10, 20, 0.85);
    border: 1px solid rgba(0, 234, 255, 0.4);
    border-radius: 12px;
    padding: 16px 28px;
    max-width: 480px;
    text-align: center;
    pointer-events: auto;
    animation: tutorial-fadeIn 0.4s ease-out;
}
.tutorial-message-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 15px;
    color: #fff;
    line-height: 1.5;
    min-height: 22px;
}
.tutorial-message-text .tutorial-key {
    display: inline-block;
    background: rgba(0, 234, 255, 0.2);
    border: 1px solid var(--color-primary, #00eaff);
    border-radius: 6px;
    padding: 2px 8px;
    margin: 0 3px;
    font-size: 13px;
    color: var(--color-primary, #00eaff);
    font-weight: bold;
}

/* ── Görev Tamamlandı Banner ─────────────────────────────────────────── */
.tutorial-step-complete {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(0, 30, 15, 0.9);
    border: 2px solid var(--color-success, #00ff88);
    border-radius: 16px;
    padding: 20px 40px;
    z-index: 310;
    pointer-events: none;
    animation: tutorial-complete-pop 1.2s ease-out forwards;
}
.tutorial-step-complete-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    color: var(--color-success, #00ff88);
    text-shadow: 0 0 15px rgba(0,255,136,0.5);
    white-space: nowrap;
}

/* ── Çıkış Butonu (top-right-controls içinde) ─────────────────────────── */
.tutorial-exit-btn {
    display: none; /* TutorialUI.start() flex yapar */
    align-items: center;
    justify-content: center;
    background: rgba(255, 60, 60, 0.15);
    border: 1px solid rgba(255, 80, 80, 0.4);
    border-radius: var(--border-radius-sm, 5px);
    height: var(--icon-btn-size, 40px);
    padding: 0 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 9px;
    letter-spacing: 0.5px;
    color: #ff9999;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.tutorial-exit-btn:hover {
    background: rgba(255, 60, 60, 0.3);
    border-color: #ff6666;
    color: #fff;
}

/* ── Çıkış Onay Modalı ──────────────────────────────────────────────── */
.tutorial-confirm-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 320;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tutorial-confirm-box {
    background: rgba(0, 15, 30, 0.95);
    border: 1px solid rgba(0, 234, 255, 0.4);
    border-radius: 14px;
    padding: 24px 36px;
    text-align: center;
}
.tutorial-confirm-box p {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    color: #ddd;
    margin-bottom: 18px;
}
.tutorial-confirm-box button {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    margin: 0 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.tutorial-confirm-yes {
    background: rgba(255, 60, 60, 0.3);
    color: #ff8888;
    border: 1px solid rgba(255,80,80,0.5);
}
.tutorial-confirm-yes:hover { background: rgba(255,60,60,0.5); color: #fff; }
.tutorial-confirm-no {
    background: rgba(0, 234, 255, 0.15);
    color: var(--color-primary, #00eaff);
    border: 1px solid rgba(0,234,255,0.4);
}
.tutorial-confirm-no:hover { background: rgba(0,234,255,0.3); color: #fff; }

/* ── Shop Buton Vurgu (Highlight) ─────────────────────────────────────── */
.tutorial-highlight {
    animation: tutorial-pulse 1.2s ease-in-out infinite !important;
    box-shadow: 0 0 20px rgba(0, 234, 255, 0.6), 0 0 40px rgba(0, 234, 255, 0.3) !important;
    z-index: 10 !important;
    position: relative;
}
.tutorial-dim {
    opacity: 0.3 !important;
    pointer-events: none !important;
}

/* ── Tutorial "?" Butonu (ayarlar paneli içinde) ──────────────────────── */
#tutorialBtn {
    font-size: 1rem;
    font-weight: 700;
}
body.in-game #tutorialBtn {
    display: none !important;
}

/* ── İlk Giriş Prompt Modal ──────────────────────────────────────────── */
.tutorial-prompt-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.75);
    z-index: 250;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: tutorial-fadeIn 0.3s ease-out;
}
.tutorial-prompt-box {
    background: rgba(0, 15, 30, 0.95);
    border: 1px solid rgba(0, 234, 255, 0.5);
    border-radius: 16px;
    padding: 30px 40px;
    text-align: center;
    max-width: 400px;
}
.tutorial-prompt-box h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    color: var(--color-primary, #00eaff);
    margin-bottom: 12px;
}
.tutorial-prompt-box p {
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    color: #aaa;
    margin-bottom: 20px;
    line-height: 1.5;
}
.tutorial-prompt-box button {
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    border: none;
    border-radius: 10px;
    padding: 12px 28px;
    margin: 0 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.tutorial-prompt-start {
    background: linear-gradient(135deg, rgba(0,234,255,0.3), rgba(0,180,220,0.4));
    color: #fff;
    border: 1px solid var(--color-primary, #00eaff);
}
.tutorial-prompt-start:hover {
    background: linear-gradient(135deg, rgba(0,234,255,0.5), rgba(0,180,220,0.6));
    box-shadow: 0 0 20px rgba(0,234,255,0.4);
}
.tutorial-prompt-skip {
    background: transparent;
    color: #888;
    border: 1px solid rgba(255,255,255,0.2);
}
.tutorial-prompt-skip:hover { color: #ccc; border-color: rgba(255,255,255,0.4); }

/* ── Animasyonlar ─────────────────────────────────────────────────────── */
@keyframes tutorial-fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes tutorial-pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(0,234,255,0.3); }
    50%      { box-shadow: 0 0 25px rgba(0,234,255,0.7), 0 0 50px rgba(0,234,255,0.3); }
}
@keyframes tutorial-dot-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.3); }
}
@keyframes tutorial-complete-pop {
    0%   { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    20%  { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
    35%  { transform: translate(-50%, -50%) scale(1); }
    75%  { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
}

/* ── Mobile Responsive ────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .tutorial-message-box { max-width: 90vw; padding: 12px 18px; }
    .tutorial-message-text { font-size: 13px; }
    .tutorial-exit-btn { font-size: 8px; padding: 0 8px; }
    .tutorial-progress-dot { width: 10px; height: 10px; }
    .tutorial-prompt-box { max-width: 85vw; padding: 24px 20px; }
    .tutorial-prompt-box h3 { font-size: 16px; }
    .tutorial-prompt-box p { font-size: 12px; }
}
