/* Dark Mode Styles for Login Page - Glassmorphism */

body {
    color: #e0e0e0;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;                 /* nằm sau mọi thứ */
    background-image: url('../images/background.jpg');
    background-size: cover;
    background-position: center;
    /* background-attachment: fixed tương đương nhờ position: fixed */
    transform: translateZ(0);    /* ép GPU compositing (ổn định hơn trên Win/Chrome) */
}

.main-container {
    padding: 20px; /* Add some padding to the container */
    margin-top: 20px; /* Keep original margin */
}

.form-block,
.page-block {
    /* This is the actual card/panel */
    background: rgba(20, 20, 20, 0.7); /* Card blur */
    border-radius: 16px; /* More rounded corners for glass effect */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5); /* Soft shadow for depth */
    backdrop-filter: blur(20px); /* Frosted glass effect */
    -webkit-backdrop-filter: blur(20px); /* For Safari support */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Subtle border */
    padding: 30px;
}

.form-block h2.title,
.page-block h2.title {
    color: #ffffff; /* White title */
    text-shadow: 0 0 5px rgba(0, 179, 89, 0.5); /* Subtle neon glow for title */
}

.form-block hr,
.page-block hr {
    border-top: 1px solid rgba(255, 255, 255, 0.2); /* Lighter border for separator */
    border-bottom: 0;
}

.form-group label {
    color: #e0e0e0; /* Light gray labels */
}

.form-control {
    background: rgba(255, 255, 255, 0.05); /* Slightly transparent background for input fields */
    color: #ffffff; /* White text in input fields */
    border: 1px solid rgba(255, 255, 255, 0.3); /* Lighter border for input fields */
    border-radius: 50px;
    backdrop-filter: blur(5px); /* Subtle blur for inputs */
    -webkit-backdrop-filter: blur(5px);
}

.form-control:focus {
    border-color: #00B359; /* Neon green border on focus */
    box-shadow: 0 0 0 0.2rem rgba(0, 179, 89, 0.25), 0 0 10px rgba(0, 179, 89, 0.7); /* Neon glow on focus */
}

.form-control-feedback {
    color: #00B359; /* Neon green icons */
}

.checkbox label {
    color: #e0e0e0; /* Light gray checkbox label */
}

.btn-default {
    background-color: #00B359; /* Neon green button background */
    color: #121212; /* Dark text for contrast */
    border-color: #00B359;
    border-radius: 50px;
    transition: all 0.3s ease; /* Smooth transition for hover effects */
}

.btn-default:hover {
    background-color: #00994D; /* Slightly darker neon green on hover */
    border-color: #00994D;
    box-shadow: 0 0 15px rgba(0, 179, 89, 0.8); /* Neon glow on hover */
}

.btn-gray {
    background: rgba(255, 255, 255, 0.1); /* Transparent gray button background */
    color: #00B359; /* Neon green text */
    border: 1px solid rgba(0, 179, 89, 0.5); /* Neon green border */
    transition: all 0.3s ease;
}

.btn-gray:hover {
    background: rgba(0, 179, 89, 0.2); /* More transparent neon green on hover */
    border-color: #00B359;
    box-shadow: 0 0 10px rgba(0, 179, 89, 0.6); /* Neon glow on hover */
}

a {
    color: #00B359; /* Neon green links */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #00994D; /* Slightly darker neon green on hover */
    text-shadow: 0 0 5px rgba(0, 179, 89, 0.5); /* Subtle glow on hover */
}

