/* ------------------------------------------- */
/* 1. BASE AND TOP NAVBAR */
/* ------------------------------------------- */
.top-nav {
    width: 100%;
    height: 58px;
    background: #111129;
    backdrop-filter: blur(12px);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-content {
    width: 100%;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* กลุ่มโลโก้ด้านซ้าย */
.left {
    flex-grow: 0;
    display: flex;
    align-items: center;
}

/* กลุ่มปุ่มด้านขวา */
.nav-right-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

/* ------------------------------------------- */
/* 2. NAVBAR ELEMENTS */
/* ------------------------------------------- */
/* โลโก้ซ้าย — ฟ้านีออนล้วน */
.logo-text {
    font-family: 'Prompt', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #000000;
    /* ฟ้านีออนล้วน */
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow:
        0 0 5px #00d4ff,
        0 0 10px #00d4ff,
        0 0 20px #00dfff,
        0 0 30px #00dfff,
        0 0 40px rgba(0, 212, 255, 0.7);
    transition: 0.3s ease;
    line-height: 1;
}

.logo-text:hover {
    text-shadow:
        0 0 10px #00dfff,
        0 0 20px #00dfff,
        0 0 30px #00d4ff,
        0 0 45px #00d4ff,
        0 0 60px rgba(0, 212, 255, 0.9);
    transform: scale(1.05);
}

/* ยอดเงิน */
.balance {
    font-size: 10px;
    font-weight: 600;
    color: #31ad00;
    
    white-space: nowrap;
    display: flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 8px;
    
    transition: 0.2s;
}

.balance:active {
    transform: scale(0.97);
}

/* AVATAR */
.avatar-box {
    position: relative;
    cursor: pointer;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #1957ff;
    object-fit: cover;
    transition: 0.2s;
}

.avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 8px #00d4ff;
}

/* Badge แจ้งเตือน */
.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff3b3b;
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 50%;
    z-index: 1000;
    box-shadow: 0 0 4px rgba(255, 0, 0, 0.6);
}

/* ------------------------------------------- */
/* 3. BODY & OVERLAY */
/* ------------------------------------------- */
body {
    padding-top: 58px;
    box-sizing: border-box;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 58px;
    left: 0;
    width: 100%;
    height: calc(100% - 58px);
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 998;
}

.overlay.show {
    opacity: 1;
    visibility: visible;
}

/* SIDE MENU */
.menu-panel {
    position: fixed;
    top: 0;
    right: -270px;
    width: 270px;
    height: 100vh;
    background: rgba(15, 15, 40, 0.98);
    backdrop-filter: blur(18px);
    padding-top: 80px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-left: 25px;
    padding-right: 25px;
    transition: 0.35s ease-in-out;
    z-index: 9999;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-panel.show {
    right: 0;
}

.menu-panel a {
    font-size: 16px;
    font-family: 'Prompt', sans-serif;
    padding: 12px 15px;
    text-decoration: none;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    transition: 0.25s;
}

.menu-panel a:hover {
    background: rgba(0, 212, 255, 0.18);
    text-shadow: 0 0 4px #00d4ff;
}

/* ปุ่มออกจากระบบ */
.logout {
    margin-top: 25px;
    background: rgba(255, 50, 50, 0.2) !important;
    border: 1px solid rgba(255, 50, 50, 0.4);
    transition: 0.2s;
}

.logout:hover {
    background: rgba(255, 50, 50, 0.35) !important;
}

.logout i {
    color: #ff4c4c;
}

/* ------------------------------------------- */
/* 4. MOBILE RESPONSIVENESS (<= 600px) */
/* ------------------------------------------- */
@media (max-width: 600px) {

    .top-nav {
        height: 55px !important;
        padding: 0 10px;
    }

    .nav-content {
        justify-content: space-between;
    }

    /* โลโก้ซ้ายชิดจริง */
    .left {
        margin-right: auto;
    }

    .left .logo-text {
        font-size: 18px;
        text-shadow:
            0 0 4px #00d4ff,
            0 0 8px #00d4ff,
            0 0 16px #00dfff;
    }

    .balance {
        font-size: 14px;
        padding: 4px 8px;
    }

    .avatar {
        width: 32px;
        height: 32px;
    }

    .badge {
        font-size: 10px;
        padding: 1px 4px;
        top: -2px;
        right: -2px;
    }

    .nav-right-group {
        gap: 8px;
    }

    body {
        padding-top: 55px !important;
    }
}