:root {
    /* Appearance */
    --nav-radius: 50px;
    --nav-padding: 1% 3%;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border-night: rgba(255, 255, 255, 0.16);
    --glass-border-day: rgba(255, 255, 255, 0.7);
    --glass-shadow-night: 0 10px 30px rgba(2, 6, 16, 0.28);
    --glass-shadow-day: 0 10px 30px rgba(2, 6, 16, 0.08);
    --after-shadow-night:0 10px 30px rgba(2, 6, 16, 0.8);
    --after-shadow-day:0 10px 30px rgba(2, 6, 16, 0.2);
    --nav-btn-bg-night: rgba(255, 255, 255, 0.03);
    --nav-btn-bg-day: rgba(255, 255, 255, 0.03);
    /* Float / swim */
    --float-duration: 7.5s;
    --float-ease: cubic-bezier(.22, .9, .36, 1);
    --float-amplitude: 6px;
    /* how much it moves up/down */
    --float-rot: 0.12deg;
    /* subtle rotate during float */

    /* Tilt (pointer) */
    --tilt-x: 0deg;
    --tilt-y: 0deg;
    --tilt-scale: 1.00;

    /* small perf tuners */
    --reduced-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);

    /* colors */
    --accent: rgba(255, 255, 255, 0.95);
    --muted: rgba(255, 255, 255, 0.78);

    /* menu */
    --menu-width-mobile: 220px;
    --menu-stagger-ms: 70ms;
}




.account-div{
    position: fixed;
    right: 93.7%;
}

.account-button {
    width: 60px;
    height: 60px;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    margin-left: 50%;

    border-radius: 50%;
    border: none;
    cursor: pointer;

    background: var(--glass-bg);
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;

    box-shadow:
        inset 0 0 0 1px color-mix(
            in srgb,
            var(--c-light) calc(var(--glass-reflex-light) * 10%),
            transparent
        ),
        inset 1.8px 3px 0 -2px color-mix(
            in srgb,
            var(--c-light) calc(var(--glass-reflex-light) * 90%),
            transparent
        ),
        inset -2px -2px 0 -2px color-mix(
            in srgb,
            var(--c-light) calc(var(--glass-reflex-light) * 80%),
            transparent
        ),
        inset -3px -8px 1px -6px color-mix(
            in srgb,
            var(--c-light) calc(var(--glass-reflex-light) * 60%),
            transparent
        ),
        inset -0.3px -1px 4px 0 color-mix(
            in srgb,
            var(--c-dark) calc(var(--glass-reflex-dark) * 12%),
            transparent
        ),
        inset -1.5px 2.5px 0 -2px color-mix(
            in srgb,
            var(--c-dark) calc(var(--glass-reflex-dark) * 20%),
            transparent
        ),
        inset 0 3px 4px -2px color-mix(
            in srgb,
            var(--c-dark) calc(var(--glass-reflex-dark) * 20%),
            transparent
        ),
        inset 2px -6.5px 1px -4px color-mix(
            in srgb,
            var(--c-dark) calc(var(--glass-reflex-dark) * 10%),
            transparent
        ),
        0 1px 5px color-mix(
            in srgb,
            var(--c-dark) calc(var(--glass-reflex-dark) * 10%),
            transparent
        ),
        0 6px 16px color-mix(
            in srgb,
            var(--c-dark) calc(var(--glass-reflex-dark) * 8%),
            transparent
        );
}

.account-button:hover {
    transform: scale(1.08);
}

.account-button:hover{
    transform: scale(1.05);
}


.nav-btn-text{
    white-space: nowrap;
}

.communication-nav-btn{
    width: 1%;
    height: 1%;
    background-color: rgba(255, 255, 255, 0);
    border: none;
    cursor: pointer;
    transition: all 0.4s ease;
    padding: 0.1%;
}
.communication-nav-btn:hover{
    transform: scale(1.2);
}

.search-div{
    position: fixed;
    right: 3%;
}

.search-img{
    content: var(--search-img);
    width: 100%;
}
/* Main Search Button Styles with Animations */
.search-button {
    border-radius: var(--nav-radius);
    display: flex;
    align-items: center;
    padding: 15px;
    margin-left: 25%;
    border: 0;
    cursor: pointer;
    /* the transform is composed inside the keyframes via vars so JS can update CSS vars (parallax/tilt) */
    transform-origin: center;
    will-change: transform;
    border-radius: 50%;
    position: relative;
    overflow: visible;
    transition: all 0.7s ease;
    width: 60px;
    height: 60px;
    background-color: color-mix(in srgb, var(--c-glass) 12%, transparent);
    /* backdrop-filter: blur(8px) url(#switcher) saturate(var(--saturation)); */
    box-shadow: var(--box-shadow); 
}
.search-button:hover {
    transform: scale(1); /* Scale up on hover */
    background-color: color-mix(in srgb, var(--c-glass) 24%, transparent); /* More opaque background */
    animation: pulse-glow 1.5s infinite ease-in-out, rotate-slight 0.5s ease; /* Multiple animations: pulse and slight rotation */
}
/* Dropdown Menu Appearance Animation */