/* Adjustments for specific elements if needed */
.alert-danger {
    background: rgba(220, 53, 69, 0.7); /* Transparent red for error messages */
    color: #ffffff;
    border: 1px solid rgba(220, 53, 69, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.25);
    color: #ffffff;
    border: 1px solid rgba(255, 193, 7, 0.55);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.alert-success {
    background: rgba(0, 179, 89, 0.35);
    color: #ffffff;
    border: 1px solid rgba(0, 179, 89, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Header and Footer adjustments (if they are part of the same body background) */
.header-top, .header {
    background: rgba(255, 255, 255, 0.07); /* Transparent background for header */
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5); /* Soft shadow for depth */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-top a, .header a {
    color: #e0e0e0; /* Light text for header links */
}

.header-top a:hover, .header a:hover {
    color: #00B359; /* Darker Neon green on hover */
    text-shadow: 0 0 5px rgba(0, 179, 89, 0.5);
}

.navbar-default {
    background-color: transparent; /* Ensure navbar background is transparent */
    border: none;
}

.navbar-default .navbar-nav > li > a {
    color: #e0e0e0;
}

.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
    color: #00B359;
    text-shadow: 0 0 5px rgba(0, 179, 89, 0.5);
    background-color: rgba(0, 179, 89, 0.1); /* Subtle background for active/hover */
    border-radius: 5px;
}

.social-links .googleplus > a:hover,
.social-links .googleplus.active > a,
.social-links .googleplus.active > a:hover,
.social-links .googleplus.active > a:focus {
    color: #00B359;
    text-shadow: 0 0 5px rgba(0, 179, 89, 0.5);
    background-color: rgba(0, 179, 89, 0.1); /* Subtle background for active/hover */
    border-radius: 5px;
}

.navbar-default .navbar-toggle {
    border-color: rgba(255, 255, 255, 0.2);
}

.navbar-default .navbar-toggle:hover,
.navbar-default .navbar-toggle:focus {
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-default .navbar-toggle .icon-bar {
    background-color: #e0e0e0;
}

.social-links a {
    color: #e0e0e0;
}

.social-links a:hover {
    color: #00B359;
    text-shadow: 0 0 5px rgba(0, 179, 89, 0.5);
}

.dropdown-menu {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.dropdown-menu > li > a {
    color: #e0e0e0;
}

.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
    background-color: rgba(0, 179, 89, 0.1);
    color: #00B359;
    text-shadow: 0 0 5px rgba(0, 179, 89, 0.5);
}

.scrollToTop {
    background-color: #00B359;
    color: #121212;
    box-shadow: 0 0 10px rgba(0, 179, 89, 0.7);
}

.scrollToTop:hover {
    background-color: #00994D; /* Slightly darker green on hover */
    box-shadow: 0 0 15px rgba(0, 179, 89, 0.9);
}

/* Adjustments for the modal if it appears on the login page */
#modalContainer .modal-content {
    background: rgba(255, 255, 255, 0.07);
    color: #e0e0e0;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#modalContainer .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

#modalContainer .modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.fa {

    top: -5px;
}

/* Member / in-game pages: same dark glass as Login */
.page-block h4 {
    color: #ffffff;
}

.page-block p,
.page-block label,
.page-block b,
.page-block i {
    color: #e0e0e0;
}

.page-block .nav-pills > li > a {
    color: #e0e0e0;
    background: transparent;
}

.page-block .nav-pills > li > a i {
    position: static;
    top: auto;
}

.page-block .nav-pills > li > a:hover,
.page-block .nav-pills > li.active > a,
.page-block .nav-pills > li.active > a:hover,
.page-block .nav-pills > li.active > a:focus {
    color: #00B359;
    background-color: rgba(0, 179, 89, 0.15);
    text-shadow: 0 0 5px rgba(0, 179, 89, 0.5);
}

.page-block .col-md-9 .box-style-2 {
    margin-top: 0;
}

.page-block .box-style-2 h2 {
    color: #ffffff;
    text-shadow: 0 0 5px rgba(0, 179, 89, 0.5);
}

.page-block .box-style-2 p {
    color: #e0e0e0;
}

.page-block .box-style-2 .default-bg {
    background-color: #00B359;
    color: #121212;
    border-color: #00B359;
}

.page-block .box-style-2 .default-bg i {
    position: static;
    top: auto;
    color: #121212;
}

.page-block .box-style-2:hover .icon-container {
    border-color: #00B359;
}

.page-block .box-style-2:hover .default-bg {
    background-color: transparent;
    border: 1px solid #00B359;
}

.page-block .box-style-2:hover .default-bg * {
    color: #00B359;
}

.page-block .member-status-heading {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 46px;
}

.page-block .member-status-title h4 {
    margin-top: 0;
}

.page-block .member-status-title p {
    margin-bottom: 0;
}

.page-block .member-status-actions {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: flex-end;
    margin-left: auto;
}

.page-block .member-status-actions form {
    display: inline-flex;
    margin: 0;
}

.page-block .member-status-action-btn {
    align-items: center;
    display: inline-flex;
    gap: 6px;
    justify-content: center;
    white-space: nowrap;
}

.page-block .table {
    color: #e0e0e0;
    background: rgba(13, 18, 17, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-collapse: separate;
    border-radius: 8px;
    border-spacing: 0;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.page-block .table > thead > tr > th,
.page-block .table > tbody > tr > td,
.page-block .table > tbody > tr > th {
    text-align: center;
}

.page-block .table > thead > tr > th {
    color: #ffffff;
    background: linear-gradient(180deg, #00A854 0%, #008F48 100%);
    border-color: rgba(0, 122, 61, 0.85);
    border-bottom: 1px solid rgba(0, 122, 61, 0.9);
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 0;
    font-weight: 700;
    padding: 12px 18px;
    text-shadow: none;
}

.page-block .table > thead > tr > th:last-child {
    border-right: 0;
}

.page-block .table > tbody {
    background-color: rgba(12, 17, 16, 0.86);
}

.page-block .table > tbody > tr,
.page-block .table-striped > tbody > tr,
.page-block .table-striped > tbody > tr:nth-of-type(odd),
.page-block .table-striped > tbody > tr:nth-of-type(even),
.page-block .table-striped > tbody > tr:nth-child(odd),
.page-block .table-striped > tbody > tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.025);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.page-block .table-striped > tbody > tr:nth-of-type(odd),
.page-block .table-striped > tbody > tr:nth-child(odd) {
    background-color: rgba(255, 255, 255, 0.055);
}

.page-block .table > tbody > tr > td,
.page-block .table > tbody > tr > th {
    color: #edf5f1;
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 18px;
    vertical-align: middle;
}

.page-block .table-striped > tbody > tr:nth-of-type(odd) > td,
.page-block .table-striped > tbody > tr:nth-of-type(odd) > th,
.page-block .table-striped > tbody > tr:nth-child(odd) > td,
.page-block .table-striped > tbody > tr:nth-child(odd) > th {
    background-color: transparent;
}

.page-block .table-bordered,
.page-block .table-bordered > thead > tr > th,
.page-block .table-bordered > tbody > tr > td {
    border-color: rgba(255, 255, 255, 0.12);
}

.page-block .table-hover > tbody > tr:hover,
.page-block .table-hover > tbody > tr:hover > td,
.page-block .table-hover > tbody > tr:hover > th {
    background-color: rgba(0, 179, 89, 0.18);
    color: #ffffff;
}

.page-block .member-status-table {
    margin-top: 0;
}

.page-block .member-status-table .table-empty {
    color: rgba(237, 245, 241, 0.72);
    font-style: italic;
    text-align: center;
}

.page-block .member-status-remove-form {
    display: inline-flex;
    margin: 0;
}

.page-block .member-status-remove-btn {
    align-items: center;
    background: transparent;
    border: 1px solid rgba(255, 86, 86, 0.9);
    border-radius: 4px;
    color: #ff7777;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    height: 28px;
    justify-content: center;
    line-height: 26px;
    padding: 0 12px;
    text-transform: uppercase;
    white-space: nowrap;
}

.page-block .member-status-remove-btn:hover,
.page-block .member-status-remove-btn:focus {
    background: rgba(255, 86, 86, 0.12);
    border-color: #ff7777;
    color: #ffffff;
    outline: none;
}

.page-block .member-status-remove-btn .fa {
    margin-right: 4px;
}

#presenceAddTokenModal .modal-content,
#presenceGenerateTokenModal .modal-content {
    background: rgba(20, 20, 20, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
}

#presenceAddTokenModal .modal-header,
#presenceAddTokenModal .modal-footer,
#presenceGenerateTokenModal .modal-header,
#presenceGenerateTokenModal .modal-footer {
    border-color: rgba(255, 255, 255, 0.16);
}

#presenceAddTokenModal .modal-title,
#presenceGenerateTokenModal .modal-title {
    color: #ffffff;
}

#presenceAddTokenModal .close,
#presenceGenerateTokenModal .close {
    color: #ffffff;
    opacity: 0.8;
}

#presenceAddTokenModal .form-horizontal .form-group,
#presenceGenerateTokenModal .form-horizontal .form-group {
    margin-left: 0;
    margin-right: 0;
}

