/* ═══════════════════════════════════════════════════════
   Tutorial Overlay System
═══════════════════════════════════════════════════════ */

/* FIX: Backdrop deaktiviert — nur Spotlight-Rahmen (2026-04-08) */
.tutorial-backdrop {
    position: fixed;
    inset: 0;
    background: transparent !important;
    z-index: 9000;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.tutorial-backdrop.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Wenn ein Spotlight aktiv ist: Backdrop deaktivieren damit das hervorgehobene Element klickbar bleibt */
.tutorial-backdrop.has-spotlight {
    pointer-events: none;
}

/* Spotlight: visueller Rahmen um das hervorgehobene Element */
/* FIX: Verdunkelung entfernt — nur gelber Rahmen + Glow (2026-04-08) */
.tutorial-spotlight {
    position: fixed;
    z-index: 9001;
    border-radius: 8px;
    outline: 3px solid rgba(251, 191, 36, 1.0);
    box-shadow:
        0 0 0 4px rgba(251, 191, 36, 1.0),
        0 0 20px rgba(251, 191, 36, 0.8);
    transition: all 0.4s ease;
    pointer-events: none;
}

.tutorial-spotlight.hidden {
    display: none;
}

/* Pulsierender Ring um Spotlight — FIX: Glow-Puls verstärkt (2026-04-08) */
.tutorial-spotlight::after {
    content: '';
    position: absolute;
    inset: -6px;
    border: 2px solid rgba(251, 191, 36, 0.7);
    border-radius: 12px;
    animation: tutorialPulse 1.5s ease-out infinite;
}

@keyframes tutorialPulse {
    0%   { box-shadow: 0 0 0 0   rgba(251, 191, 36, 0.7); }
    70%  { box-shadow: 0 0 0 16px rgba(251, 191, 36, 0);   }
    100% { box-shadow: 0 0 0 0   rgba(251, 191, 36, 0);   }
}

/* Textbox */
.tutorial-box {
    position: fixed;
    z-index: 9010;
    background: linear-gradient(135deg, #0d1018 0%, #141a28 100%);
    border: 2px solid #f0a000;
    border-radius: 12px;
    padding: 20px 24px;
    max-width: 420px;
    min-width: 280px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 20px rgba(240, 160, 0, 0.15);
    transition: all 0.3s ease;
    pointer-events: auto;
}

.tutorial-box.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.tutorial-box-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #f0a000;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.tutorial-box-text {
    font-family: 'Rajdhani', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #c0c8d8;
    line-height: 1.5;
    margin-bottom: 16px;
}

.tutorial-box-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tutorial-box-progress {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: #506070;
}

.tutorial-btn-next {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #000;
    background: linear-gradient(135deg, #f0a000, #d48800);
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
}

.tutorial-btn-next:hover {
    background: linear-gradient(135deg, #ffc040, #f0a000);
    transform: translateY(-1px);
}

.tutorial-btn-skip {
    font-family: 'Rajdhani', sans-serif;
    font-size: 12px;
    color: #506070;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.15s;
}

.tutorial-btn-skip:hover {
    color: #a0a8b8;
}

/* Pfeil (CSS Triangle) */
.tutorial-arrow {
    position: fixed;
    z-index: 9010;
    width: 0; height: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.tutorial-arrow.hidden { display: none; }

.tutorial-arrow.arrow-up {
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 16px solid #f0a000;
}

.tutorial-arrow.arrow-down {
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 16px solid #f0a000;
}

.tutorial-arrow.arrow-left {
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-right: 16px solid #f0a000;
}

.tutorial-arrow.arrow-right {
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 16px solid #f0a000;
}

/* Animierte Pfeil-Bewegung */
.tutorial-arrow.arrow-up    { animation: arrowBounceUp 1s ease-in-out infinite; }
.tutorial-arrow.arrow-down  { animation: arrowBounceDown 1s ease-in-out infinite; }
.tutorial-arrow.arrow-left  { animation: arrowBounceLeft 1s ease-in-out infinite; }
.tutorial-arrow.arrow-right { animation: arrowBounceRight 1s ease-in-out infinite; }

@keyframes arrowBounceUp    { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes arrowBounceDown  { 0%,100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
@keyframes arrowBounceLeft  { 0%,100% { transform: translateX(0); } 50% { transform: translateX(-8px); } }
@keyframes arrowBounceRight { 0%,100% { transform: translateX(0); } 50% { transform: translateX(8px); } }

/* NEW (Tutorial 2.0 A, 2026-07-12): dezenter "Trotzdem weiter"-Fallback-Link
   fuer Trigger-Steps — klein/gedimmt, damit der eigentliche Weg (die echte
   Spielaktion) im Fokus bleibt, aber niemand festhaengen kann. */
.tutorial-force-next {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    text-decoration: underline;
    cursor: pointer;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 0.5px;
    user-select: none;
}
.tutorial-force-next:hover { color: rgba(255, 255, 255, 0.7); }
.tutorial-force-next.hidden { display: none; }

/* NEW (Tutorial 2.0 B, 2026-07-12): kontextuelle Einmal-Tipps (context-tips.js) —
   bewusst OHNE Backdrop/Spotlight (nie blockierend, Regel 4); dezente Blase am
   verankerten Element, verschwindet nach ~10s oder per ×. */
.sq-context-tip {
    position: fixed;
    z-index: 8900; /* unter dem Tutorial-Overlay (9000+), ueber dem Spielfeld */
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(10, 16, 32, 0.96);
    border: 1px solid rgba(240, 160, 0, 0.55);
    border-radius: 6px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55), 0 0 10px rgba(240, 160, 0, 0.15);
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.92);
    pointer-events: auto;
    animation: sqTipFadeIn 0.25s ease-out;
}
.sq-context-tip-icon { flex-shrink: 0; font-size: 14px; }
.sq-context-tip-text { flex: 1; }
.sq-context-tip-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.45);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}
.sq-context-tip-close:hover { color: rgba(255, 255, 255, 0.9); }
@keyframes sqTipFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
