/* ====================== */
/* FLOATING NAVBAR */
/* ====================== */

.floating-nav {

    position: fixed;

    bottom: 28px;

    left: 50%;

    transform: translateX(-50%);

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 14px 18px;

    border-radius: 30px;

    background:
        linear-gradient(135deg,
            rgba(255, 255, 255, .08),
            rgba(255, 255, 255, .03));

    border:
        1px solid var(--border);

    backdrop-filter: blur(28px);

    box-shadow:
        0 20px 45px rgba(0, 0, 0, .22);

    z-index: 999;

    overflow: hidden;
}

.floating-nav::before {

    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    background:
        radial-gradient(circle,
            rgba(255, 255, 255, .15),
            transparent);

    top: -90px;
    left: -90px;

    pointer-events: none;
}

.nav-item {

    width: 54px;
    height: 54px;

    border-radius: 18px;

    display: flex;

    align-items: center;

    justify-content: center;

    color: var(--text-muted);

    text-decoration: none;

    position: relative;

    transition:
        transform .35s ease,
        background .35s ease,
        color .35s ease,
        box-shadow .35s ease;

    overflow: hidden;
}

.nav-item::before {

    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(135deg,
            rgba(255, 255, 255, .18),
            transparent);

    opacity: 0;

    transition: .35s ease;
}

.nav-item:hover::before {

    opacity: 1;
}

.nav-item:hover {

    transform:
        translateY(-6px);

    color: var(--text);

    background:
        rgba(255, 255, 255, .06);
}

.nav-item.active {

    background:
        linear-gradient(135deg,
            var(--primary),
            var(--secondary));

    color: white;

    transform:
        translateY(-10px) scale(1.05);

    box-shadow:
        0 15px 35px rgba(108, 92, 231, .35);
}

.nav-item i {

    font-size: 18px;

    position: relative;

    z-index: 2;
}

/* ====================== */
/* TOP ACTION */
/* ====================== */

.top-actions {

    position: fixed;

    top: 25px;
    right: 25px;

    display: flex;

    align-items: center;

    gap: 14px;

    z-index: 999999;
}

/* ====================== */
/* LANGUAGE BUTTON */
/* ====================== */

.language-wrapper {

    position: relative;
}

.top-action-btn {

    height: 60px;

    padding: 0 20px;

    border-radius: 22px;

    border:
        1px solid var(--border);

    background:
        linear-gradient(135deg,
            rgba(255, 255, 255, .08),
            rgba(255, 255, 255, .03));

    backdrop-filter: blur(25px);

    display: flex;

    align-items: center;

    gap: 14px;

    color: var(--text);

    cursor: pointer;

    position: relative;

    overflow: hidden;

    transition:
        transform .4s cubic-bezier(.19, 1, .22, 1),
        box-shadow .4s ease,
        background .4s ease;
}

.top-action-btn::before {

    content: "";

    position: absolute;

    width: 140px;
    height: 140px;

    background:
        radial-gradient(circle,
            rgba(255, 255, 255, .2),
            transparent);

    top: -70px;
    left: -70px;

    opacity: 0;

    transition: .5s ease;
}

.top-action-btn:hover::before {

    opacity: 1;
}

.top-action-btn:hover {

    transform:
        translateY(-5px) scale(1.03);

    box-shadow:
        0 20px 40px rgba(0, 0, 0, .22);
}

.flag-circle {

    width: 36px;
    height: 36px;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, .12);

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 18px;

    flex-shrink: 0;
}

.top-action-btn span {

    font-weight: 600;

    letter-spacing: .3px;
}

.top-action-btn i {

    font-size: 12px;

    opacity: .7;

    transition:
        transform .35s ease;
}

.language-wrapper.active i {

    transform: rotate(180deg);
}

/* ====================== */
/* DROPDOWN */
/* ====================== */

.language-dropdown {

    position: absolute;

    top: 78px;
    right: 0;

    width: 240px;

    padding: 10px;

    border-radius: 28px;

    background:
        linear-gradient(135deg,
            rgba(15, 23, 42, .78),
            rgba(15, 23, 42, .62));

    border:
        1px solid rgba(255, 255, 255, .08);

    backdrop-filter: blur(35px);

    display: flex;

    flex-direction: column;

    gap: 8px;

    opacity: 0;

    visibility: hidden;

    transform:
        translateY(12px) scale(.95);

    transition:
        .4s cubic-bezier(.19, 1, .22, 1);

    box-shadow:
        0 25px 50px rgba(0, 0, 0, .25);
}

