/* ================================
   BASE
================================ */
body {
    font-family: Arial, sans-serif;
}

/* ================================
   LOGIN CONTROLS (NÚT NGOÀI)
================================ */
.login-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ================================
   MODAL OVERLAY
================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
            135deg,
            rgba(0, 212, 255, 0.35),
            rgba(255, 107, 157, 0.35)
    );
    backdrop-filter: blur(4px);
}

/* ================================
   MODAL BOX
================================ */
.modal-content {
    background: rgba(255, 255, 255, 0.92);
    /*margin: 10% auto; căn giữa*/
    margin:60px auto 0; 
    padding: 26px 26px 28px;
    width: 420px;
    max-width: 92vw;
    border-radius: 18px;
    box-shadow:
            0 20px 50px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: popupZoom 0.3s ease;
}

@keyframes popupZoom {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 22px;
    color: #333;
    font-size: 24px;
    font-weight: 700;
}

/* ================================
   INPUT (GLASS STYLE)
================================ */
.modal-content input[type="text"],
.modal-content input[type="password"] {
    width: 100%;
    padding: 13px 16px;
    margin: 10px 0;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.25s ease;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(4px);
}

.modal-content input:focus {
    border-color: #00d4ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.35);
}

/* ================================
   TERMS
================================ */
.terms {
    margin-top: 10px;
    font-size: 13px;
    display: inline-flex;
    align-items: flex-start;
    line-height: 1.4;
    color: #333;
}

.terms input[type="checkbox"] {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    margin-right: 8px;
    margin-top: 3px;
    accent-color: #ff6b9d;
}

.terms label a {
    color: #33a4ff;
    font-weight: 600;
    font-family: Inter-Regular;
}

/* ================================
   LOGIN MESSAGE
================================ */
#loginMessage {
    margin-top: 12px;
    font-size: 14px;
    text-align: center;
    min-height: 18px;
    line-height: 20px;
}

/* ================================
   LINK (QUÊN MK / ĐĂNG KÝ)
================================ */
.modal-content .link {
    text-align: center;
    margin-top: 14px;
    font-size: 14px;
}

.modal-content .link a {
    color: #2196F3;
    font-weight: 600;
    text-decoration: none;

}

.modal-content .link a:hover {
    text-decoration: underline;
}

/* ================================
   CLOSE BUTTON
================================ */
.close {
    position: absolute;
    right: 14px;
    top: 10px;
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
    color: #ff4f91;
    font-weight: bold;
    opacity: 1;
}

/* Thanh hành động trên cùng (Login + Liên hệ) */
.top-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap; /* Cho phép xuống dòng khi màn hình nhỏ */
}

/* Login controls: nút + lời chào */
.login-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Welcome text giữ gọn */
#welcomeDiv {
    white-space: nowrap;
    font-weight: 600;
}

/* Nút Liên hệ */
.home-contact .cta-button {
    padding: 12px 15px;
    border-radius: 999px;
    background: linear-gradient(45deg, #00d4ff, #ff6b9d);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    font-size: 15px;
    box-shadow: 0 6px 16px rgba(0, 212, 255, 0.35);
    transition: all 0.25s ease;
    white-space: nowrap;
}

.home-contact .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(255, 107, 157, 0.45);
}

/* Nút login khi đang loading */
.login-submit-btn.is-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.85;
}

/* Chấm tròn quay quay */
.login-submit-btn.is-loading::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-top-color: rgba(255, 255, 255, 0.2);
    animation: login-spin 0.7s linear infinite;
}

@keyframes login-spin {
    to {
        transform: rotate(360deg);
    }
}
.main_mobile_menu .mobile-top-actions {
    margin-top: 15px;
}
/* =========================
.home-contact bỏ margin-top: 8px; trong file style
.main_mobile_menu: padding: 20px 0px 5px 0px
   FULL PAGE PRELOADER
========================= */
#pagePreloader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: linear-gradient(45deg, #00d4ff, #ff6b9d);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

#pagePreloader.hide {
    opacity: 0;
    visibility: hidden;
}

/* Spinner */
.preloader-spinner {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    animation: preloader-spin 1s linear infinite;
}

@keyframes preloader-spin {
    to {
        transform: rotate(360deg);
    }
}

/*Mobile*/

/* ====== KHỐI LOGIN + LIÊN HỆ: NẰM NGANG – CHIA ĐỀU ====== */
.main_mobile_menu .mobile-top-actions {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: center;/* CHIA ĐỀU 2 BÊN */
    gap: 10px;
    text-align: center;

}

