.bottom-sheet-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    pointer-events: none; 
}

.menu-container {
    pointer-events: auto; 
    max-width: 1300px;
    width: 90vw;
    margin: 0;
    background: rgba(255, 255, 255, 0.65); 
    backdrop-filter: blur(25px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(110%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    border-radius: 20px 20px 0px 0px;
    padding: 25px 20px;
    display: flex;
    align-items: center;
    flex-direction: row;
    padding-top: 25px;
}

.bottom-sheet-handle {
    display: none;
}

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-around;
    flex-grow: 1;
    flex-wrap: nowrap;
}

.menu-item {
    padding: 0;
    flex: 0 1 auto;
    text-align: center;
}

.hidden-mobile {
    display: none !important;
}

.menu-item a {
    font-family: 'LondrinaSolid-Regular', sans-serif;
    font-size: clamp(1.4rem, 3vw, 2rem);
    text-decoration: none;
    color: var(--accent-color);
    display: inline-block;
    transition: transform 0.3s ease-in-out, color 0.3s ease;
    text-shadow: 0 1px 1px rgba(255,255,255,0.5); 
}

.menu-item a:hover {
    color: var(--main-color);
    transform: var(--hover-zoom);
}

.menu-list a.is-active {
    color: var(--main-color);
}


/* ==== Mobile ==== */

@media (max-width: 768px) {
    
    nav {
        pointer-events: auto; 
    }

    .bottom-sheet-nav {
        display: block;
        max-height: 90vh;
        width: 100%;
        transition: transform 0.3s ease-out;
        transform: translateY(calc(100% - 100px));
        cursor: pointer;
    }

    .bottom-sheet-nav.is-open {
        transform: translateY(0);
    }
    
    .bottom-sheet-handle {
        display: flex;
        width: 80px;
        height: 30px;
        background-color: transparent !important;
        margin: -30px auto 0 auto;
        cursor: pointer;
        justify-content: center;
        align-items: center;
    }

    .bottom-sheet-handle::after {
        content: "";
        width: 40px;
        height: 5px;
        background-color: rgba(100, 100, 100, 0.3); 
        border-radius: 5px;
        display: block;
    }
    
    .menu-container {
        width: 100%;
        box-sizing: border-box;
        margin: 0;
        padding: 30px 20px 25px 20px;
        flex-direction: column;
        height: 100%;
        overflow-y: auto;
    }
    
    .menu-list {
        display: flex;
        width: 100%;
        padding-bottom: 0;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
    }

    .menu-list::-webkit-scrollbar { 
        display: none; 
    }

    .menu-item {
        padding: 10px 15px;
        flex: 0 0 auto;
        max-width: none;
        text-align: center;
        display: block !important;
    }
    
    .bottom-sheet-nav.is-open .menu-list {
        flex-wrap: wrap;
        justify-content: center;
        overflow-x: visible;
    }
    
    .bottom-sheet-nav.is-open .menu-list .menu-item {
        display: block !important;
        flex: 0 1 auto;
    }
}


/* ==== Theme Switch ==== */

.theme-switcher-header {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    background: white;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    padding: 8px 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--accent-color);
    text-decoration: none;
}

.theme-switcher-header:hover {
    background: black;
    transform: translateY(-52%) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    color: var(--main-color);
}

:root[data-theme="dark"] .theme-switcher-header {
    background: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.theme-switcher-header .sun-icon,
.theme-switcher-header .moon-icon {
    display: none;
    fill: currentColor;
    width: 22px; 
    height: 22px;
}

:root:not([data-theme="dark"]) .moon-icon { display: block; }
:root[data-theme="dark"] .sun-icon { display: block; }

@media (max-width: 768px) {
    .theme-switcher-header {
        right: 15px;
        padding: 6px 10px;
    }
    .theme-switcher-header svg {
        width: 20px;
        height: 20px;
    }
}


/* ==== Logo ==== */

.logo-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 30px 0;
}

.gg-logo{
    display: inline-block; 
    position: relative;
    overflow: hidden; 
    cursor: pointer;
}

.gg-logo svg {
    width: clamp(150px, 15vw, 200px); 
    height: auto; 
    transition: transform 0.3s ease-out; 
    animation: quickZoom 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) 0s forwards;
    animation-fill-mode: forwards; 
}

@keyframes quickZoom {
    0% { 
        transform: scale(0.1) rotateX(90deg); 
        opacity: 0;
    }
    100% {
        transform: scale(1) rotateX(0deg); 
        opacity: 1;
    }
}

.gg-logo:hover svg {
    transform: scale(1.03); 
}

.gg-logo:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%; 
    width: 50%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1); 
    transform: skewX(-20deg); 
    pointer-events: none; 
}

.gg-logo:hover {
    transform: var(--hover-zoom);
    transition: transform 0.6s ease-in-out;
}


/* ==== Icons ==== */

.icon-item a {
    font-size: 0;
    padding: 0 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.icon-item a svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.icon-item a:hover svg {
    transform: var(--hover-zoom);
}

@media (max-width: 768px) {
    .icon-item {
        padding: 15px 10px;
    }
}


/* ===== Footer ===== */

.footer {
    padding-top: var(--space-xs);
    padding-bottom: 110px;
}

.footer-inner {
    color: var(--text-color);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1.5px solid var(--border-color);
    padding-top: var(--space-xs);
}

.footer .legal-links a {
    margin-left: 1em;
    color: var(--accent-color);
}

.footer .legal-links a:hover {
    color: var(--main-color);
}

@media (max-width: 768px) {
    .footer {
        padding-bottom: 120px;
    }


    .footer-inner {
        flex-direction: column-reverse;
        align-items: center;
        gap: 1rem;
    }

    .footer .legal-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1em;
    }

    .footer .legal-links a {
        margin: 0;
    }
}