/* =========================================================
   Kuuthi.in - High Performance Floating Navigation & Shortcut Menu
   Smooth 60/120fps GPU-accelerated dragging & responsive design
   ========================================================= */

/* Floating Menu Trigger Icon (☰) */
#menuIcon {
    position: fixed;
    bottom: 30px;
    right: 24px;
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35), 0 2px 6px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    cursor: grab;
    z-index: 9999;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    will-change: transform, left, top;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, background 0.2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-sizing: border-box;
}

#menuIcon:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.45);
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
}

#menuIcon:active,
#menuIcon.is-dragging {
    cursor: grabbing;
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5);
    transition: none !important;
}

/* Shortcut Navigation Menu Card */
#menu {
    position: fixed;
    background: #ffffff;
    border: 1.5px solid #dce5f2;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16), 0 4px 12px rgba(53, 120, 229, 0.08);
    width: 220px;
    max-width: calc(100vw - 24px);
    max-height: min(75vh, 460px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9) translateY(10px);
    pointer-events: none;
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s;
    z-index: 9998;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 6px 0;
    box-sizing: border-box;
}

#menu.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

#menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#menu ul li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #f1f5f9;
}

#menu ul li:last-child {
    border-bottom: none;
}

#menu ul li a {
    text-decoration: none;
    color: #1e293b;
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    transition: all 0.15s ease;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

#menu ul li a:hover {
    background-color: #eff6ff;
    color: #2563eb;
    padding-left: 20px;
}

#menu ul li a:active {
    background-color: #dbeafe;
}

/* Custom modern scrollbar for menu */
#menu::-webkit-scrollbar {
    width: 5px;
}
#menu::-webkit-scrollbar-track {
    background: #f8fafc;
}
#menu::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* =========================================================
   Floating Quick Scroll Navigation (Scroll Up & Scroll Down)
   ========================================================= */
#floatingScrollNav {
    position: fixed;
    right: 24px;
    bottom: 96px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 9995;
    user-select: none;
    -webkit-user-select: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.scroll-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease, background 0.18s ease;
    outline: none;
    padding: 0;
    touch-action: manipulation;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.scroll-nav-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #ffffff;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
    transition: transform 0.18s ease;
}

.scroll-nav-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
    transform: translateY(-2px) scale(1.06);
}

.scroll-nav-btn:active {
    transform: translateY(0) scale(0.94);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.scroll-nav-btn.btn-top:hover svg {
    transform: translateY(-2px);
}

.scroll-nav-btn.btn-bottom:hover svg {
    transform: translateY(2px);
}

/* Responsive adjustments for Mobile / Tablets */
@media (max-width: 768px) {
    #menuIcon {
        width: 50px;
        height: 50px;
        font-size: 22px;
        bottom: 24px;
        right: 18px;
    }

    #menu {
        width: 200px;
        max-width: calc(100vw - 28px);
    }

    #menu ul li a {
        font-size: 0.84rem;
        padding: 9px 14px;
    }

    #floatingScrollNav {
        right: 18px;
        bottom: 84px;
        gap: 6px;
    }

    .scroll-nav-btn {
        width: 40px;
        height: 40px;
    }

    .scroll-nav-btn svg {
        width: 18px;
        height: 18px;
    }
}