/* Login controls nằm ngang */
.main_mobile_menu .login-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

/* Text xin chào */
.main_mobile_menu #welcomeDiv {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

/* Nút Liên hệ bên phải */
.main_mobile_menu .home-contact {
    display: flex;
    align-items: center;
}

/* Nút Liên hệ giữ style đẹp */
.main_mobile_menu .home-contact .cta-button {
    padding: 8px 18px;
    border-radius: 999px;
    background: linear-gradient(45deg, #00d4ff, #ff6b9d);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    box-shadow: 0 6px 16px rgba(0, 212, 255, 0.35);
    transition: all 0.25s ease;
    white-space: nowrap;
}

.main_mobile_menu .home-contact .cta-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(255, 107, 157, 0.45);
}

/* ====== MÀN HÌNH RẤT NHỎ: THU GỌN LẠI CHO KHỎI VỠ ====== */
@media (max-width: 400px) {
    .main_mobile_menu .mobile-top-actions {
        gap: 6px;
    }

    .main_mobile_menu #welcomeDiv {
        font-size: 12px;
    }

    .main_mobile_menu .home-contact .cta-button {
        padding: 6px 14px;
        font-size: 12px;
    }
}


/*End mobile*/
/* =======================
   RESPONSIVE MOBILE
======================= */
@media (max-width: 768px) {
    .top-action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .login-controls {
        justify-content: center;
    }

    .home-contact {
        text-align: center;
    }

    .home-contact .cta-button {
        width: 100%;
        text-align: center;
    }
}
.game-locked-ui {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    background: #eee;
    color: #999;
    font-size: 14px;
    cursor: not-allowed;
    user-select: none;
}
button#logoutBtnMb,button#logoutBtn {
    padding: 7px 10px !important;
    font-size: 14px;
    margin: 0px;
    font-family: 'Inter-Regular';
    font-weight: 300;
}
div#welcomeDiv,div#welcomeDivMb{
    margin-top: 0px !important;
}
.game-locked-ui i {
    color: #ff4d4f;
}
.game-info ul{
    align-items: center;
}
button#logoutBtnMb{
    background: linear-gradient(45deg, #ff6b6b, #ff3d81);
    box-shadow: 0 6px 16px rgba(255, 61, 129, 0.35);
}
div#welcomeDivMb{
    margin-top: 10px;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(45deg, #00d4ff, #ff6b9d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
/* ================================
   BUTTON STYLE (GRADIENT CHỦ ĐẠO)
================================ */
.modal-content button,
.login-controls button {
    position: relative;
    padding: 12px 15px;
    border-radius: 10px;
    border: none;
    cursor: pointer;

    background: linear-gradient(45deg, #00d4ff, #ff6b9d);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.4px;

    box-shadow:
            0 6px 16px rgba(0, 212, 255, 0.35),
            0 0 0 rgba(255, 107, 157, 0.4);

    transition: all 0.25s ease;
    overflow: hidden;
}

.modal-content button {
    width: 100%;
    margin-top: 20px;
}

.modal-content button:hover,
.login-controls button:hover {
    transform: translateY(-2px);
    box-shadow:
            0 10px 26px rgba(0, 212, 255, 0.45),
            0 0 12px rgba(255, 107, 157, 0.6);
}

.modal-content button:active,
.login-controls button:active {
    transform: scale(0.97);
    box-shadow:
            0 4px 12px rgba(0, 212, 255, 0.3),
            0 0 6px rgba(255, 107, 157, 0.4);
}

/* ================================
   LOGOUT BUTTON RIÊNG
================================ */
.login-controls button#logoutBtn {
    background: linear-gradient(45deg, #ff6b6b, #ff3d81);
    box-shadow:
            0 6px 16px rgba(255, 61, 129, 0.35);
}

.login-controls button#logoutBtn:hover {
    box-shadow:
            0 10px 26px rgba(255, 61, 129, 0.55);
}

/* ================================
   WELCOME TEXT
================================ */
#welcomeDiv {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(45deg, #00d4ff, #ff6b9d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ================================
   RESPONSIVE MOBILE
================================ */
@media (max-width: 575.98px) {
    .modal-content {
        width: 100vw !important;
        min-width: 0 !important;
        border-radius: 0 !important;
        margin: 0;
        height: auto;
        top: 20%;
        left: 17px;
    }

    .terms {
        margin: 12px 0;
    }

    .terms label {
        font-size: 12px;
    }

    .modal-content h2 {
        font-size: 20px;
    }
}
