* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Prompt', sans-serif;
}

body, html {
    font-family: 'Prompt', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../../images/bg_01.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    filter: brightness(0.6);
    -webkit-filter: brightness(0.6);
    image-rendering: auto;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
}

.navbar {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    box-shadow: 0 4px 20px rgba(48, 201, 255, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid #30c9ff;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(0px);
}

.navbar.scrolled {
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.95), rgba(20, 20, 20, 0.95));
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(48, 201, 255, 0.4), 0 0 40px rgba(48, 201, 255, 0.2);
    border-bottom: 2px solid rgba(48, 201, 255, 0.8);
    transform: translateY(0);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled .nav-container {
    height: 65px;
}

.nav-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.nav-logo-img {
    height: 45px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(48, 201, 255, 0.3));
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: glow 2s ease-in-out infinite alternate;
}

.navbar.scrolled .nav-logo-img {
    height: 40px;
    filter: drop-shadow(0 2px 12px rgba(48, 201, 255, 0.5));
}

.nav-logo a:hover .nav-logo-img {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 15px rgba(48, 201, 255, 0.6));
}

@keyframes glow {
    from {
        filter: drop-shadow(0 0 5px rgba(48, 201, 255, 0.5));
    }
    to {
        filter: drop-shadow(0 0 15px rgba(48, 201, 255, 0.8));
    }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 10px;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-dropdown {
    position: relative;
}

.dropdown-arrow {
    font-size: 12px;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-arrow,
.nav-user-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.98), rgba(10, 10, 10, 0.98));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(48, 201, 255, 0.3);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(48, 201, 255, 0.2);
    list-style: none;
    padding: 8px 0;
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-dropdown:hover .dropdown-menu,
.nav-user-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #ffffff;
    text-decoration: none;
    font-family: 'Prompt', sans-serif;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dropdown-link::before {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(48, 201, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.dropdown-link:hover::before {
    left: 100%;
}

.dropdown-link:hover {
    background: rgba(48, 201, 255, 0.15);
    color: #30c9ff;
    padding-left: 25px;
}

.dropdown-link i {
    font-size: 18px;
    width: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.dropdown-link:hover i {
    transform: scale(1.2);
}

.dropdown-link .fab.fa-discord {
    color: #5865F2;
}

.dropdown-link:hover .fab.fa-discord {
    color: #5865F2;
    filter: drop-shadow(0 0 8px rgba(88, 101, 242, 0.6));
}

.dropdown-link .fab.fa-facebook {
    color: #1877F2;
}

.dropdown-link:hover .fab.fa-facebook {
    color: #1877F2;
    filter: drop-shadow(0 0 8px rgba(24, 119, 242, 0.6));
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-family: 'Prompt', sans-serif;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: rgba(48, 201, 255, 0.3);
}



.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(48, 201, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-login::before {
    background: none;
}

.nav-link:hover {
    background: rgba(48, 201, 255, 0.15);
    color: #30c9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(48, 201, 255, 0.3);
}

.nav-register:hover,
.nav-login:hover {
    background: inherit;
    color: inherit;
}

.nav-link.active {
    color: #30c9ff;
}

.nav-icon {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.nav-link:hover .nav-icon {
    transform: scale(1.2) rotate(5deg);
}

.nav-text {
    position: relative;
}

/* Auth Group Styles */
.nav-auth-group {
    margin-left: 10px;
}

.nav-auth-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-register,
.nav-login {
    position: relative;
    padding: 10px 18px;
    font-weight: 600;
    border-radius: 10px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

/* Register Button - Primary Style */
.nav-register {
    background: linear-gradient(135deg, #30c9ff, #4ff3ff);
    border: 1px solid rgba(48, 201, 255, 0.6);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(48, 201, 255, 0.3);
}

.nav-register::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
    z-index: 0;
}

.nav-register:hover::before {
    width: 200px;
    height: 200px;
}

.nav-register:hover {
    background: linear-gradient(135deg, #4ff3ff, #30c9ff);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(48, 201, 255, 0.5);
    border-color: rgba(48, 201, 255, 0.8);
}

.nav-register .nav-icon,
.nav-login .nav-icon {
    position: relative;
    z-index: 1;
}

.nav-register .nav-text,
.nav-login .nav-text {
    position: relative;
    z-index: 1;
}

/* Login Button - Outline Style */
.nav-login {
    background: transparent;
    border: 2px solid rgba(48, 201, 255, 0.6);
    color: #30c9ff;
}

.nav-login::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(48, 201, 255, 0.15), rgba(255, 170, 0, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.nav-login:hover::after {
    opacity: 1;
}

.nav-login:hover {
    border-color: rgba(48, 201, 255, 0.9);
    color: #ffffff;
    background: linear-gradient(135deg, rgba(48, 201, 255, 0.2), rgba(255, 170, 0, 0.15));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(48, 201, 255, 0.4);
}

.nav-login:hover .nav-icon {
    color: #ffffff;
}

/* User Menu (เมื่อ login แล้ว) */
.nav-user {
    background: linear-gradient(135deg, rgba(48, 201, 255, 0.15), rgba(255, 170, 0, 0.1));
    border: 1px solid rgba(48, 201, 255, 0.3);
    color: #30c9ff;
}

.nav-user:hover {
    background: linear-gradient(135deg, rgba(48, 201, 255, 0.25), rgba(255, 170, 0, 0.2));
    border-color: rgba(48, 201, 255, 0.5);
    color: #ffffff;
}

.nav-user-dropdown {
    position: relative;
}

.nav-user-dropdown .dropdown-menu {
    min-width: 200px;
    right: 0;
    left: auto;
}

.nav-user-dropdown:hover .nav-link {
    background: rgba(48, 201, 255, 0.15);
    color: #30c9ff;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 5px;
    -webkit-tap-highlight-color: rgba(48, 201, 255, 0.3);
    touch-action: manipulation;
}

.bar {
    width: 25px;
    height: 3px;
    background: #30c9ff;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.player-online-box {
    padding: 6px 14px;
    margin-left: 12px;
    border: 1px solid rgba(0,255,0,0.4);
    background: rgba(0,255,0,0.1);
    color: #00ff99;
    font-weight: 600;
    border-radius: 10px;
    display: flex;
    align-items: center;
    backdrop-filter: blur(4px);
}

.player-online-box .dot-online {
    width: 10px;
    height: 10px;
    background: #00ff55;
    border-radius: 50%;
    margin-right: 6px;
}



/* Responsive Design */
@media screen and (max-width: 768px) {
    .nav-container {
        padding: 0 15px;
        height: 60px;
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.3);
        padding: 20px 0;
        gap: 0;
        border-top: 2px solid #30c9ff;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        width: 100%;
        margin: 0;
    }

    .nav-link {
        justify-content: center;
        padding: 18px 20px;
        width: 100%;
        font-size: 16px;
        touch-action: manipulation;
    }

    .nav-auth-group {
        margin-left: 0;
        width: 100%;
    }

    .nav-auth-buttons {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        padding: 0 20px;
    }

    .nav-register,
    .nav-login {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }

    .nav-dropdown {
        position: relative;
    }

    .dropdown-menu {
        position: static;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(0, 0, 0, 0.3);
        border: none;
        border-top: 1px solid rgba(48, 201, 255, 0.2);
        border-radius: 0;
        box-shadow: none;
        margin: 0;
        padding: 0;
        min-width: 100%;
        width: 100%;
    }

    .nav-dropdown.active .dropdown-menu,
    .nav-user-dropdown.active .dropdown-menu {
        display: block;
    }

    .dropdown-link {
        padding: 14px 20px 14px 40px;
        border-bottom: 1px solid rgba(48, 201, 255, 0.1);
    }

    .dropdown-link:last-child {
        border-bottom: none;
    }

    .dropdown-link:hover {
        padding-left: 45px;
    }

    .dropdown-arrow {
        margin-left: auto;
    }

    .nav-dropdown.active .dropdown-arrow,
    .nav-user-dropdown.active .dropdown-arrow {
        transform: rotate(180deg);
    }

    .nav-icon {
        font-size: 20px;
    }

    .nav-logo-img {
        height: 38px;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* Extra small devices (phones, 480px and down) */
@media screen and (max-width: 480px) {
    .nav-container {
        padding: 0 10px;
        height: 55px;
    }

    .nav-logo-img {
        height: 32px;
    }

    .nav-menu {
        top: 55px;
        max-height: calc(100vh - 55px);
    }

    .nav-link {
        padding: 16px 15px;
        font-size: 15px;
    }

    .nav-auth-buttons {
        padding: 0 15px;
        gap: 10px;
    }

    .nav-register,
    .nav-login {
        padding: 12px 18px;
        font-size: 14px;
    }

    .nav-icon {
        font-size: 18px;
    }
}

/* Landscape orientation on mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .nav-menu {
        max-height: 80vh;
    }

    .nav-link {
        padding: 12px 20px;
    }
}

/* Mobile background fix */
@media screen and (max-width: 768px) {
    body::before {
        background-attachment: scroll;
    }
}

/* Animation for page load */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.navbar {
    animation: slideDown 0.5s ease-out;
}

/* Particle effect on hover */
.nav-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle, rgba(48, 201, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.nav-link:hover::after {
    opacity: 1;
}

