/* ===== NAVIGATION STYLES ===== */
/* Main Navigation Styles */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to right, #0a0a4a, #1a1a8a, #0a0a4a);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.navbar-color {
    background: transparent;
    color: var(--font-color);
    width: 100%;
    max-width: var(--main-bg-size);
    z-index: 1000;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
}

/* Logo Styling */
.logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 10px;
}

.logo img {
    height: 50px;
    max-width: 100%;
}

/* Auth Buttons Styling */
.auth-buttons-1 {
    display: flex;
    gap: 10px;
    margin-left: auto;
    margin-right: 10px;
}

.auth-buttons-1 button {
    background-color: #4040e0;
    color: white;
    border: 1px solid #ffffff;
    border-radius: 10px;
    padding: 8px 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.auth-buttons-1 button:hover {
    background-color: #3030c0;
}

.auth-buttons-1 button.register {
    border: 1px solid #ffd900;
    background-color: #ff7700;
}

.auth-buttons-1 button.register:hover {
    background-color: #e06600;
}

.auth-buttons-2 {
    display: flex;
    gap: 10px;
    margin-left: auto;
    margin-right: 10px;
}

.auth-buttons-2 button {
    width: 100%;
    padding: 5px; 
    min-width: 160px;
    border-radius: 10px;
    font-size: 20px;
    font-weight: bold;    
    color: white;
    background-color: #4040e000;
}

.auth-buttons-2 button.login {
    border-radius: 10px;
    padding: 8px 15px;
    font-weight: 500;
    cursor: pointer;
    background-color: #4040e0;
    border: 2px solid #ffffff;
}

.auth-buttons-2 button.logout {
    border-radius: 10px;
    padding: 8px 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    background-color: #ff0000;
}

.auth-buttons-2 button.logout:hover {
    background-color: #e00000;
}

/* Menu Toggle Button */
.menu-toggle {
    position: absolute;
    left: 20px;
    cursor: pointer;
    z-index: 1001;
    display: none;
}

.menu-toggle i {
    color: #ffffff;
    font-size: 24px;
    transition: color 0.3s ease;
}

.menu-toggle:hover i {
    color: #ffc107;
}

.menu-toggle.active i {
    color: #ff7700;
}

.menu-icon {
    width: 30px;
    height: 30px;
}

/* Side Menu Styling */
.side-menu {
    position: fixed;
    top: 70px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(to bottom, #2a2a7a, #1a1a5a);
    z-index: 999;
    overflow-y: auto;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    max-height: 60px;
}

.side-menu ul {
    list-style: none;
    padding: 5px 0;
    margin: 0;
    display: flex;
    justify-content: center;
}

.side-menu li {
    padding: 5px 25px;
    border-bottom: none;
}

.side-menu a {
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    display: block;
    transition: color 0.3s;
}

.side-menu a:hover {
    color: #ffc107;
}

/* ===== MEDIA QUERIES ===== */
/* Responsive layout for auth buttons */
@media screen and (max-width: 426px) {
    .menu-toggle {
        display: block;
    }
    
    .auth-buttons-1 {        
        position: absolute;
        bottom: -50px;
        left: 0;
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 5px;
    }
    
    .auth-buttons-1 button {        
        border: 2px solid #ffffff;
        width: 100%;
        padding: 10px;
    }

    .auth-buttons-1 button.register {
        border: 2px solid #ffd900;
    }

    .auth-buttons-2 {
        background-color: #000000;
        position: absolute;
        bottom: -110px;
        left: 0;
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 5px;
    }

    .auth-buttons-2 button {
        border: 2px solid #ffffff;
        padding: 5px;
        min-width: auto;
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Add space below nav to accommodate buttons */
    .main-nav {
        margin-bottom: 60px;
        position: relative;
    }

    .side-menu {
        position: fixed;
        top: 70px;
        left: -250px;
        width: 250px;
        height: calc(100vh - 70px);
        max-height: none;
        max-width: none;
        transform: none;
        margin: 0;
        transition: left 0.3s ease;
        border-radius: 0;
    }
    
    .side-menu.active {
        left: 0;
    }
    
    .side-menu ul {
        display: block;
        padding: 20px 0;
    }
    
    .side-menu li {
        padding: 15px 25px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Media Query สำหรับหน้าจอขนาดเล็ก (มือถือ) */
@media screen and (max-width: 768px) {


    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        margin: 0;
    }

    .auth-buttons-2 button {
        width: 100%;
        padding: 10px; 
        min-width: 140px;
        border-radius: 10px;
        font-size: 16px;
        font-weight: bold; 
    }    
}