/* Tutorial System V7 - Floating Tooltip Mode */

/* Overlay - Completely transparent to keep page original */
.tut-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 2000000;
    display: none;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Allow clicks through to the site */
}

.tut-overlay.active {
    display: block;
}

/* Spotlight - No shadow curtain, just a glowing border */
.tut-spotlight {
    position: absolute;
    z-index: 2000005;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.5); /* Glow only, no darkening */
    border: 3px solid #00f2ff;
    pointer-events: none;
    display: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tut-spotlight.active {
    display: block;
}

/* Pointer (Hand) */
.tut-pointer {
    position: absolute;
    font-size: 50px;
    z-index: 2000010;
    pointer-events: none;
    display: none;
    filter: drop-shadow(0 0 15px #00f2ff);
    animation: tutPointerBounce 0.8s infinite alternate ease-in-out;
    transform: translate(-50%, 0);
}

.tut-pointer.active {
    display: block;
}

@keyframes tutPointerBounce {
    from { transform: translate(-50%, 0); }
    to { transform: translate(-50%, 15px); }
}

/* Floating Tooltip */
.tut-tooltip {
    position: fixed; /* Changed from absolute to fixed for viewport-relative consistency */
    z-index: 2000015;
    width: 280px;
    max-width: calc(100vw - 20px);
    background: rgba(28, 28, 30, 0.7); /* Translucent dark */
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 
                0 0 0 1px rgba(0, 242, 255, 0.3),
                0 0 30px rgba(0, 242, 255, 0.2);
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tut-tooltip.active {
    display: block;
    opacity: 1;
}

/* Welcome Tooltip (Centered) */
.tut-tooltip.welcome {
    position: fixed;
    width: 360px;
    max-width: 90vw;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
}

/* Tooltip Header */
.tut-tooltip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tut-tooltip-icon {
    font-size: 28px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.tut-tooltip-counter {
    font-size: 12px;
    color: #aaa;
    font-family: monospace;
    margin-left: auto;
    margin-right: 10px;
}

.tut-close-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 95, 87, 0.2);
    border: 1px solid rgba(255, 95, 87, 0.5);
    color: #ff5f57;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.tut-close-btn:hover {
    background: #ff5f57;
    color: white;
    transform: scale(1.1);
}

.tut-close-btn:active {
    transform: scale(0.95);
}

/* Tooltip Body */
.tut-tooltip-title {
    font-size: 20px;
    font-weight: 700;
    padding: 15px 20px 10px;
    letter-spacing: -0.5px;
}

.tut-tooltip-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #aeaeb2;
    padding: 0 20px 15px;
}

.tut-tooltip-note {
    font-size: 12px;
    color: #ffd700;
    padding: 10px 20px;
    opacity: 0.9;
    text-align: center;
}

/* Language Selector */
.tut-lang-selector {
    display: flex;
    gap: 8px;
    padding: 15px 20px;
    justify-content: center;
}

.tut-lang-btn {
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tut-lang-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.tut-lang-btn.active {
    background: #007aff;
    border-color: #007aff;
    box-shadow: 0 0 15px rgba(0, 122, 255, 0.4);
}

.tut-lang-btn:active {
    transform: translateY(0);
}

/* Tooltip Actions */
.tut-tooltip-actions {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    justify-content: space-between;
}

.tut-btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    flex: 1;
}

.tut-btn.primary {
    background: linear-gradient(135deg, #007aff 0%, #0062cc 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
}

.tut-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
}

.tut-btn.primary:active {
    transform: translateY(0);
}

.tut-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tut-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.tut-btn.secondary:active {
    transform: translateY(0);
}

/* Mobile Optimizations */
@media screen and (max-width: 768px) {
    .tut-tooltip {
        width: calc(100vw - 20px);
        max-width: 320px;
    }
    
    .tut-tooltip.welcome {
        width: calc(100vw - 40px);
        max-width: 340px;
    }
    
    .tut-pointer {
        font-size: 40px;
    }
    
    .tut-tooltip-title {
        font-size: 18px;
    }
    
    .tut-tooltip-desc {
        font-size: 13px;
    }
    
    .tut-btn {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .tut-lang-btn {
        padding: 10px 14px;
        font-size: 12px;
    }
}

/* iPhone/iPad Specific - Remove blur */
@supports (-webkit-touch-callout: none) {
    .tut-overlay {
        background: transparent; /* Match desktop: No darkening */
    }
    
    .tut-tooltip {
        -webkit-tap-highlight-color: transparent;
    }
    
    .tut-btn, .tut-lang-btn, .tut-close-btn {
        -webkit-tap-highlight-color: transparent;
        -webkit-user-select: none;
        user-select: none;
    }
}

/* Global rules removed to keep page original */