#presenceAddTokenModal .control-label,
#presenceGenerateTokenModal .control-label {
    color: #e0e0e0;
}

#presenceAddTokenModal .form-control,
#presenceGenerateTokenModal .form-control,
#presenceGenerateTokenModal .form-control[readonly] {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    box-shadow: none;
    opacity: 1;
}

#presenceAddTokenModal .form-control:focus,
#presenceGenerateTokenModal .form-control:focus {
    border-color: rgba(0, 179, 89, 0.72);
    box-shadow: 0 0 0 2px rgba(0, 179, 89, 0.2);
}

/* Row Captcha trong modal: đồng bộ kiểu "ảnh nằm trong ô nhập" như form Đăng Ký.
   Hình học tham chiếu từ style.css: #captchaImg (absolute, max-height:30px,
   left:17px + margin-left:10px) và #captcha (padding-left:104px).
   Giữ nguyên class .member-status-captcha vì refreshPresenceCaptcha()
   trong offline_view.php dùng nó làm hook tìm img/input. */
#presenceAddTokenModal .member-status-captcha,
#presenceGenerateTokenModal .member-status-captcha {
    position: relative;
}

#presenceAddTokenModal .member-status-captcha img,
#presenceGenerateTokenModal .member-status-captcha img {
    position: absolute;
    top: 2px;
    left: 27px; /* = left:17px của #captchaImg + 10px margin-inline ở form Đăng Ký */
    width: auto;
    max-height: 30px;
    border-radius: 4px;
    z-index: 1;
    cursor: pointer;
}