.search-button:hover .dropdown-menu-side {
    opacity: 1;
    transform: translateY(0); /* Slide down to position */
    animation: fade-slide-in 0.4s ease forwards; /* Fade and slide in animation */
}

/* Select Options (Dropdown Items) Styles with Hover Animations */
/* .select-options {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--fg); 
    border-radius: 50px;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-align: center;
    position: relative;
    overflow: hidden; 
    z-index: 21;
} */

/* .select-options:hover {
    transform: scale(1.05) translateX(5px);
    animation: bounce-in 0.3s ease, ripple-effect 0.6s ease; 
} */

/* Keyframe Animations */

/* Pulse Glow for Main Button */
@keyframes pulse-glow {
    0% { box-shadow: 0 0 10px rgba(255, 255, 255, 0.5); }
    50% { box-shadow: 0 0 20px rgba(255, 255, 255, 1); }
    100% { box-shadow: 0 0 10px rgba(255, 255, 255, 0.5); }
}

/* Slight Rotation for Main Button */
@keyframes rotate-slight {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(3deg) scale(1); }
    100% { transform: rotate(0deg) scale(1); }
}

/* Fade and Slide In for Dropdown */
@keyframes fade-slide-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bounce In for Dropdown Items */
@keyframes bounce-in {
    0% { transform: scale(0.9) translateX(0); }
    50% { transform: scale(1.1) translateX(5px); }
    100% { transform: scale(1.05) translateX(5px); }
}

/* Ripple Effect for Dropdown Items */
@keyframes ripple-effect {
    0% {
        background-size: 0% 0%;
        background-position: center;
        background-repeat: no-repeat;
    }
    100% {
        background-size: 200% 200%;
    }
}

/* ---------- Nav wrapper (keeps nav centered and stable width) ---------- */
.nav-wrap {
    position: sticky;
    top: 18px;
    /* small gap from top */
    display: flex;
    justify-content: center;
    pointer-events: none;
    /* let nav control events */
    z-index: 20;
}

/* ---------- Glass nav (the visible element) ---------- */
nav.glass-nav {
    pointer-events: auto;
    margin-top: 2.5%;
    width: 50%;
    border-radius: var(--nav-radius);
    padding: var(--nav-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
    /* the transform is composed inside the keyframes via vars so JS can update CSS vars (parallax/tilt) */
    transform-origin: center;
    animation: floaty var(--float-duration) var(--float-ease) infinite;
    will-change: transform;
    position: relative;
    overflow: visible;
    transition: all 0.7s ease;    
    /* background-color: color-mix(in srgb, var(--c-glass) 12%, transparent); */
    /* backdrop-filter: blur(8px) url(#switcher) saturate(var(--saturation)); */
    box-shadow: var(--box-shadow);
    z-index: 21;
}

.space{
    position: fixed;
    right: 30%;
    list-style: none;
    display: flex;
    gap: 25%;
    align-items: center;
    margin: 0;
    padding: 0;


}
/* nav.glass-nav:hover{
    box-shadow: var(--after-shadow);
} */

/* ---------- transform composition & float keyframes ----------
    Note: keyframes include CSS vars. JS manipulates --nav-parallax, --tilt-x, --tilt-y to compose motion.
    Use only transform/opacity in animations for best perf. (web.dev) */
@keyframes floaty {
    0% {
        transform:
            perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(calc(var(--nav-parallax, 0px) - var(--float-amplitude))) rotate(calc(var(--float-rot) * -1));
    }

    50% {
        transform:
            perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(calc(var(--nav-parallax, 0px) + var(--float-amplitude))) rotate(var(--float-rot));
    }

    100% {
        transform:
            perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(calc(var(--nav-parallax, 0px) - var(--float-amplitude))) rotate(calc(var(--float-rot) * -1));
    }
}

@keyframes glowMove {
    0% {
        transform: translateX(-22%)
    }

    50% {
        transform: translateX(20%)
    }

    100% {
        transform: translateX(-22%)
    }
}

/* ---------- menu (desktop) ---------- */
.nav-inner {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    z-index: 21;
}

ul.nav-menu {
    list-style: none;
    display: flex;
    gap: 10%;
    align-items: center;
    margin: 0;
    padding: 0;
    z-index: 22;
}

ul.nav-menu li {
    --i: 0
}

/* default var for stagger; JS sets better values on load */

ul.nav-menu li .a {
    display: inline-block;
    color: var(--fg);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 15% 35%;
    border-radius: 50px;
    position: relative;
    transition: transform .28s var(--float-ease), color .22s ease, background .22s ease;
    will-change: transform, color;
    transform-origin: center;
    z-index: 23;
}

/* subtle animated underline (scaleX) - GPU friendly */
ul.nav-menu li .a::after {
    content: "";
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: 6px;
    height: 3px;
    background: var(--fg);
    border-radius: 99px;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .28s var(--float-ease);
    opacity: 0.95;
    background: var(--bottom-line);

}

ul.nav-menu li .a:hover::after,
ul.nav-menu li .a:focus::after {
    transform: scaleX(1);
}

ul.nav-menu li .a:hover,
ul.nav-menu li .a:focus {
    color: var(--fg);
    transform: translateY(-4px) scale(1.02);
    background: var(--nav-btn-bg);
    outline: none;
}

/* ---------- mobile toggle ---------- */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
}

