/* ============================================
   SCROLL INDICATOR
   Bottom-right scroll hint with animations
   ============================================ */

#scroll-indicator {
    position: fixed;
    bottom: var(--spacing-3xl);
    right: var(--spacing-3xl);
    z-index: var(--z-index-tooltip);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity var(--transition-slow) var(--transition-ease-in-out),
        visibility var(--transition-slow) var(--transition-ease-in-out);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

#scroll-indicator.visible {
    opacity: 1;
    visibility: visible;
    animation: fadeInUp 0.8s var(--transition-ease-out) forwards;
}

#scroll-indicator.hidden {
    opacity: 0;
    visibility: hidden;
    animation: fadeOutDown 0.6s var(--transition-ease-in) forwards;
}

.scroll-indicator-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xl) var(--spacing-2xl);
    background: var(--color-bg-body);
    border: var(--border-width-medium) solid var(--color-secondary-orange);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-glow-orange), var(--shadow-card);
    backdrop-filter: var(--backdrop-blur-sm);
    animation: pulseGlow 3s ease-in-out infinite;
}

.scroll-indicator-text {
    font-family: var(--font-family-body);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
    text-shadow: 0 0 10px rgba(234, 176, 65, 0.5);
    white-space: nowrap;
}

.scroll-indicator-arrow {
    width: 32px;
    height: 32px;
    color: var(--color-secondary-orange);
    filter: drop-shadow(0 0 8px rgba(234, 176, 65, 0.6));
    animation: bounce 2s ease-in-out infinite;
}

/* ==================== ANIMATIONS ==================== */

/* Fade in from bottom */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade out to bottom */
@keyframes fadeOutDown {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Bounce animation for arrow */
@keyframes bounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(8px);
    }
}

/* Pulsing glow effect */
@keyframes pulseGlow {
    0%,
    100% {
        box-shadow:
            0 0 20px rgba(234, 176, 65, 0.4),
            0 0 40px rgba(234, 176, 65, 0.2),
            var(--shadow-card);
        border-color: var(--color-secondary-orange);
    }
    50% {
        box-shadow:
            0 0 30px rgba(234, 176, 65, 0.6),
            0 0 60px rgba(234, 176, 65, 0.3),
            var(--shadow-card);
        border-color: var(--color-secondary-gold-dark);
    }
}

/* ==================== RESPONSIVE ==================== */

/* Tablet */
@media (max-width: 1024px) {
    #scroll-indicator {
        bottom: var(--spacing-2xl);
        right: var(--spacing-2xl);
    }

    .scroll-indicator-content {
        padding: var(--spacing-lg) var(--spacing-xl);
    }

    .scroll-indicator-text {
        font-size: 0.9rem;
    }

    .scroll-indicator-arrow {
        width: 28px;
        height: 28px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    #scroll-indicator {
        bottom: var(--spacing-xl);
        right: var(--spacing-xl);
    }

    .scroll-indicator-content {
        padding: var(--spacing-md) var(--spacing-lg);
        gap: var(--spacing-xs);
    }

    .scroll-indicator-text {
        font-size: 0.8rem;
        letter-spacing: var(--letter-spacing-normal);
    }

    .scroll-indicator-arrow {
        width: 24px;
        height: 24px;
    }

    @keyframes bounce {
        0%,
        100% {
            transform: translateY(0);
        }
        50% {
            transform: translateY(6px);
        }
    }
}

/* Small mobile */
@media (max-width: 480px) {
    #scroll-indicator {
        bottom: var(--spacing-lg);
        right: var(--spacing-lg);
    }

    .scroll-indicator-text {
        font-size: 0.75rem;
    }

    .scroll-indicator-arrow {
        width: 20px;
        height: 20px;
    }
}

/* Hide on very short screens */
@media (max-height: 500px) {
    #scroll-indicator {
        display: none !important;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    #scroll-indicator,
    #scroll-indicator.visible,
    #scroll-indicator.hidden,
    .scroll-indicator-content,
    .scroll-indicator-arrow {
        animation: none !important;
        transition:
            opacity 0.3s ease,
            visibility 0.3s ease !important;
    }
}