#presenceAddTokenModal .member-status-captcha input[type="text"],
#presenceGenerateTokenModal .member-status-captcha input[type="text"] {
    padding-left: 104px;
}

#presenceAddTokenMessage,
#presenceGenerateTokenMessage {
    margin-bottom: 18px;
}

@media (max-width: 767px) {
    .page-block .member-status-heading {
        display: block;
    }

    .page-block .member-status-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
        margin-top: 12px;
    }

    .page-block .member-table-wrap {
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .page-block .member-status-table {
        min-width: 520px;
    }

    .page-block .member-history-table {
        min-width: 560px;
    }

    .page-block .member-status-table > thead > tr > th,
    .page-block .member-status-table > tbody > tr > td,
    .page-block .member-history-table > thead > tr > th,
    .page-block .member-history-table > tbody > tr > td {
        font-size: 12px;
        padding: 10px 8px;
    }

    .page-block .member-status-remove-btn {
        font-size: 11px;
        height: 26px;
        line-height: 24px;
        padding: 0 10px;
    }
}

/* ------------------------------------------------------------------
   Footer chuẩn thương hiệu (Cổ Long Online — Công Ty Mata)
   Nền tối + chữ sáng để đồng bộ dark theme, tránh chữ đen trên nền tối.

   QUAN TRỌNG — sửa xung đột với style.css:
   style.css có rule cũ kiểu "sticky footer":
       footer{position:absolute;bottom:0;width:100%;height:80px;font-size:13px}
   Rule đó chỉ đúng khi footer luôn bị comment-out (trạng thái trước đây).
   Khi footer được bật, nó bị ghim đè lên nội dung: che mất nút ĐĂNG NHẬP /
   ĐĂNG KÝ và cắt cụt chữ vì khung cố định 80px.
   -> Đưa footer về lại luồng bình thường (static) và để chiều cao tự động.
   ------------------------------------------------------------------ */
footer {
    position: static;
    height: auto;
    min-height: 0;
    width: 100%;
    margin-top: 24px;
    padding: 14px 0 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.05);
    color: #cfcfcf;
    font-size: 13px;
    line-height: 1.9;
}

footer a,
footer a:hover,
footer a:focus {
    color: #00B359;
    text-decoration: none;
}

footer a:hover,
footer a:focus {
    text-decoration: underline;
}

/* Mỗi mục footer là một khối không tách rời (icon + chữ + link) để khi
   xuống dòng ở màn hình hẹp, dấu "|" không bị mồ côi ở cuối/đầu dòng. */
footer .footer-item {
    display: inline-block;
    white-space: nowrap;
}

footer .footer-sep {
    display: inline-block;
    margin: 0 6px;
    color: #00B359;
    opacity: 0.55;
}

@media (max-width: 767px) {
    footer {
        font-size: 12.5px;
        line-height: 1.75;
    }
    /* Màn hình hẹp: bỏ dấu "|" (nếu giữ, nó sẽ nằm mồ côi ở cuối dòng khi
       mục kế tiếp xuống dòng) và tách các mục bằng khoảng trắng. */
    footer .footer-sep {
        display: none;
    }
    footer .footer-item {
        margin: 0 8px;
    }
}

/* style.css bù chỗ cho footer "sticky" bằng body{margin-bottom:80px}.
   Footer giờ nằm trong luồng bình thường nên khoảng bù này thành một dải
   trống 80px dưới chân trang -> bỏ đi. */
body {
    margin-bottom: 0;
}
