/* ========== Imports ========== */
@import url('https://fonts.googleapis.com/css2?family=Protest+Guerrilla&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');

/* ========== Main Styles ========== */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #1C1C1C;
    font-family: "Nunito", sans-serif;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

body {
    min-height: 100vh;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    background-color: #F24949;
    padding: 0 2vw;
    height: 70px;
    box-shadow: 0 0 5px 2px rgba(0,0,0,0.8);
    flex-shrink: 0;
}

header h1 {
    font-family: "Protest Guerrilla", sans-serif;
    font-weight: 400;
    font-size: 3em;
    margin: 0;
}

header a {
    color: #1C1C1C;
    text-decoration: none;
}

main {
    flex: 1 0 auto; /* take all available space but allow shrinking */
    display: flex;
    flex-direction: column;
    padding: 0 5vw;
    box-sizing: border-box;
}

/* --- NAV --- */
#main-nav {
    height: 100%;
    position: relative;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
}

#nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
    transition: all 0.3s ease;
}

#nav-links li {
    display: flex;
    align-items: center;
    height: 100%;
    transition: background-color 0.3s ease;
}

#nav-links li a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 1.5rem;
    text-decoration: none;
    color: white;
    transition: color 0.3s ease;
}

#nav-links li:hover a {
    color: #F24949;
}

#nav-links li:hover {
    background-color: #1C1C1C;
}

/* --- LOGOUT BUTTON --- */
#logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #F24949;
    border: none;
    padding: 0 1rem;
    margin: 0;
    cursor: pointer;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1;
    height: 100%;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#logout-btn img {
    width: 25px;
    height: auto;
    display: block;
}

#logout-btn:hover {
    background-color: #1C1C1C;
    color: #fff;
}

/* --- BURGER MENU --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 20px;
    cursor: pointer;
    margin-right: 1rem;
    z-index: 1101;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* --- FOOTER --- */
footer {
    background-color: #2C2C2C;
    color: #F24949;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2vw;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.5);
    flex-wrap: wrap;
    font-size: 0.9rem;
    flex-shrink: 0; /* ensures footer stays at bottom */
}

footer ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

footer li {
    margin-left: 1rem;
    white-space: nowrap;
}

footer a {
    color: #F24949;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease;
}

footer a:hover {
    color: #fff;
    transform: scale(1.05);
}

footer .footer-left { flex: 1; }
footer .footer-right { flex: 1; display: flex; justify-content: flex-end; }

/* ========== Responsive Design ========== */
@media (max-width: 600px) {
    footer {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    footer .footer-right { justify-content: center; margin-top: 0.5rem; }
    footer li { margin-left: 0.5rem; }

    .menu-toggle {
        display: flex;
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1300;
    }

    #nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        background-color: rgba(44,44,44,0.97);
        display: none;
        padding: 1rem 0;
        gap: 1rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.5);
        z-index: 1200;
        overflow-y: auto;
        border-top: 1px solid #1C1C1C;
        backdrop-filter: blur(5px);
        transition: transform 0.3s ease, opacity 0.3s ease;
        transform: translateY(-10px);
        opacity: 0;
    }

    #nav-links.active {
        display: flex;
        transform: translateY(0);
        opacity: 1;
        animation: fadeDown 0.3s ease forwards;
        width: 100%;
    }

    #nav-links li, #logout-btn {
        width: 100%;
        justify-content: center;
        height: auto;
    }

    #logout-btn {
        background-color: rgba(44,44,44,0);
    }

    #nav-links li a, #logout-btn {
        display: flex;
        padding: 0.75rem 1rem;
        width: 100%;
        text-align: center;
        align-content: center;
        border-radius: 8px;
        transition: background 0.2s ease, color 0.2s ease;
        margin: 0;
    }

    #nav-links li a:hover, #logout-btn:hover {
        background-color: #F24949;
        color: #fff;
    }

    .menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translateY(8px); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translateY(-8px); }
}

/* --- Animation --- */
@keyframes fadeDown { 
    from { opacity: 0; transform: translateY(-10px); } 
    to { opacity: 1; transform: translateY(0); } 
}
