/* ==========================================================================
   COMPONENTS.CSS - Custom Cursor, Scroll Progress, & Floating Back To Top Button
   ========================================================================== */

/* Scroll Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
    box-shadow: 0 0 8px var(--primary);
    z-index: 99999;
    pointer-events: none;
}

/* Permanent Stable Floating WhatsApp Direct Button (Bottom-Right) */
.floating-whatsapp-btn {
    position: fixed !important;
    bottom: 2rem !important;
    right: 2rem !important;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 255, 65, 0.18);
    border: 1.5px solid rgba(0, 255, 65, 0.6);
    color: var(--neon-green);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-decoration: none;
    z-index: 99999;
    animation: pulseRingGreen 2.5s infinite;
}

.floating-whatsapp-btn:hover {
    background: var(--neon-green);
    color: #020205;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.7);
    transform: translateY(-3px) scale(1.08);
}

@keyframes pulseRingGreen {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 65, 0.4); }
    70% { box-shadow: 0 0 0 14px rgba(0, 255, 65, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 65, 0); }
}

/* Independent Floating Back-To-Top Button (Stacked Above WhatsApp Button) */
.back-to-top-btn {
    position: fixed !important;
    bottom: 5.8rem !important;
    right: 2rem !important;
    width: 48px;
    height: 48px;
    background: rgba(14, 16, 32, 0.85);
    border: 1.5px solid rgba(0, 210, 255, 0.4);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    font-size: 1.1rem;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.back-to-top-btn.visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.back-to-top-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.5);
    color: #020205;
    transform: translateY(-3px) scale(1.06) !important;
}

/* Telemetry pill in footer */
.telemetry-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(12, 14, 28, 0.85);
    border: 1px solid rgba(0, 247, 255, 0.35);
    padding: 0.4rem 0.95rem;
    border-radius: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.76rem;
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 0 12px rgba(0, 247, 255, 0.15);
}

.sfx-toggle-btn {
    background: rgba(12, 14, 28, 0.85);
    border: 1px solid rgba(0, 247, 255, 0.35);
    padding: 0.4rem 0.95rem;
    border-radius: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sfx-toggle-btn.active {
    border-color: var(--neon-green);
    color: var(--neon-green);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.telemetry-bar-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

/* Dark / Light Mode Theme Toggle Button */
.theme-toggle-btn {
    background: rgba(0, 247, 255, 0.08);
    border: 1.5px solid rgba(0, 247, 255, 0.35);
    color: var(--primary);
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: all 0.25s ease;
    backdrop-filter: blur(8px);
}

.theme-toggle-btn:hover {
    background: rgba(0, 247, 255, 0.2);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 247, 255, 0.4);
    transform: translateY(-1px);
}
