:root {
    --backgroundColor: rgba(255, 250, 252);
    --colorShadeA: rgb(180, 110, 200);
    --colorShadeB: rgb(200, 140, 220);
    --colorShadeC: rgb(230, 180, 240);
    --colorShadeD: rgb(245, 220, 248);
    --colorShadeE: rgb(252, 240, 255);
    --wrapperBg: rgba(255, 240, 250, 0.9);
    --wrapperBorder: rgb(219, 143, 215);
}

* {
    box-sizing: border-box;
}
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: "OpenSans", sans-serif;
    font-size: 1rem;
    line-height: 2;
    margin: 0;
    background: var(--backgroundColor);
}

/* --- Navigation Container --- */
.fixed-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

/* Wrapper with better spacing */
.nav-wrapper {
    background: var(--wrapperBg);
    border-radius: 2.5em;
    padding: 1.8em 3em 2.5em 3em; /* Extra bottom padding for 3D shadow */
    border: 2px solid var(--wrapperBorder);
    box-shadow: 0 8px 25px rgba(147, 51, 142, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.fixed-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2em; /* Increased gap between buttons */
    margin: 0;
    padding: 0;
}

.fixed-nav li {
    display: flex;
    align-items: center;
}

/* --- Button Styles --- */
.fixed-nav a {
    position: relative;
    display: inline-block;
    cursor: pointer;
    outline: none;
    border: 0;
    vertical-align: middle;
    text-decoration: none;
    font-family: inherit;
    font-size: 1.5rem;
    color: var(--colorShadeA);
    font-weight: 700;
    text-transform: uppercase;
    padding: 1em 2em;
    border: 2px solid var(--colorShadeA);
    border-radius: 1em;
    background: var(--colorShadeE);
    transform-style: preserve-3d;
    transition: all 175ms cubic-bezier(0, 0, 1, 1);
    white-space: nowrap;
}

.fixed-nav a::before {
    position: absolute;
    content: "";
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--colorShadeC);
    border-radius: inherit;
    box-shadow: 0 0 0 2px var(--colorShadeB), 0 0.75em 0 0 var(--colorShadeA);
    transform: translate3d(0, 0.75em, -1em);
    transition: all 175ms cubic-bezier(0, 0, 1, 1);
    z-index: -1;
}

.fixed-nav a:hover {
    background: var(--colorShadeD);
    transform: translate(0, 0.375em);
    color: var(--colorShadeA);
}

.fixed-nav a:hover::before {
    transform: translate3d(0, 0.75em, -1em);
}

.fixed-nav a:active {
    transform: translate(0em, 0.75em);
}

.fixed-nav a:active::before {
    transform: translate3d(0, 0, -1em);
    box-shadow: 0 0 0 2px var(--colorShadeB), 0 0.25em 0 0 var(--colorShadeB);
}

.fixed-nav a.active {
    transform: translate(0em, 0.75em);
    background: var(--colorShadeD);
}

.fixed-nav a.active::before {
    transform: translate3d(0, 0, -1em);
    box-shadow: 0 0 0 2px var(--colorShadeB), 0 0.25em 0 0 var(--colorShadeB);
}

.fixed-nav a.active:hover {
    transform: translate(0em, 0.75em);
    background: var(--colorShadeD);
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Desktop (1920px+) - Default styles above */

/* Laptop (1400px-1920px) */
@media (max-width: 1920px) {
    .nav-wrapper {
        padding: 1.6em 2.5em 2.3em 2.5em;
        border-radius: 2.3em;
    }

    .fixed-nav ul {
        gap: 1.8em;
    }

    .fixed-nav a {
        font-size: 1.4rem;
        padding: 0.9em 1.8em;
    }
}

/* Tablet (768px-1400px) */
@media (max-width: 1400px) {
    .fixed-nav {
        bottom: 15px;
    }

    .nav-wrapper {
        padding: 1.4em 2em 2em 2em;
        border-radius: 2em;
    }

    .fixed-nav ul {
        gap: 1.5em;
    }

    .fixed-nav a {
        font-size: 1.2rem;
        padding: 0.8em 1.5em;
    }

    .fixed-nav a::before {
        box-shadow: 0 0 0 2px var(--colorShadeB), 0 0.65em 0 0 var(--colorShadeA);
        transform: translate3d(0, 0.65em, -1em);
    }

    .fixed-nav a:hover {
        transform: translate(0, 0.325em);
    }

    .fixed-nav a:active,
    .fixed-nav a.active {
        transform: translate(0em, 0.65em);
    }

    .fixed-nav a:active:hover,
    .fixed-nav a.active:hover {
        transform: translate(0em, 0.65em);
    }
}

/* Mobile (480px-768px) */
@media (max-width: 768px) {
    .fixed-nav {
        bottom: 10px;
        width: calc(100% - 20px);
        max-width: 600px;
    }

    .nav-wrapper {
        padding: 1.2em 1.5em 1.8em 1.5em;
        border-radius: 1.8em;
    }

    .fixed-nav ul {
        gap: 1em;
        flex-wrap: wrap;
        justify-content: center;
    }

    .fixed-nav a {
        font-size: 1rem;
        padding: 0.7em 1.2em;
        border-radius: 0.8em;
    }

    .fixed-nav a::before {
        box-shadow: 0 0 0 2px var(--colorShadeB), 0 0.5em 0 0 var(--colorShadeA);
        transform: translate3d(0, 0.5em, -1em);
    }

    .fixed-nav a:hover {
        transform: translate(0, 0.25em);
    }

    .fixed-nav a:active,
    .fixed-nav a.active {
        transform: translate(0em, 0.5em);
    }

    .fixed-nav a:active::before,
    .fixed-nav a.active::before {
        transform: translate3d(0, 0, -1em);
        box-shadow: 0 0 0 2px var(--colorShadeB), 0 0.2em 0 0 var(--colorShadeB);
    }

    .fixed-nav a:active:hover,
    .fixed-nav a.active:hover {
        transform: translate(0em, 0.5em);
    }
}

/* Small mobile devices (<480px) */
@media (max-width: 480px) {
    .fixed-nav {
        bottom: 8px;
        width: calc(100% - 16px);
    }

    .nav-wrapper {
        padding: 1em 1em 1.5em 1em;
        border-radius: 1.5em;
    }

    .fixed-nav ul {
        gap: 0.8em;
    }

    .fixed-nav a {
        font-size: 0.85rem;
        padding: 0.6em 1em;
        border-radius: 0.7em;
        border-width: 1.5px;
    }

    .fixed-nav a::before {
        box-shadow: 0 0 0 1.5px var(--colorShadeB), 0 0.4em 0 0 var(--colorShadeA);
        transform: translate3d(0, 0.4em, -1em);
    }

    .fixed-nav a:hover {
        transform: translate(0, 0.2em);
    }

    .fixed-nav a:active,
    .fixed-nav a.active {
        transform: translate(0em, 0.4em);
    }

    .fixed-nav a:active::before,
    .fixed-nav a.active::before {
        transform: translate3d(0, 0, -1em);
        box-shadow: 0 0 0 1.5px var(--colorShadeB), 0 0.15em 0 0 var(--colorShadeB);
    }

    .fixed-nav a:active:hover,
    .fixed-nav a.active:hover {
        transform: translate(0em, 0.4em);
    }
}