html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* =====================================================================
   (E23) Nút Đăng nhập / Đăng ký LUÔN hiện trên thanh trên cùng.
   Trước đây 2 nút nằm trong .navbar-menu nên khi màn hình hẹp (<1024px)
   Bulma ẩn cả menu vào nút hamburger -> người chơi không thấy chỗ đăng nhập.
   ===================================================================== */
.gp-auth-quick { display: none; }
@media screen and (max-width: 1023px) {
  /* Neo 2 nút vào góc trên-phải của thanh điều hướng để luôn nhìn thấy */
  .navbar { position: relative; }
  .gp-auth-quick {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    z-index: 35;
  }
  .gp-auth-quick .button {
    padding: 4px 10px;
    font-size: 13px;
    white-space: nowrap;
  }

  /* Không hiện trùng 2 nút này ở trong menu hamburger nữa */
  .navbar-menu .navbar-end .js-modal-trigger { display: none; }
}

/* Màn hình rất hẹp: thu gọn chữ để không bị xuống dòng */
@media screen and (max-width: 420px) {
  .gp-auth-quick .button { padding: 3px 8px; font-size: 12px; }
}

/* =====================================================================
   (E24) SỬA LỖI: hộp Đăng nhập / Đăng ký bị nội dung trang CHE MẤT.
   Nguyên nhân: modal nằm trong <header> (position:relative; z-index:1),
   còn các khối nội dung cũng có z-index:1 nhưng ĐỨNG SAU trong DOM
   -> trình duyệt vẽ nội dung ĐÈ LÊN modal (cùng cấp z-index thì cái sau thắng).
   Cách sửa: nâng riêng <header> lên trên nội dung, và cho canvas hiệu ứng
   nằm dưới header nhưng vẫn trên nội dung (không còn rơi ngang mặt form).
   ===================================================================== */
header {
  position: relative;
  z-index: 2000;
}

.modal {
  z-index: 2100;
}

/* canvas hiệu ứng Tết: trên nội dung, dưới header/modal */
#tetFall {
  z-index: 1500;
}

/* =====================================================================
   (W1) Dòng thông báo ở form Đăng nhập / Đăng ký.
   Trước đây chữ tối trên nền tối nên khó đọc. Nay: chữ sáng (trắng hoặc
   vàng nhạt #ffe9a8), IN ĐẬM, cỡ >= 15px, có viền + nền tương phản:
   lỗi = nền đỏ đậm, thành công = nền xanh đậm.
   Dùng selector #message-box để thắng các rule !important trong tet.css.
   ===================================================================== */
/* Khung bao ngoài: bỏ kiểu "hộp tối rỗng" khi không có thông báo nào */
#message-box.message {
  margin: 24px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

#message-box .message {
  background: #1d1d22 !important;
  border: 2px solid #ffe9a8 !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .55) !important;
  overflow: hidden;
}

#message-box .message-header {
  padding: 10px 14px !important;
  background: #2b2b33 !important;
  border-bottom: 2px solid rgba(255, 233, 168, .5) !important;
}

#message-box .message-header p {
  color: #ffffff !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  line-height: 1.45 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .75);
}

#message-box .message-body {
  padding: 12px 14px !important;
  border: 0 !important;
  color: #ffe9a8 !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  line-height: 1.55 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .75);
}

/* Lỗi: nền đỏ đậm */
#message-box .message.is-danger {
  background: #6f0912 !important;
  border-color: #ff8b96 !important;
}

#message-box .message.is-danger .message-header {
  background: #a81022 !important;
}

/* Thành công: nền xanh đậm */
#message-box .message.is-success {
  background: #0a3d21 !important;
  border-color: #62e39a !important;
}

#message-box .message.is-success .message-header {
  background: #0f6b38 !important;
}

/* =====================================================================
   (W6) Khung trạng thái kích hoạt tài khoản (trang thông tin cá nhân).
   Chưa kích hoạt = vàng/cam nổi bật, đã kích hoạt = xanh.
   ===================================================================== */
.notification.gp-acc-warn {
  background: #5a2b00 !important;
  border: 2px solid #ff9d2e !important;
  color: #ffd27a !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  line-height: 1.5 !important;
  padding: 14px 16px !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .45);
}

.notification.gp-acc-ok {
  background: #0d4a25 !important;
  border: 2px solid #2fbf71 !important;
  color: #b9f6cd !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  line-height: 1.5 !important;
  padding: 14px 16px !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .45);
}

/* =====================================================================
   (W3) Khối "Nhân vật trong game" ở trang thông tin cá nhân.
   ===================================================================== */
.gp-char-table {
  margin: 6px 0 0 !important;
  width: auto;
  min-width: 240px;
}

.gp-char-table caption {
  caption-side: top;
  color: #ffe9a8;
  font-weight: 700;
  font-size: 14px;
}

.gp-char-empty {
  color: #ffe9a8;
}

.gp-char-error {
  color: #ffb3bb;
  font-weight: 700;
}

/* =====================================================================
   (W4) Trang bảng xếp hạng.
   ===================================================================== */
.gp-rank-note {
  color: rgba(255, 236, 207, .9);
  margin-bottom: 14px;
}

.gp-rank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.gp-rank-box {
  min-width: 0;
}

.gp-rank-sub {
  color: rgba(255, 236, 207, .78);
  font-size: 13px;
  margin-bottom: 8px;
}

.gp-rank-table {
  font-size: 14px;
}

.gp-rank-empty {
  color: #ffe9a8;
  font-weight: 700;
}