/* =============================================
   HINT ANIMATION SYSTEM - Janapaksham
   Modern, Mobile-App Style, Professional
   ============================================= */

:root {
    --hint-primary: #00ff9d;
    --hint-secondary: #6366f1;
    --hint-bg: rgba(15, 23, 42, 0.97);
    --hint-text: #ffffff;
    --hint-overlay: rgba(0, 0, 0, 0.8);
    --hint-shadow: 0 10px 40px rgba(0, 255, 157, 0.25);
    --hint-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== FLOATING HELP BUTTON ==================== */
.hint-fab {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--hint-primary) 0%, #00cc7a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9998;
    box-shadow: var(--hint-shadow);
    transition: var(--hint-transition);
    border: none;
}

.hint-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 45px rgba(0, 255, 157, 0.4);
}

.hint-fab i {
    font-size: 1.3rem;
    color: #000;
    transition: var(--hint-transition);
}

.hint-fab.active i {
    transform: rotate(45deg);
}

/* Subtle pulse ring */
.hint-fab::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--hint-primary);
    animation: hint-pulse 2.5s ease-out infinite;
    opacity: 0.6;
}

@keyframes hint-pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* ==================== TOOLTIP STYLES ==================== */
.hint-tooltip {
    position: fixed;
    background: var(--hint-bg);
    color: var(--hint-text);
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 0.9rem;
    max-width: 280px;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: var(--hint-transition);
    border: 1px solid rgba(0, 255, 157, 0.25);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    line-height: 1.6;
}

.hint-tooltip.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ==================== GUIDED TOUR ==================== */
.hint-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--hint-overlay);
    z-index: 9990;
    opacity: 0;
    visibility: hidden;
    transition: var(--hint-transition);
}

.hint-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Spotlight effect - removed, using simpler approach */
.hint-spotlight {
    position: fixed;
    border-radius: 12px;
    border: 3px solid var(--hint-primary);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75), 0 0 30px rgba(0, 255, 157, 0.3);
    z-index: 9991;
    transition: all 0.4s ease;
    pointer-events: none;
}

/* Tour Box - Fixed position for reliability */
.hint-tour-box {
    position: fixed;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: linear-gradient(145deg, #1a1a2e 0%, #0f172a 100%);
    border: 2px solid var(--hint-primary);
    border-radius: 20px;
    padding: 28px;
    width: calc(100% - 40px);
    max-width: 380px;
    z-index: 9999;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 255, 157, 0.15);
    animation: hint-slideIn 0.4s ease;
}

@keyframes hint-slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.hint-tour-step {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--hint-primary);
    color: #000;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.hint-tour-title {
    color: var(--hint-primary);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hint-tour-title i {
    font-size: 1.3rem;
}

.hint-tour-content {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 24px;
}

.hint-tour-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hint-tour-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.hint-tour-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #334155;
    transition: var(--hint-transition);
}

.hint-tour-dot.active {
    background: var(--hint-primary);
    transform: scale(1.2);
    box-shadow: 0 0 10px var(--hint-primary);
}

.hint-tour-btns {
    display: flex;
    gap: 10px;
}

.hint-btn {
    flex: 1;
    padding: 14px 20px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--hint-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.hint-btn-primary {
    background: linear-gradient(135deg, var(--hint-primary) 0%, #00cc7a 100%);
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 255, 157, 0.3);
}

.hint-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 157, 0.4);
}

.hint-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    border: 1px solid #334155;
}

.hint-btn-secondary:hover {
    border-color: var(--hint-primary);
    color: var(--hint-primary);
}

/* ==================== ELEMENT HINTS ==================== */
[data-hint] {
    position: relative;
}

[data-hint].hint-glow::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid var(--hint-primary);
    opacity: 0;
    animation: hint-glow 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes hint-glow {

    0%,
    100% {
        opacity: 0;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.02);
    }
}

/* ==================== GESTURE HINTS ==================== */
.hint-gesture {
    position: fixed;
    bottom: 150px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 9995;
    opacity: 0;
    animation: hint-fadeInUp 0.5s ease forwards;
    animation-delay: 1.5s;
}

@keyframes hint-fadeInUp {
    to {
        opacity: 1;
    }
}

.hint-gesture-icon {
    width: 56px;
    height: 56px;
    background: rgba(0, 255, 157, 0.12);
    border: 1px solid rgba(0, 255, 157, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hint-primary);
    font-size: 1.3rem;
    animation: hint-swipe 1.5s ease-in-out infinite;
}

@keyframes hint-swipe {

    0%,
    100% {
        transform: translateX(0);
        opacity: 1;
    }

    50% {
        transform: translateX(15px);
        opacity: 0.6;
    }
}

.hint-gesture-text {
    color: #94a3b8;
    font-size: 0.8rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.6);
    padding: 6px 14px;
    border-radius: 20px;
}

/* ==================== HELP PANEL ==================== */
.hint-panel {
    position: fixed;
    bottom: 150px;
    right: 20px;
    width: 320px;
    max-height: 60vh;
    background: linear-gradient(145deg, #1a1a2e 0%, #0f172a 100%);
    border: 1px solid rgba(0, 255, 157, 0.2);
    border-radius: 20px;
    z-index: 9997;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px) scale(0.95);
    transition: var(--hint-transition);
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.hint-panel.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.hint-panel-header {
    background: rgba(0, 255, 157, 0.08);
    padding: 18px 20px;
    border-bottom: 1px solid rgba(0, 255, 157, 0.1);
}

.hint-panel-title {
    color: var(--hint-primary);
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hint-panel-body {
    padding: 12px 16px;
    max-height: calc(60vh - 70px);
    overflow-y: auto;
}

.hint-panel-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--hint-transition);
    margin-bottom: 6px;
}

.hint-panel-item:hover {
    background: rgba(0, 255, 157, 0.08);
}

.hint-panel-icon {
    width: 42px;
    height: 42px;
    background: rgba(0, 255, 157, 0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hint-primary);
    font-size: 1rem;
    flex-shrink: 0;
}

.hint-panel-text h4 {
    color: #f1f5f9;
    font-size: 0.95rem;
    margin-bottom: 3px;
    font-weight: 600;
}

.hint-panel-text p {
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.4;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .hint-fab {
        bottom: 85px;
        right: 15px;
        width: 48px;
        height: 48px;
    }

    .hint-fab i {
        font-size: 1.1rem;
    }

    .hint-panel {
        width: calc(100% - 30px);
        right: 15px;
        bottom: 140px;
        max-height: 50vh;
    }

    .hint-tour-box {
        width: calc(100% - 30px);
        max-width: none;
        padding: 24px;
    }

    .hint-tour-title {
        font-size: 1.05rem;
    }

    .hint-tour-content {
        font-size: 0.9rem;
    }

    .hint-btn {
        padding: 12px 16px;
        font-size: 0.85rem;
    }
}

/* Hide on very small screens */
@media (max-height: 500px) {
    .hint-fab {
        bottom: 15px;
    }

    .hint-panel {
        max-height: 40vh;
    }
}