.language-wrapper.active .language-dropdown {

    opacity: 1;

    visibility: visible;

    transform:
        translateY(0) scale(1);
}

.language-item {

    height: 62px;

    border: none;

    border-radius: 20px;

    background: transparent;

    color: white;
    text-decoration: none;
    display: flex;

    align-items: center;

    gap: 14px;

    padding: 0 18px;

    cursor: pointer;

    transition:
        transform .35s ease,
        background .35s ease;
}

.language-item:hover {

    transform:
        translateX(6px);

    background:
        rgba(255, 255, 255, .08);
}

.language-item.active {

    background:
        linear-gradient(135deg,
            rgba(108, 92, 231, .22),
            rgba(0, 206, 201, .18));
}

.flag {

    font-size: 24px;
}

/* ====================== */
/* THEME SWITCH */
/* ====================== */

.theme-switch {

    width: 100px;
    height: 60px;

    border-radius: 999px;

    border:
        1px solid var(--border);

    background:
        linear-gradient(135deg,
            rgba(255, 255, 255, .08),
            rgba(255, 255, 255, .03));

    backdrop-filter: blur(25px);

    position: relative;

    overflow: hidden;

    cursor: pointer;

    transition:
        transform .4s cubic-bezier(.19, 1, .22, 1),
        box-shadow .4s ease;
}

.theme-switch:hover {

    transform:
        translateY(-5px) scale(1.03);

    box-shadow:
        0 20px 40px rgba(0, 0, 0, .22);
}

.theme-switch::before {

    content: "";

    position: absolute;

    width: 140px;
    height: 140px;

    background:
        radial-gradient(circle,
            rgba(255, 255, 255, .18),
            transparent);

    top: -70px;
    left: -70px;
}

.theme-icons {

    position: absolute;

    inset: 0;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 17px;

    z-index: 2;
}

.theme-icons i {

    font-size: 18px;

    transition:
        transform .45s ease,
        opacity .45s ease;
}

.sun {

    color: #facc15;
}

.moon {

    color: #93c5fd;
}

.theme-ball {

    position: absolute;

    width: 46px;
    height: 46px;

    border-radius: 50%;

    top: 6px;
    left: 6px;

    background: white;

    z-index: 3;

    transition:
        .55s cubic-bezier(.19, 1, .22, 1);

    box-shadow:
        0 10px 30px rgba(255, 255, 255, .3);
}

[data-theme="light"] .theme-ball {

    left: calc(100% - 52px);

    background: #111827;
}

[data-theme="light"] .sun {

    transform:
        rotate(180deg) scale(1.2);
}

[data-theme="dark"] .moon {

    transform:
        rotate(-180deg) scale(1.2);
}

/* ====================== */
/* LIGHT MODE */
/* ====================== */

[data-theme="light"] .floating-nav {

    box-shadow:
        0 20px 45px rgba(0, 0, 0, .08);
}

[data-theme="light"] .language-dropdown {

    background:
        linear-gradient(135deg,
            rgba(255, 255, 255, .78),
            rgba(255, 255, 255, .6));
}

[data-theme="light"] .language-item {

    color: #111827;
}

/* ====================== */
/* MOBILE */
/* ====================== */

@media(max-width:768px) {

    .top-actions {

        top: 18px;
        right: 18px;

        gap: 10px;
    }

    .top-action-btn {

        height: 54px;

        padding: 0 16px;

        border-radius: 18px;
    }

    .flag-circle {

        width: 32px;
        height: 32px;

        font-size: 16px;
    }

    .theme-switch {

        width: 84px;
        height: 54px;
    }

    .theme-ball {

        width: 40px;
        height: 40px;

        top: 6px;
        left: 6px;
    }

    [data-theme="light"] .theme-ball {

        left: calc(100% - 46px);
    }

    .floating-nav {

        left: 12px;

        right: 12px;

        width: auto;

        transform: none;

        bottom: 16px;

        justify-content: space-around;

        border-radius: 24px;

        padding: 12px;
    }

    .nav-item {

        width: 48px;
        height: 48px;

        border-radius: 16px;
    }

    .language-dropdown {

        width: 210px;
    }
}