.nav-toggle .bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--fg);
    margin: 4px 0;
    border-radius: 2px;
    transition: transform .28s ease, opacity .28s ease;
    will-change: transform, opacity;
}


/* ---------- mobile menu (animated via transform & opacity only) ---------- */
@media (max-width: 1000px) {
    .nav-wrap{
        display: none;
    }
}
@media (max-width:1100px) {
    nav.glass-nav{
        width: 40%;
    }
    
}
@media (max-width:1200px) {
    
    ul.nav-menu li .a {
        font-size: 0.8rem;
    }
    ul.nav-menu i {
        font-size: 0.8rem;
    }
    
}
@media (max-width:1300px) {
    
    ul.nav-menu li .a {
        font-size: 1rem;
    }
    ul.nav-menu i {
        font-size: 1rem;
    }
    
}
@media (min-width: 1200px) {
    .account-button{
        width: 70px;
        height: 70px;
        padding: 20px;
        margin-left: 30%;
    }
    .search-button{
        width: 70px;
        height: 70px;
        padding: 20px;
        margin-left: 30%;
    }
}
/* ---------- ripple (click) helper ---------- */
.ripple {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    transform: scale(0);
    opacity: 0.35;
    background: rgba(255, 255, 255, 0.18);
    will-change: transform, opacity;
    transition: transform 420ms cubic-bezier(.2, .9, .3, 1), opacity 420ms linear;
}

/* ---------- hover/focus outline ---------- */
a:focus {
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    outline: none
}

/* ---------- reduced motion / accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
    nav.glass-nav {
        animation: none !important
    }
    ul.nav-menu li,
    ul.nav-menu li a,
    .nav-toggle .bar {
        transition: none !important
    }
}

/* ---------- reduced-effects class (applied by JS on low-power devices) ---------- */
body.reduced-effects nav.glass-nav {
    --float-amplitude: 2px;
    --float-duration: 14s;
    box-shadow: var(--reduced-shadow);
}

body.reduced-effects nav.glass-nav::before {
    opacity: 0.6;
    filter: blur(10px);
    animation: none
}

body.reduced-effects nav.glass-nav::after {
    opacity: 0.06
}
/* @media screen and (min-width:1400px){
    .space{
        margin-left: 105%;
    }
}
@media screen and (min-width:1500px){
    .space{
        margin-left: 130%;
    }
}
@media screen and (min-width:1600px){
    .space{
        margin-left: 155%;
    }
}
@media screen and (min-width:1700px){
    .space{
        margin-left: 180%;
    }
}
@media screen and (min-width:1800px){
    .space{
        margin-left: 205%;
    }
} 
@media screen and (min-width:1900px){
    .space{
        margin-left: 240%;
    }
} 
@media screen and (min-width:2000px){
    .space{
        margin-left: 265%;
    }
} 
@media screen and (min-width:2100px){
    .space{
        margin-left: 290%;
    }
} 
@media screen and (min-width:2200px){
    .space{
        margin-left: 315%;
    }
} 
@media screen and (min-width:2300px){
    .space{
        margin-left: 340%;
    }
}  */




.c-options {
    text-decoration: none;
    display: block;
    background-color: var(--glass-bg);
    width: 140%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all ease 0.4s;
    border-radius: 20px;
    color: var(--fg);
    height: 35px;
    background-color: color-mix(in srgb, var(--c-glass) 12%, transparent);
    /* backdrop-filter: blur(8px) url(#switcher) saturate(var(--saturation)); */
    /* -webkit-backdrop-filter: blur(8px) saturate(var(--saturation)); */
    box-shadow: var(--box-shadow);
    display: inline-block;
    color: var(--fg);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 15% 25%;
    position: relative;
    
    transform-origin: center;   
}

.c-options:hover{
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5); */
    margin-left: -20%;
    border-radius: 50px;
}
.dropdown {
    position: relative;
    display: inline-block; /* so it only takes width of its contents */
}

/* The dropdown menu - hidden by default */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;  /* put it just below the trigger */
    left: 0;
    min-width: 150px;
    z-index: 1000;
    
    padding-right: 110%;
    
}

.dropdown-menu a {
    padding: 8px 12px;
}

/* Show dropdown menu on hover */
.dropdown:hover .dropdown-menu {
    display: block;
}