/* style-pro.css - Updated V2 */

:root {
  /* --- GIAO DIỆN PRO GỐC (MÀU XANH ĐEN) --- */
  .nav {
    background-color: #0f172a !important; /* Xanh đen thẫm */
    border-bottom: 1px solid #334155 !important;
    color: #fff !important;
    z-index: 50;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  }

  --pro-bg: #0f172a; /* Nền chính xanh đen */
  --pro-sidebar: #161e2e; /* Sidebar xanh xám */
  --pro-card: #1e293b; /* Card màu nổi hơn chút */
  --pro-text-main: #f8fafc;
  --pro-text-sub: #94a3b8;
  --pro-primary: #3b82f6; /* Màu xanh dương chủ đạo */
  --pro-accent: #f59e0b;
  --pro-border: #334155;
}

/* Reset cơ bản */
body {
  background-color: var(--pro-bg) !important;
  background-image: none !important; /* Xóa gradient tím nếu có */
  color: var(--pro-text-main) !important;
  overflow: hidden;
}
/* Nav giữ nguyên */
./* --- LOGO CAO CẤP (Gradient Text) --- */

/* --- LOGO CHUẨN SVG & TEXT ALIGN (FIXED CENTER) --- */

.header-logo-container {
  display: flex;
  align-items: center; /* Căn giữa dọc toàn bộ cụm */
  gap: 12px; /* Khoảng cách giữa Icon và Chữ */
  height: 56px; /* Chiều cao cố định cho Header Logo */
  padding-right: 15px;
}

/* 1. Khung chứa Icon Q */
.q-icon-svg {
  width: 42px;
  height: 42px;

  /* Kỹ thuật căn giữa tuyệt đối cho SVG */
  display: flex;
  align-items: center;
  justify-content: center;

  /* Đổ bóng nhẹ */
  filter: drop-shadow(0 0 8px rgba(179, 73, 255, 0.5));
}

/* 2. Thẻ SVG bên trong */
.q-icon-svg svg {
  width: 100%;
  height: 100%;
  display: block; /* Quan trọng: Xóa khoảng trắng thừa dưới chân */
  object-fit: contain; /* Giữ tỷ lệ, không bị méo */
}

/* 3. Nhóm Chữ (Bao quanh Quiz Master + Pro) */
.logo-text-group {
  display: flex;
  align-items: center; /* Căn giữa chữ theo trục dọc */
  gap: 8px;
  height: 100%; /* Full chiều cao để căn chuẩn */
}

/* Chữ QUIZ MASTER */
.text-master {
  font-family: "Noto Sans", sans-serif;
  color: #ffffff;
  font-weight: 800;
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;

  /* Mẹo nhỏ: Nếu vẫn thấy lệch, chỉnh margin-top này */
  margin-top: 0px;
}

/* Chữ PRO */
.text-pro {
  font-family: "Noto Sans", sans-serif;
  font-weight: 900;
  font-size: 24px;
  text-transform: uppercase;
  line-height: 1;
  margin-top: 0px;

  background: linear-gradient(to bottom, #fff7cc 0%, #ffca58 45%, #b45309 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .header-logo-container {
    height: 45px;
    gap: 8px;
  }
  .q-icon-svg {
    width: 32px;
    height: 32px;
  }
  .text-master {
    font-size: 18px;
  }
  .text-pro {
    font-size: 18px;
  }
}
/* --- BỐ CỤC DASHBOARD (CHIA 2 CỘT) --- */
.dashboard-wrapper {
  display: flex;
  height: calc(100vh - 65px); /* Trừ đi chiều cao Nav */
  width: 100%;
  overflow: hidden;
}

/* 1. SIDEBAR (CỘT TRÁI) */
.sidebar-pro {
  width: 280px;
  background: var(--pro-sidebar);
  border-right: 1px solid var(--pro-border);
  display: flex;
  flex-direction: column;
  padding: 20px;
  flex-shrink: 0;
}

.sidebar-search {
  position: relative;
  margin-bottom: 20px;
}
.sidebar-search input {
  width: 100%;
  background: #0f172a;
  border: 1px solid var(--pro-border);
  padding: 10px 10px 10px 35px;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
}
.sidebar-search .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.5;
}

.sidebar-menu {
  overflow-y: auto;
  flex: 1;
}
.menu-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--pro-text-sub);
  margin-bottom: 10px;
  letter-spacing: 1px;
}
.menu-subtitle {
  font-size: 11px;
  font-weight: 700;
  color: var(--pro-text-sub);
  margin-top: 15px;
  margin-bottom: 5px;
  padding-left: 10px;
  text-transform: uppercase;
}
.menu-item {
  display: block;
  padding: 10px 12px;
  color: var(--pro-text-main);
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 4px;
  transition: background 0.2s;
  opacity: 0.8;
}
.menu-item:hover,
.menu-item.active {
  background: rgba(59, 130, 246, 0.15);
  color: var(--pro-primary);
  opacity: 1;
  font-weight: 600;
}

/* 2. MAIN CONTENT (CỘT PHẢI) */
.main-content-pro {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
  background: var(--pro-bg);
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 20px 0;
  color: var(--pro-text-main);
}

/* Lưới Card */
.grid-pro {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
}

/* --- THIẾT KẾ CARD PRO V3 (CHUẨN ẢNH MẪU) --- */

.card-pro {
  background: #151f32; /* Màu nền tối sẫm hơn chút cho nổi */
  border: 1px solid #334155;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: row;
  height: 190px; /* Tăng chiều cao xíu để thoáng */
  position: relative;
}

.card-pro:hover {
  transform: translateY(-4px);
  border-color: #f59e0b; /* Hover viền vàng */
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

/* 1. CỘT TRÁI: ẢNH */
.card-pro-img-box {
  width: 40%;
  min-width: 150px;
  max-width: 200px;
  background: #0f172a;
  position: relative;
  overflow: hidden;
}

.card-pro-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.card-pro:hover .card-pro-img-box img {
  transform: scale(1.1);
}

/* 2. CỘT PHẢI: BODY */
.card-pro-body {
  flex: 1;
  padding: 15px 18px;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Tiêu đề & Thông tin */
.card-pro-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-pro-count {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 15px;
  font-weight: 500;
}

/* KHU VỰC NÚT TO (Bắt đầu / Ôn tập) */
.card-pro-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 10px; /* Cách lề dưới để nhường chỗ cho nút sửa xóa */
}

/* --- NÚT BẮT ĐẦU: STYLE GRAFFITI GOLD (DÙNG CHO CẢ PC & MOBILE) --- */
.btn-pro-start {
  flex: 1.5; /* Giữ tỷ lệ layout */

  /* 1. Hình dáng viên thuốc */
  display: inline-block;
  padding: 12px 0;
  border-radius: 50px;
  border: none;
  cursor: pointer !important;

  /* 2. Màu Gradient Vàng Đồng (Graffiti) */
  background: linear-gradient(90deg, #ffdb7e 0%, #c89b4d 100%);

  /* 3. Chữ Nâu Đậm Sang Trọng */
  color: #3b2d18;
  font-family: sans-serif;
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;

  /* 4. Hiệu ứng bóng đổ (Glow) */
  box-shadow: 0 4px 15px rgba(255, 200, 80, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

/* Hiệu ứng khi di chuột (Sáng lên + Nảy nhẹ) */
.btn-pro-start:hover {
  background: linear-gradient(90deg, #ffe59a 0%, #d4a859 100%);
  box-shadow: 0 6px 20px rgba(255, 200, 80, 0.5);
  transform: translateY(-2px);
}

/* Hiệu ứng khi bấm (Lún xuống) */
.btn-pro-start:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(255, 200, 80, 0.4);
}
/* Nút ÔN TẬP (Style tối) */
.btn-pro-review {
  flex: 1;
  background: transparent;
  border: 2px solid #475569;
  border-radius: 30px;
  color: #cbd5e1;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  text-transform: uppercase;
  transition: 0.2s;
}
.btn-pro-review:hover {
  border-color: #fbbf24;
  color: #fff;
  background: rgba(251, 191, 36, 0.1);
}

/* THANH CÔNG CỤ DƯỚI CÙNG (Chỉnh sửa / Xóa) */
.card-pro-footer {
  margin-top: auto; /* Đẩy xuống đáy cùng */
  padding-top: 10px;
  border-top: 1px dashed #334155;
  display: flex;
  justify-content: flex-end; /* Căn phải giống ảnh */
  gap: 15px;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: 0.2s;
  text-transform: uppercase;
}
.footer-link:hover {
  color: #fff;
}
.footer-link.del:hover {
  color: #ef4444;
}

/* Mobile */
@media (max-width: 600px) {
  .card-pro {
    flex-direction: column;
    height: auto;
  }
  .card-pro-img-box {
    width: 100%;
    height: 140px;
    max-width: none;
  }
}
/* --- FIX MOBILE: BỎ GHIM HEADER & CHO PHÉP CUỘN TỰ NHIÊN --- */
@media (max-width: 768px) {
  /* 1. Cho phép trang web cuộn tự nhiên (không bị khóa scroll) */
  body {
    overflow: auto !important;
    height: auto !important;
  }

  /* 2. Bỏ ghim thanh Nav (Header) */
  .nav {
    position: static !important; /* Quan trọng: static giúp nó trôi đi khi cuộn */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  /* 3. Phá vỡ bố cục Dashboard cố định chiều cao */
  .dashboard-wrapper {
    height: auto !important; /* Chiều cao tự do theo nội dung */
    display: block !important; /* Bỏ Flexbox để các phần tử xếp chồng lên nhau */
    overflow: visible !important;
  }

  /* 4. Sidebar (đang ẩn) và Main Content */
  .sidebar-pro {
    display: none !important; /* Ẩn sidebar trên mobile (hoặc có thể làm nút hamburger sau) */
  }

  .main-content-pro {
    height: auto !important;
    overflow: visible !important; /* Cho phép nội dung tràn ra để body cuộn */
    padding: 15px 10px !important; /* Căn lề nhỏ lại cho gọn */
  }

  /* 5. Tối ưu hiển thị các nút trên Header mobile */
  .nav .controls {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 8px !important;
  }
}
/* --- MOBILE RESPONSIVE: ÉP VỀ DẠNG NGANG NHỎ GỌN --- */
@media (max-width: 768px) {
  /* 1. Ép thẻ Card nằm ngang (Row) thay vì dọc */
  .card-pro {
    flex-direction: row !important;
    height: 135px !important; /* Chiều cao cố định nhỏ gọn */
    align-items: stretch;
  }

  /* 2. Chỉnh lại khung ảnh bên trái nhỏ lại */
  .card-pro-img-box {
    width: 120px !important; /* Cố định chiều rộng ảnh */
    min-width: 120px !important;
    height: 100% !important; /* Full chiều cao thẻ */
    max-width: none !important;
  }

  /* 3. Chỉnh phần nội dung bên phải */
  .card-pro-body {
    padding: 10px 12px !important; /* Giảm lề đệm */
    width: calc(100% - 120px); /* Chiếm phần còn lại */
  }

  /* 4. Giảm cỡ chữ tiêu đề */
  .card-pro-title {
    font-size: 15px !important; /* Chữ nhỏ hơn */
    line-height: 1.2 !important;
    margin-bottom: 2px !important;
    -webkit-line-clamp: 2 !important; /* Tối đa 2 dòng */
  }

  .card-pro-count {
    font-size: 11px !important;
    margin-bottom: 6px !important;
  }

  /* 5. Chỉnh nút bấm nhỏ lại */
  .card-pro-actions {
    gap: 6px !important;
    margin-bottom: 0 !important;
  }

  /* --- NÚT BẮT ĐẦU: PHỐI MÀU GRADIENT VÀNG ĐỒNG (THEO YÊU CẦU) --- */
  .btn-pro-start {
    flex: 1.5; /* Giữ tỷ lệ layout */

    /* 1. HÌNH DÁNG */
    display: inline-block;
    padding: 12px 0; /* Tăng độ dày nút lên xíu cho đẹp */
    border-radius: 50px; /* Bo tròn viên thuốc */
    border: none;
    cursor: pointer !important;

    /* 2. MÀU GRADIENT (Vàng Sáng -> Vàng Đồng) */
    background: linear-gradient(90deg, #ffdb7e 0%, #c89b4d 100%);

    /* 3. CHỮ (TYPOGRAPHY) */
    color: #3b2d18; /* Nâu đen đậm sang trọng */
    font-family: sans-serif;
    font-weight: 800; /* Đậm hơn chút cho rõ */
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;

    /* 4. HIỆU ỨNG (LIGHTING) */
    box-shadow: 0 4px 15px rgba(255, 200, 80, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  }

  /* Hiệu ứng Hover (Sáng lên + Nảy nhẹ) */
  .btn-pro-start:hover {
    background: linear-gradient(90deg, #ffe59a 0%, #d4a859 100%);
    box-shadow: 0 6px 20px rgba(255, 200, 80, 0.5);
    transform: translateY(-2px);
  }

  /* Hiệu ứng Active (Bấm xuống) */
  .btn-pro-start:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(255, 200, 80, 0.4);
  }
}
/* --- CSS CHO MENU ĐA CẤP (ACCORDION) --- */

/* Tiêu đề nhóm cha (Toán học, Hóa học...) */
.menu-parent {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 10px;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 6px;
  transition: 0.2s;
}

.menu-parent:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

/* Mũi tên xoay */
.menu-arrow {
  font-size: 10px;
  transition: transform 0.3s ease;
  transform: rotate(-90deg); /* Mặc định quay ngang (đóng) */
}

/* Khi có class .open thì xoay xuống */
.menu-parent.open .menu-arrow {
  transform: rotate(0deg);
  color: #f59e0b; /* Mũi tên sáng màu vàng khi mở */
}

/* Khung chứa các mục con */
.menu-children {
  padding-left: 10px; /* Thụt vào trong */
  border-left: 1px solid #334155; /* Đường kẻ chỉ dẫn dọc */
  margin-left: 15px;
  margin-bottom: 10px;
}

/* Mục con (Đạo hàm, Nguyên hàm...) */
.menu-item.sub-item {
  font-size: 13px;
  padding: 8px 12px;
  color: #cbd5e1;
}

.menu-item.sub-item:hover,
.menu-item.sub-item.active {
  color: #fff;
  background: rgba(59, 130, 246, 0.2);
  border-radius: 6px;
}
/* --- MOBILE RESPONSIVE: FIX ẢNH FULL & NÚT BẤM TO --- */
@media (max-width: 768px) {
  /* 1. Ép thẻ ngang, chiều cao tự động theo nội dung */
  .card-pro {
    flex-direction: row !important;
    height: auto !important; /* Để tự dãn theo nội dung */
    min-height: 140px;
    align-items: stretch !important; /* Kéo giãn các phần tử con bằng nhau */
  }

  /* 2. Fix Ảnh: Luôn full chiều cao thẻ */
  .card-pro-img-box {
    width: 120px !important;
    min-width: 120px !important;
    height: auto !important; /* Để nó tự stretch theo cha */
    align-self: stretch !important; /* Kéo dài từ đầu đến chân */
  }
  .card-pro-img-box img {
    height: 100% !important;
    object-fit: cover !important;
    position: absolute; /* Ghim chặt vào khung */
    top: 0;
    left: 0;
  }

  /* 3. Body & Text */
  .card-pro-body {
    padding: 10px 12px !important;
    width: calc(100% - 120px);
    display: flex;
    flex-direction: column;
  }
  .card-pro-title {
    font-size: 15px !important;
    line-height: 1.2 !important;
    margin-bottom: 4px !important;
  }
  .card-pro-count {
    font-size: 11px !important;
    margin-bottom: 8px !important;
  }

  /* 4. Nút Bắt đầu / Ôn tập (Giữ nguyên nhưng gọn hơn) */
  .card-pro-actions {
    gap: 8px !important;
    margin-bottom: 10px !important;
  }
  .btn-pro-start {
    padding: 8px 0 !important;
    font-size: 11px !important;
  }
  .btn-pro-review {
    padding: 8px 0 !important;
    font-size: 11px !important;
  }

  /* 5. FIX NÚT SỬA/XÓA: To lên, có nền để dễ bấm */
  .card-pro-footer {
    padding-top: 8px !important;
    margin-top: auto !important;
    justify-content: space-between !important; /* Dàn đều ra 2 bên */
    gap: 10px !important;
  }

  .footer-link {
    flex: 1; /* Mỗi nút chiếm 1 nửa */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 0 !important; /* Tăng vùng bấm */
    background: rgba(255, 255, 255, 0.1); /* Nền xám nhẹ */
    border-radius: 6px;
    font-size: 11px !important;
    color: #cbd5e1 !important;
    font-weight: 700 !important;
  }
  /* Màu riêng cho nút Xóa để cảnh báo */
  .footer-link.del {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5 !important;
  }
}
/* --- MOBILE FIX FINAL (LOGO NGANG - MENU DƯỚI) --- */
@media (max-width: 768px) {
  body {
    overflow: auto !important;
  }

  /* 1. Chia Header thành 2 dòng */
  .nav {
    flex-direction: column !important; /* Xếp dọc */
    padding: 10px !important;
    height: auto !important;
    gap: 10px !important;
  }

  /* 2. Dòng 1: Logo (Căn giữa, NẰM NGANG) */
  .brand {
    width: 100%;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
  }

  /* Ép Logo và Chữ nằm ngang thẳng hàng */
  .header-logo-container {
    display: flex !important;
    flex-direction: row !important; /* BẮT BUỘC NGANG */
    align-items: center !important;
    height: 40px !important;
    width: auto !important;
  }

  /* Thu nhỏ logo lại kẻo vỡ layout */
  .q-icon-svg {
    width: 35px !important;
    height: 35px !important;
  }
  .text-master {
    font-size: 18px !important;
  }
  .text-pro {
    font-size: 18px !important;
  }

  /* 3. Dòng 2: Thanh công cụ (Nút 3 gạch bên trái) */
  .controls {
    width: 100%;
    display: flex !important;
    flex-wrap: wrap;
    justify-content: space-between; /* 3 gạch trái, nút khác phải */
    align-items: center;
  }

  /* Style nút 3 gạch (Vuông) */
  .mobile-menu-trigger {
    display: flex !important;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 24px;
    color: #fff;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    order: -1; /* Đẩy lên đầu hàng controls */
  }

  /* Ẩn sidebar đi để chờ bấm nút */
  .sidebar-pro {
    position: fixed;
    left: -100%;
    top: 0;
    bottom: 0;
    z-index: 1000;
    transition: 0.3s;
  }
  .sidebar-pro.active {
    left: 0;
  }
}
/* Ẩn bớt nút ít dùng nếu quá chật (VD: Xuất mẫu) */
/* #btnExportTemplate { display: none; } */

/* --- CARD GIAO DIỆN MOBILE (Giữ nguyên đẹp) --- */
.dashboard-wrapper {
  display: block !important;
  height: auto !important;
}
.sidebar-pro {
  display: none;
}
.main-content-pro {
  padding: 10px;
}

.card-pro {
  flex-direction: row !important;
  height: auto !important;
  min-height: 130px;
  align-items: stretch;
}
.card-pro-img-box {
  width: 110px !important;
  min-width: 110px !important;
  height: auto !important;
  align-self: stretch !important;
}
.card-pro-img-box img {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
}
.card-pro-body {
  padding: 10px !important;
  width: calc(100% - 110px);
}
.card-pro-title {
  font-size: 14px !important;
  margin-bottom: 2px;
}
.card-pro-count {
  font-size: 11px !important;
  margin-bottom: 6px;
}

/* Nút trong card nhỏ lại */
.btn-pro-start {
  padding: 6px 0 !important;
  font-size: 11px !important;
}
.btn-pro-review {
  padding: 6px 0 !important;
  font-size: 10px !important;
}

.card-pro-footer {
  padding-top: 6px;
  margin-top: auto;
  justify-content: space-between;
  gap: 8px;
}
.footer-link {
  font-size: 10px !important;
  padding: 6px 0 !important;
  flex: 1;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

/* ======================================================
   NÂNG CẤP NÚT HEADER (STYLE NEON DARK)
   ====================================================== */

/* 1. Cấu hình chung cho hàng nút */
.nav .controls {
  gap: 10px;
  align-items: center;
}

/* 2. Style chung cho các nút (Xuất mẫu, Hướng dẫn, Thêm Quiz, Nạp Coin) */
/* --- FIX LỖI NÚT BỊ TRẮNG (Dán đè vào style-pro.css) --- */
.nav .btn-outline {
  background-color: rgba(15, 23, 42, 0.8) !important; /* Màu tối thẫm (0.8) */
  border: 2px solid #3b82f6 !important; /* Viền xanh neon */
  color: #fff !important; /* Chữ trắng */
  font-weight: 700 !important;
  border-radius: 10px !important;
  padding: 8px 16px !important;
  transition: all 0.2s ease;
}

/* Hiệu ứng khi di chuột vào */
.nav .btn-outline:hover {
  background-color: #3b82f6 !important; /* Nền xanh sáng lên */
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.6); /* Phát sáng */
  transform: translateY(-2px);
}
/* 3. Riêng nút GACHA (Màu Cam) */
.nav .btn-gacha-trigger {
  border-color: #f59e0b !important; /* Viền Cam */
  color: #f59e0b !important; /* Chữ Cam */
  background-color: rgba(245, 158, 11, 0.1) !important;
}

.nav .btn-gacha-trigger:hover {
  background-color: #f59e0b !important; /* Nền Cam khi hover */
  color: #fff !important;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.6); /* Phát sáng cam */
}

/* 4. Nút Cài đặt (Bánh răng) */
/* 5. Thẻ hiển thị Coin (Màu đen chữ vàng) */
.chip {
  background-color: #000000 !important;
  border: 1px solid #334155 !important;
  color: #fff !important;
  font-weight: 800;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}
.chip .coinIcon {
  filter: drop-shadow(0 0 2px #facc15); /* Icon tiền phát sáng */
}
#coinNum {
  color: #facc15 !important; /* Số tiền màu vàng */
}

/* 6. Thẻ Hint (Màu xanh lá - Nếu có) */
/* Nếu bạn có class riêng cho hint thì thêm vào đây, vd: .hint-chip */
/* ======================================================
   FIX FINAL: KHÔI PHỤC SIDEBAR PC & MENU MOBILE
   (Dán vào cuối file style-pro.css)
   ====================================================== */

/* 1. CHẾ ĐỘ MÁY TÍNH (Màn hình to > 768px) */
@media (min-width: 769px) {
  .sidebar-pro {
    display: flex !important; /* Bắt buộc hiện */
    position: static !important; /* Vị trí bình thường bên trái */
    width: 280px !important; /* Chiều rộng cố định */
    left: auto !important;
    transform: none !important;
    z-index: 1 !important;
    border-right: 1px solid #334155;
  }

  .mobile-menu-trigger {
    display: none !important; /* Ẩn nút 3 gạch trên PC */
  }

  .mobile-overlay {
    display: none !important; /* Ẩn lớp nền đen */
  }
}

/* 2. CHẾ ĐỘ ĐIỆN THOẠI (Màn hình nhỏ <= 768px) */
@media (max-width: 768px) {
  /* Hiện nút 3 gạch */
  .mobile-menu-trigger {
    display: flex !important;
    z-index: 200 !important;
  }

  /* Sidebar: Mặc định ẩn sang trái, nhưng phải là display FLEX */
  .sidebar-pro {
    display: flex !important; /* QUAN TRỌNG: Không được none */
    flex-direction: column !important;
    position: fixed !important; /* Trôi nổi */
    top: 0;
    bottom: 0;
    left: -100% !important; /* Đẩy khuất sang trái */
    width: 280px !important;
    background: #161e2e !important; /* Màu nền Sidebar */
    z-index: 10000 !important; /* Nằm trên tất cả */
    transition: left 0.3s ease !important; /* Trượt mượt */
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
  }

  /* Khi bấm nút -> Thêm class active -> Trượt ra */
  .sidebar-pro.active {
    left: 0 !important;
  }

  /* Lớp nền tối đằng sau */
  .mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999 !important;
    backdrop-filter: blur(2px);
  }
  .mobile-overlay.active {
    display: block !important;
  }
}
/* =================================================================
   MASTER FIX: CẤU HÌNH CHUẨN CHO CẢ PC VÀ MOBILE
   (Dán đè đoạn này vào cuối cùng file style-pro.css)
   ================================================================= */

/* ---------------------------------------------------------
   1. GIAO DIỆN MÁY TÍNH (Màn hình > 768px) - KHÔI PHỤC ẢNH 2
   --------------------------------------------------------- */
@media (min-width: 769px) {
  /* Ẩn nút 3 gạch và lớp đen trên PC */
  .mobile-menu-trigger,
  .mobile-overlay {
    display: none !important;
  }

  /* Header nằm ngang */
  .nav {
    flex-direction: row !important;
    height: 65px !important;
    padding: 0 20px !important;
  }

  /* Logo nằm bên trái gọn gàng */
  .brand {
    width: auto !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    justify-content: flex-start !important;
  }

  /* Sidebar hiện cố định bên trái */
  .sidebar-pro {
    display: flex !important;
    position: static !important; /* Không trôi nổi */
    width: 280px !important;
    height: calc(100vh - 65px) !important;
    transform: none !important;
    left: auto !important;
    z-index: 1 !important;
    border-right: 1px solid #334155;
    background: var(--pro-sidebar) !important;
    box-shadow: none !important;
  }

  /* Khung bao chính chia cột (Sidebar - Nội dung) */
  .dashboard-wrapper {
    display: flex !important;
    flex-direction: row !important;
    height: calc(100vh - 65px) !important;
    overflow: hidden !important;
  }

  .main-content-pro {
    flex: 1 !important;
    height: 100% !important;
    overflow-y: auto !important;
  }
}

/* ---------------------------------------------------------
   2. GIAO DIỆN ĐIỆN THOẠI (Màn hình <= 768px) - GIỮ NGUYÊN ĐẸP
   --------------------------------------------------------- */
@media (max-width: 768px) {
  /* Hiện nút 3 gạch */
  .mobile-menu-trigger {
    display: flex !important;
  }

  /* Header xếp dọc (Logo trên, Nút dưới) */
  .nav {
    flex-direction: column !important;
    height: auto !important;
    gap: 10px !important;
  }

  .brand {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Sidebar trôi nổi (Mặc định ẩn sang trái) */
  .sidebar-pro {
    position: fixed !important;
    left: -100% !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 280px !important;
    height: 100vh !important;
    z-index: 20000 !important;
    transition: left 0.3s ease !important;
    background-color: #0f172a !important;
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.5) !important;
  }

  /* Khi bấm mở -> Trượt ra */
  .sidebar-pro.active {
    left: 0 !important;
  }

  /* Lớp đen mờ */
  .mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 19999 !important;
    background: rgba(0, 0, 0, 0.7);
  }
  .mobile-overlay.active {
    display: block !important;
  }
}
/* === FLOATING BELL (CHUÔNG THÔNG BÁO XỊN) === */
#floatingBell {
  position: fixed;
  bottom: 30px;
  right: 30px; /* Góc phải dưới */
  z-index: 9000;
}

/* Nút chuông tròn */
.bell-icon {
  width: 60px;
  height: 60px;
  background: #1e293b;
  border: 2px solid #3b82f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s;
}
.bell-icon:hover {
  transform: scale(1.1);
  background: #334155;
}

/* Chấm đỏ đếm số */
.bell-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ef4444;
  color: white;
  font-weight: 800;
  font-size: 12px;
  height: 24px;
  min-width: 24px;
  padding: 0 6px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  pointer-events: none;
}
/* Hiệu ứng rung */
@keyframes bellPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}
.bell-badge.pulse {
  animation: bellPulse 2s infinite;
}

/* Menu xổ lên (Dropdown) */
.bell-menu {
  position: absolute;
  bottom: 75px;
  right: 0;
  width: 300px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  padding: 10px 0;
  display: none; /* Mặc định ẩn */
  border: 1px solid #e2e8f0;
  max-height: 400px;
  overflow-y: auto;
}
.bell-menu.show {
  display: block;
  animation: slideUp 0.2s ease-out;
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Item trong menu */
.bell-header {
  padding: 8px 15px;
  font-size: 12px;
  font-weight: 800;
  color: #94a3b8;
  border-bottom: 1px solid #f1f5f9;
}
.bell-item {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  border-bottom: 1px solid #f8fafc;
  transition: background 0.2s;
}
.bell-item:hover {
  background: #f1f5f9;
}
.bell-info {
  flex: 1;
  cursor: pointer;
}
.bell-title {
  font-weight: 700;
  font-size: 14px;
  color: #0f172a;
}
.bell-desc {
  font-size: 12px;
  color: #ef4444;
}
.bell-mute-btn {
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.3;
  padding: 5px;
}
.bell-mute-btn:hover {
  opacity: 1;
  transform: scale(1.2);
}
.bell-empty {
  padding: 20px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

/* Mobile: Cho chuông nhỏ lại xíu */
@media (max-width: 480px) {
  #floatingBell {
    bottom: 20px;
    right: 20px;
  }
  .bell-icon {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
}
/* === BELL DROPDOWN (Menu Thông Báo trên Header) === */
.bell-dropdown-menu {
  display: none; /* Mặc định ẩn */
  position: absolute;
  top: 120%; /* Nằm ngay dưới nút */
  right: 0;
  width: 320px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid #e2e8f0;
  z-index: 10000;
  overflow: hidden;
  cursor: default; /* Trả lại con trỏ chuột bình thường trong menu */
  animation: fadeInDown 0.2s ease-out;
}

/* Khi có class 'show' thì hiện lên */
.bell-dropdown-menu.show {
  display: block;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Giao diện bên trong Menu */
.bell-header {
  background: #f8fafc;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 800;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bell-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.2s;
  cursor: pointer;
  color: #334155;
}
.bell-item:hover {
  background: #f0f9ff; /* Xanh nhạt khi di chuột */
}
.bell-item:last-child {
  border-bottom: none;
}

.bell-info {
  flex: 1;
}
.bell-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
  color: #0f172a;
}
.bell-desc {
  font-size: 12px;
  color: #ef4444; /* Màu đỏ cho số câu cần ôn */
}
.bell-desc b {
  font-weight: 900;
  font-size: 13px;
}

/* Nút tắt tiếng nhỏ bên cạnh */
.bell-mute-btn {
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #94a3b8;
  transition: all 0.2s;
}
.bell-mute-btn:hover {
  background: #fee2e2;
  color: #ef4444;
  border-color: #fecaca;
}

.bell-empty {
  padding: 30px 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
  font-style: italic;
}
/* ======================================================
   FIX LỖI SCROLL (CUỘN TRANG) TRÊN MÁY TÍNH
   ====================================================== */

/* 1. Cấu hình gốc cho toàn trang (Desktop) */
html,
body {
  height: 100%; /* Bắt buộc để tính toán chiều cao */
  margin: 0;
  padding: 0;
}

/* 2. Riêng cho MÁY TÍNH (Màn hình to > 768px) */
@media (min-width: 769px) {
  /* Khóa cuộn của body để không bị 2 thanh cuộn chồng nhau */
  body {
    overflow: hidden !important;
  }

  /* Khung bao chính: Chiếm hết chiều cao còn lại sau khi trừ Header (65px) */
  .dashboard-wrapper {
    height: calc(100vh - 65px) !important;
    overflow: hidden !important; /* Khóa cuộn của khung bao */
    display: flex !important;
  }

  /* Sidebar: Cuộn riêng nếu menu quá dài */
  .sidebar-pro {
    height: 100% !important;
    overflow-y: auto !important;
  }

  /* NỘI DUNG CHÍNH: ĐÂY LÀ CHỖ CẦN FIX */
  .main-content-pro {
    flex: 1 !important;
    height: 100% !important; /* Chiếm toàn bộ chiều cao của cha */

    /* Kích hoạt thanh cuộn dọc */
    overflow-y: auto !important;
    overflow-x: hidden !important;

    /* Thêm khoảng trống dưới cùng để không bị che mất nội dung */
    padding-bottom: 100px !important;
  }

  /* Tùy chỉnh thanh cuộn cho đẹp (Chrome/Safari/Edge) */
  .main-content-pro::-webkit-scrollbar,
  .sidebar-pro::-webkit-scrollbar {
    width: 8px;
  }
  .main-content-pro::-webkit-scrollbar-track,
  .sidebar-pro::-webkit-scrollbar-track {
    background: #0f172a;
  }
  .main-content-pro::-webkit-scrollbar-thumb,
  .sidebar-pro::-webkit-scrollbar-thumb {
    background-color: #334155;
    border-radius: 4px;
  }
  .main-content-pro::-webkit-scrollbar-thumb:hover {
    background-color: #475569;
  }
}

/* 3. Đảm bảo MOBILE vẫn cuộn bình thường (Giữ nguyên logic cũ) */
@media (max-width: 768px) {
  html,
  body {
    overflow: auto !important;
    height: auto !important;
  }
  .dashboard-wrapper {
    height: auto !important;
    overflow: visible !important;
  }
  .main-content-pro {
    height: auto !important;
    overflow: visible !important;
  }
}
/* ======================================================
   FIX LỖI KHÔNG TRƯỢT ĐƯỢC TRONG BÀI QUIZ (PC)
   ====================================================== */
@media (min-width: 769px) {
  /* Chỉ áp dụng khi đang ở màn hình Quiz (#quiz.active) */
  #quiz {
    /* Tính chiều cao còn lại sau khi trừ thanh Header (65px) */
    height: calc(100vh - 65px) !important;

    /* Cho phép cuộn dọc */
    overflow-y: auto !important;
    overflow-x: hidden !important;

    /* Đảm bảo nội dung không bị dính sát lề */
    display: block;
    position: relative;
  }

  /* Tùy chỉnh thanh cuộn cho đẹp (giống Dashboard) */
  #quiz::-webkit-scrollbar {
    width: 8px;
  }
  #quiz::-webkit-scrollbar-track {
    background: #0f172a;
  }
  #quiz::-webkit-scrollbar-thumb {
    background-color: #334155;
    border-radius: 4px;
  }
  #quiz::-webkit-scrollbar-thumb:hover {
    background-color: #475569;
  }

  /* Thêm khoảng trống dưới cùng để không bị che nút nộp bài */
  #quiz .container {
    padding-bottom: 120px !important;
  }
}
/* === FIX CUỘN TRANG PC & HIỂN THỊ ĐIỂM SRS === */

/* 1. Mở khóa cuộn cho máy tính (Để thanh Header trôi đi khi cuộn) */
@media (min-width: 769px) {
  body {
    overflow: auto !important; /* Cho phép body cuộn */
    height: auto !important;
  }
  .dashboard-wrapper {
    height: auto !important;
    overflow: visible !important;
    display: block !important; /* Bỏ flex để nội dung tự chảy */
  }
  .sidebar-pro {
    position: fixed !important; /* Sidebar đứng yên bên trái */
    height: 100vh !important;
    top: 65px; /* Né thanh header */
    left: 0;
    bottom: 0;
  }
  .main-content-pro {
    margin-left: 280px; /* Né sidebar */
    height: auto !important;
    overflow: visible !important;
  }
  #quiz {
    height: auto !important; /* Quiz tự dãn theo nội dung */
    overflow: visible !important;
  }
}

/* =========================
   FIX: mastery-badge không đè nội dung
   Thay absolute -> relative/flow để badge nằm dưới/ra ngoài vùng câu hỏi
   ========================= */
.mastery-badge {
  /* Không absolute nữa, cho vào flow bình thường */
  position: relative !important;
  top: auto !important;
  right: auto !important;
  margin-top: 10px !important;
  margin-left: 0 !important;
  align-self: flex-start !important;

  /* Kiểu dáng gọn, không chiếm quá nhiều không gian */
  background: rgba(
    15,
    23,
    42,
    0.85
  ) !important; /* slightly darker for contrast */
  color: #fbbf24 !important;
  padding: 4px 10px !important;
  border-radius: 20px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  border: 1px solid rgba(251, 191, 36, 0.25) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  z-index: 2 !important;
  pointer-events: none !important;
  display: inline-block !important;
  width: auto !important;
}

/* Nếu container dùng flex column: đảm bảo badge nằm trên 1 dòng riêng */
.mcq-question-header,
#mcqQuestionHeader,
.question-meta {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  align-items: flex-start !important;
}

/* Tăng padding top của khối câu hỏi để tránh chạm mép trên */
#mcqQuestion {
  padding-top: 8px !important;
}

/* Mobile: giảm kích thước badge cho vừa */
@media (max-width: 480px) {
  .mastery-badge {
    font-size: 11px !important;
    padding: 3px 8px !important;
    border-radius: 16px !important;
  }
}
#mcqQuestion {
  position: relative;
  text-align: center;
}
.badge-row {
  margin-bottom: 6px;
}
.mastery-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 16px;
}
#mcqQuestion .question-text {
  display: block;
  font-size: 22px;
  line-height: 1.6;
}
/* Fix notifyPanel hiện đúng góc phải */
#notifyPanel,
.notify-panel {
  position: fixed !important;
  top: 70px !important;
  right: 12px !important;
  left: auto !important;
  transform: none !important;
  z-index: 9999 !important;
}
/* ===== BELL DROPDOWN: Mobile modal center (override cuối file) ===== */
@media (max-width: 768px) {
  /* Khi cần hiển thị modal, chúng ta thêm class .mobile-modal trên .bell-dropdown-menu */
  .bell-dropdown-menu.mobile-modal {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 85vw !important;
    max-width: 350px !important;
    max-height: 70vh !important;
    overflow: auto !important;
    border-radius: 16px !important;
    background: #fff !important; /* menu nền sáng (theo design hiện tại) */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    z-index: 22000 !important; /* đủ cao để nằm trên header / sidebar */
  }

  /* Ẩn tam giác mũi tên nếu có */
  .bell-dropdown-menu.mobile-modal::before {
    display: none !important;
  }

  /* Lớp backdrop tối nền (insert DOM .bell-modal-backdrop) */
  .bell-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 21000;
    backdrop-filter: blur(2px);
  }

  /* Tối ưu padding / chiều cao cho nội dung bên trong */
  .bell-dropdown-menu.mobile-modal .bell-header,
  .bell-dropdown-menu.mobile-modal .bell-item,
  .bell-dropdown-menu.mobile-modal .bell-empty {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  /* Khi modal hiện, ẩn scrollbar native trên body (JS set body overflow) */
  body.bell-modal-open {
    touch-action: none; /* tránh kéo nền trên mobile */
    overflow: hidden !important;
    height: 100% !important;
  }
}
/* =================================================================
   TÍNH NĂNG TỪ BẢN 2: MODAL THÔNG BÁO CĂN GIỮA (ĐẸP & KHÔNG LỖI CUỘN)
   (Dán vào cuối file style-pro.css)
   ================================================================= */

/* 1. Lớp nền đen mờ đằng sau */
.bell-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7); /* Màu đen mờ */
  z-index: 20000 !important; /* Cao hơn sidebar */
  backdrop-filter: blur(3px); /* Làm mờ nền web */
}
.bell-backdrop.active {
  display: block !important;
}

/* 2. Khung Modal Thông Báo (Căn giữa tuyệt đối) */
#globalBellModal {
  display: none; /* Mặc định ẩn */
  flex-direction: column !important;

  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(
    -50%,
    -50%
  ) !important; /* Công thức căn giữa thần thánh */

  width: 90% !important;
  max-width: 400px !important;
  max-height: 70vh !important; /* Không cao quá màn hình */

  background: #fff !important;
  border-radius: 16px !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
  z-index: 20001 !important; /* Cao hơn nền đen */
  overflow: hidden !important;
  animation: bellPop 0.2s ease-out;
}
#globalBellModal.active {
  display: flex !important;
}

/* 3. Header của Modal */
#globalBellModal .bell-header {
  flex-shrink: 0 !important;
  background: #f8fafc !important;
  padding: 16px !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  text-align: center !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #334155 !important;
  text-transform: uppercase;
}

/* 4. Danh sách thông báo (Cuộn riêng bên trong modal) */
#globalBellModal .bell-list {
  flex: 1 1 auto !important;
  overflow-y: auto !important; /* Chỉ cuộn trong khung này */
  min-height: 0 !important;
  padding: 0 !important;
  background: #fff !important;
}

/* Style từng dòng thông báo */
#globalBellModal .bell-item {
  padding: 15px 20px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  cursor: pointer;
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  color: #333 !important;
  transition: background 0.2s;
}
#globalBellModal .bell-item:hover {
  background-color: #f1f5f9 !important;
}

/* Thanh cuộn nhỏ đẹp cho modal */
#globalBellModal .bell-list::-webkit-scrollbar {
  width: 5px;
}
#globalBellModal .bell-list::-webkit-scrollbar-track {
  background: transparent;
}
#globalBellModal .bell-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

/* Hiệu ứng hiện ra */
@keyframes bellPop {
  from {
    opacity: 0;
    transform: translate(-50%, -45%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}
/* ======================================================
   NÂNG CẤP MODAL KẾT QUẢ (SRS CHART + LAYOUT MỚI)
   ====================================================== */

/* 1. Chia đôi Điểm số (Trái) và Thời gian (Phải) */
.result-stats-box {
  display: flex !important;
  justify-content: space-between;
  gap: 15px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 48%; /* Chia đều */
  border-bottom: none !important; /* Bỏ gạch chân cũ */
  padding: 5px !important;
}

.result-stat .label {
  font-size: 13px;
  text-transform: uppercase;
  opacity: 0.8;
  letter-spacing: 1px;
}

.result-stat .value {
  font-size: 28px !important; /* To hơn */
  font-weight: 900;
  margin-top: 5px;
}

/* 2. Biểu đồ Cột SRS */
/* ======================================================
   BIỂU ĐỒ SRS DẠNG CỘT (HISTOGRAM) - FINAL FIX
   ====================================================== */

.srs-chart-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  height: 150px; /* Chiều cao tổng */
  margin-bottom: 25px;
  padding: 10px 5px;
  background: rgba(0, 0, 0, 0.2); /* Nền tối nhẹ cho khu vực biểu đồ */
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.chart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 18%;
  height: 100%;
  position: relative;
  transition: opacity 0.3s;
}

/* Làm mờ các cột không có câu hỏi nào */
.chart-col.dimmed {
  opacity: 0.3;
}

/* Số lượng câu hỏi (Hiện trên đỉnh cột) */
.col-count {
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 4px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Đường ray của cột (Track) */
.bar-track {
  width: 100%;
  height: 80px; /* Chiều cao tối đa của cột */
  display: flex;
  align-items: flex-end; /* Cột mọc từ dưới lên */
  justify-content: center;
  /* border-bottom: 1px solid rgba(255,255,255,0.1); kẻ chân mờ */
}

/* Cột màu thực tế (Fill) */
.bar-fill {
  width: 12px; /* Độ dày cột */
  border-radius: 4px 4px 0 0;
  transition: height 0.8s cubic-bezier(0.34, 1.56, 0.64, 1); /* Hiệu ứng mọc lên */
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

/* Nhãn điểm (0-20) */
.col-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 6px;
  font-weight: 700;
}

/* Nhãn thời gian (1 phút) */
.col-time {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}
/* --- NÚT ? GÓC PHẢI --- */
.gacha-info-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #94a3b8;
  font-weight: bold;
  font-family: monospace;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s;
  z-index: 10;
}
.gacha-info-btn:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}

/* --- BẢNG TỶ LỆ (OVERLAY) --- */
.gacha-rates-overlay {
  position: absolute;
  inset: 0; /* Phủ kín toàn bộ gacha-box */
  background: rgba(24, 24, 27, 0.98); /* Màu nền đen mờ che nội dung dưới */
  border-radius: 24px; /* Bo góc trùng với box */
  z-index: 20;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 30px;
}

.rates-list {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  text-align: left;
  font-size: 14px;
  color: #d4d4d8;
  font-family: "Noto Sans", sans-serif;
}

.rates-list li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed #3f3f46;
}
.rates-list li:last-child {
  border-bottom: none;
}

.rates-list li b {
  color: #fff;
}
.rates-list li.rare b {
  color: #facc15;
  text-shadow: 0 0 5px #facc15;
} /* 100 coin sáng rực */
.rates-list li.high b {
  color: #4ade80;
} /* Lãi to màu xanh */
.rates-list li.bad {
  color: #ef4444;
} /* 0 coin màu đỏ */
.rates-list li.high b {
  color: #4ade80;
} /* Lãi to (10, 5) màu xanh sáng */

/* THÊM DÒNG NÀY ĐỂ CÁC MỨC GIỮA CŨNG CÓ MÀU XANH LÁ */
.rates-list li:not(.rare):not(.high):not(.bad) b {
  color: #86efac;
}
/* (Tức là: Những thằng không phải Hiếm, không phải Cao, không phải Tệ thì cho màu xanh lá nhẹ hơn xíu) */
/* ============================================================
   NEW UI: TOPUP & HELP MODAL (DARK PRO THEME)
   ============================================================ */

/* --- 1. TOPUP MODAL (Ví Tiền & Nạp) --- */
#topupCard {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%) !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
  color: #f8fafc !important;
  border-radius: 24px !important;
  width: min(420px, 92%) !important;
  padding: 0 !important;
  overflow: hidden;
  position: relative;
}

/* Header Nạp tiền */
.topup-header {
  background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
  padding: 20px;
  text-align: center;
  position: relative;
}

.current-balance {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.coin-display-large {
  font-size: 42px;
  font-weight: 900;
  color: #facc15;
  text-shadow: 0 2px 10px rgba(250, 204, 21, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Body Nạp tiền */
.topup-body {
  padding: 25px;
}

.input-group-pro {
  background: #020617;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 5px 15px;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  transition: border-color 0.2s;
}
.input-group-pro:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.input-group-pro input {
  background: transparent;
  border: none;
  color: #fff;
  width: 100%;
  padding: 10px 0;
  font-size: 16px;
  font-weight: 600;
  outline: none;
}
.input-group-pro input::placeholder {
  color: #475569;
}

/* Info Box (Device ID & Zalo) */
.info-box-pro {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 12px;
  border: 1px dashed #334155;
}

.info-label {
  font-size: 11px;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.device-id-text {
  font-family: "Courier New", monospace;
  font-size: 16px;
  font-weight: 700;
  color: #cbd5e1;
  letter-spacing: 1px;
}

/* Button Styles trong Modal */
.btn-action-row {
  display: flex;
  gap: 10px;
  margin-top: 25px;
}

.btn-modal-close {
  flex: 1;
  background: transparent;
  border: 1px solid #475569;
  color: #94a3b8;
  padding: 12px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}
.btn-modal-close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.btn-modal-confirm {
  flex: 2;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  color: #fff;
  padding: 12px;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
  text-transform: uppercase;
}
.btn-modal-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}
/* ============================================================
   UI UPGRADE V2: MODALS (DARK CYBERPUNK STYLE)
   ============================================================ */

/* --- 1. CẤU TRÚC CHUNG CHO MODAL --- */
#helpModal,
#topupModal {
  display: none;
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  background-color: rgba(10, 15, 30, 0.85) !important; /* Nền tối mờ */
  backdrop-filter: blur(8px);
  align-items: center !important;
  justify-content: center !important;
  padding: 15px; /* Cách lề mobile */
  opacity: 0;
  animation: modalFadeIn 0.3s forwards; /* Hiệu ứng hiện dần */
}

/* Ép hiển thị Flex khi JS gọi */
#helpModal[style*="display: block"],
#helpModal[style*="display: flex"],
#topupModal[style*="display: block"],
#topupModal[style*="display: flex"] {
  display: flex !important;
}

@keyframes modalFadeIn {
  to {
    opacity: 1;
  }
}

/* Thẻ Card Chính (Chứa nội dung) */
.modal-card-pro {
  background: #111827 !important; /* Màu nền rất tối (Slate 900) */
  border: 1px solid #334155 !important; /* Viền xám xanh */
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8) !important;
  border-radius: 16px !important;
  width: min(600px, 100%) !important;
  max-height: 85vh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden;
  transform: scale(0.95);
  animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modalPop {
  to {
    transform: scale(1);
  }
}

/* --- 2. HEADER CỦA MODAL --- */
.modal-header-pro {
  padding: 18px 24px;
  background: #1e293b; /* Sáng hơn nền chút */
  border-bottom: 1px solid #334155;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title-pro {
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  transition: 0.2s;
}
.btn-close-modal:hover {
  color: #ef4444;
  transform: rotate(90deg);
}

/* --- 3. BODY CỦA MODAL (NỘI DUNG) --- */
.modal-body-pro {
  padding: 24px;
  overflow-y: auto;
  color: #cbd5e1; /* Chữ xám sáng dễ đọc */
}

/* Scrollbar đẹp */
.modal-body-pro::-webkit-scrollbar {
  width: 6px;
}
.modal-body-pro::-webkit-scrollbar-track {
  background: #0f172a;
}
.modal-body-pro::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 10px;
}

/* --- 4. HELP ITEMS (GIỐNG ẢNH MẪU) --- */
.help-item {
  display: flex;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px dashed #334155; /* Đường kẻ đứt quãng */
}
.help-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Hộp icon bên trái */
.help-icon-box {
  width: 52px;
  height: 52px;
  background: #1e293b; /* Nền hộp icon */
  border: 1px solid #334155;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0; /* Không bị co lại */
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Nội dung text bên phải */
.help-content h4 {
  margin: 0 0 6px 0;
  font-size: 16px;
  font-weight: 700;
  color: #60a5fa; /* Tiêu đề xanh dương sáng */
}
.help-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #94a3b8;
}
.help-content strong {
  color: #f59e0b; /* Màu vàng cho từ khóa quan trọng */
}

/* Bảng phím tắt */
.shortcut-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.shortcut-key {
  background: #0f172a;
  border: 1px solid #334155;
  padding: 6px 10px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 13px;
  color: #e2e8f0;
}
.shortcut-key b {
  color: #facc15;
  border: 1px solid #64748b;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 5px;
  background: #1e293b;
}

/* --- 5. TOPUP UI (NẠP TIỀN) --- */
.topup-balance-box {
  background: linear-gradient(135deg, #1e3a8a 0%, #172554 100%);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin-bottom: 20px;
  border: 1px solid #3b82f6;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}
.tb-label {
  font-size: 12px;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.tb-value {
  font-size: 36px;
  font-weight: 900;
  color: #fbbf24;
  margin-top: 5px;
}

.input-dark {
  width: 100%;
  background: #020617;
  border: 1px solid #334155;
  padding: 12px 15px;
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}
.input-dark:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Footer của modal */
.modal-footer-pro {
  padding: 15px 24px;
  background: #161e2e;
  border-top: 1px solid #334155;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-modal-action {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: none;
}
.btn-modal-action.primary {
  background: #10b981;
  color: #fff;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}
.btn-modal-action.primary:hover {
  background: #059669;
  transform: translateY(-1px);
}
.btn-modal-action.secondary {
  background: transparent;
  border: 1px solid #475569;
  color: #94a3b8;
}
.btn-modal-action.secondary:hover {
  border-color: #fff;
  color: #fff;
}
/* ============================================================
   UI FINAL: MODAL SANG TRỌNG & GỌN GÀNG (CLEAN PRO)
   ============================================================ */

/* 1. Khung màn hình đen mờ (Backdrop) */
#helpModal,
#topupModal {
  display: none;
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  background-color: rgba(0, 0, 0, 0.7) !important;
  backdrop-filter: blur(5px); /* Làm mờ nền web phía sau */
  align-items: center !important;
  justify-content: center !important;
  opacity: 0;
  animation: fadeIn 0.2s forwards;
}

#helpModal[style*="display: flex"],
#topupModal[style*="display: flex"] {
  display: flex !important;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* 2. Thẻ Card Modal (Khung chính) */
.modal-card-clean {
  background: #1e293b; /* Màu xám xanh đậm sang trọng */
  border: 1px solid #334155;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  width: min(450px, 94%) !important; /* Gọn gàng */
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #f1f5f9;
  transform: scale(0.95);
  animation: scaleUp 0.2s forwards;
}

@keyframes scaleUp {
  to {
    transform: scale(1);
  }
}

/* 3. Header (Màu xanh thương hiệu) */
.clean-header {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #1e40af;
}
.clean-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.clean-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 24px;
  cursor: pointer;
  transition: 0.2s;
  line-height: 1;
}
.clean-close:hover {
  color: #fff;
}

/* 4. Body (Nội dung) */
.clean-body {
  padding: 20px 24px;
  overflow-y: auto;
}

/* 5. Footer (Chứa nút bấm) */
.clean-footer {
  padding: 16px 24px;
  background: #0f172a;
  border-top: 1px solid #334155;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* --- COMPONENT RIÊNG CHO NẠP COIN --- */

/* Hộp số dư */
.balance-box {
  text-align: center;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px dashed #334155;
}
.balance-label {
  font-size: 12px;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
}
.balance-num {
  font-size: 42px;
  font-weight: 900;
  color: #facc15;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Ô nhập liệu */
.input-clean {
  width: 100%;
  background: #0f172a;
  border: 1px solid #475569;
  padding: 12px 15px;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: 0.2s;
}
.input-clean:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Hộp ID Thiết bị (Fix nút Copy) */
.id-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
}
.id-text {
  font-family: monospace;
  font-size: 15px;
  color: #cbd5e1;
  font-weight: 600;
}

/* Nút Copy (Fix màu trắng xóa) */
.btn-copy-clean {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid #3b82f6;
  color: #60a5fa; /* Màu xanh sáng dễ đọc */
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
}
.btn-copy-clean:hover {
  background: #3b82f6;
  color: #fff;
}

/* Nút nhắn tin Zalo */
.btn-zalo {
  display: block;
  width: 100%;
  text-align: center;
  background: #0068ff;
  color: #fff;
  font-weight: 700;
  padding: 12px;
  border-radius: 10px;
  margin-top: 15px;
  text-decoration: none;
  font-size: 14px;
  transition: 0.2s;
}
.btn-zalo:hover {
  background: #0054cc;
}

/* --- COMPONENT CHO HƯỚNG DẪN --- */
.guide-item {
  margin-bottom: 20px;
}
.guide-title {
  font-size: 15px;
  font-weight: 700;
  color: #60a5fa;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.guide-text {
  font-size: 14px;
  color: #cbd5e1;
  line-height: 1.5;
  margin: 0;
}
.guide-video {
  margin-top: 20px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #334155;
  background: #000;
}

/* Nút Chung */
.btn-primary-clean {
  background: #10b981;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary-clean:hover {
  background: #059669;
}

.btn-secondary-clean {
  background: transparent;
  border: 1px solid #475569;
  color: #94a3b8;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}
.btn-secondary-clean:hover {
  border-color: #fff;
  color: #fff;
}
/* --- Giao diện 2 nút cho câu Group True/False --- */
.tf-result-footer {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  animation: fadeIn 0.3s ease;
}

/* Nút Giải thích (Màu Vàng/Cam) */
.btn-tf-explain {
  flex: 1;
  background: #f59e0b;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 0 #b45309;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-tf-explain:hover {
  background: #d97706;
}
.btn-tf-explain:active {
  transform: translateY(2px);
  box-shadow: none;
}

/* Nút Tiếp theo (Màu Xanh, to hơn chút nếu muốn hoặc bằng nhau) */
.btn-tf-next {
  flex: 1;
  background: #10b981;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 0 #059669;
}
.btn-tf-next:hover {
  background: #059669;
}
.btn-tf-next:active {
  transform: translateY(2px);
  box-shadow: none;
}

/* Mobile: Nếu màn nhỏ quá thì vẫn giữ ngang hoặc stack tùy ý (ở đây giữ ngang cho tiện) */
@media (max-width: 400px) {
  .tf-result-footer {
    gap: 8px;
  }
  .btn-tf-explain,
  .btn-tf-next {
    font-size: 13px;
    padding: 10px;
  }
}
/* ============================================================
   UI UPGRADE: PROGRESS BAR (THANH TIẾN ĐỘ PRO)
   ============================================================ */

/* 1. Khung chứa thanh tiến độ */
.progbar {
  height: 14px !important; /* Dày hơn chút cho rõ */
  background: #334155 !important; /* Nền xám đậm */
  border-radius: 20px !important;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
  margin: 25px 0 15px 0;
  border: 1px solid #475569;
}

/* 2. Thanh màu chạy bên trong (Gradient Xanh Lá -> Xanh Dương) */
.progfill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e 0%, #3b82f6 100%) !important;
  width: 0%;
  border-radius: 20px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1); /* Chạy mượt */
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.6); /* Phát sáng neon */
  position: relative;
}

/* Hiệu ứng vân sọc chéo chuyển động (Optional: cho ngầu) */
.progfill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%,
    transparent
  );
  background-size: 20px 20px;
  animation: moveStripes 2s linear infinite;
}

@keyframes moveStripes {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 20px 0;
  }
}

/* 3. Dòng chữ đếm số câu (Badge Style) */
.progress-text-wrapper {
  text-align: center;
  margin-top: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.progress-badge {
  background: #1e293b;
  color: #e2e8f0;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid #475569;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 5px;
}

.progress-badge span {
  color: #facc15; /* Số màu vàng cho nổi */
  font-size: 14px;
}
/* ============================================================
   FIX: THANH TIẾN ĐỘ NHỎ GỌN & CĂN GIỮA
   ============================================================ */

/* 1. Thu nhỏ thanh Bar */
.progbar {
  width: 180px !important; /* Chiều rộng cố định nhỏ (khoảng 1/6 PC) */
  max-width: 50% !important; /* Không quá 50% trên mobile */
  height: 8px !important; /* Mỏng lại cho tinh tế */
  margin: 20px auto 10px auto !important; /* margin: auto để CĂN GIỮA */
  border-radius: 10px !important;
  background: #334155 !important;
  border: none !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 2. Căn giữa cái Badge số đếm (0/23) */
.progress-text-wrapper {
  display: flex !important;
  justify-content: center !important; /* Căn giữa nội dung */
  width: 100% !important;
  margin-bottom: 20px !important;
}

.progress-badge {
  font-size: 12px !important;
  padding: 4px 12px !important;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid #475569;
  box-shadow: none !important;
}
/* --- USER LOGIN MODAL (STYLE PRO) --- */
.btn-user-icon {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-right: 10px;
}
.btn-user-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #a78bfa;
}
.btn-user-icon svg {
  width: 20px;
  height: 20px;
  fill: #e2e8f0;
}

/* Modal Login */
.login-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.8); /* Màu tối mờ */
  backdrop-filter: blur(5px);
  z-index: 10000;
  display: none; /* Mặc định ẩn */
  align-items: center;
  justify-content: center;
}
.login-modal {
  background: #1e293b;
  border: 1px solid #334155;
  width: 350px;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  text-align: center;
  animation: slideInUp 0.3s ease;
  position: relative;
}
.login-avatar {
  width: 80px;
  height: 80px;
  background: #334155;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  border: 3px solid #7c3aed;
}
.login-title {
  font-size: 20px;
  font-weight: bold;
  color: #f1f5f9;
  margin-bottom: 5px;
}
.login-desc {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 25px;
}
.login-input-group {
  text-align: left;
  margin-bottom: 15px;
}
.login-label {
  display: block;
  font-size: 12px;
  color: #cbd5e1;
  margin-bottom: 5px;
  font-weight: 600;
}
.login-input {
  width: 100%;
  padding: 12px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  box-sizing: border-box; /* Quan trọng để không bị vỡ layout */
}
.login-input:focus {
  border-color: #a78bfa;
  outline: none;
}
.btn-login-submit {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
  font-size: 15px;
  transition: transform 0.1s;
}
.btn-login-submit:active {
  transform: scale(0.98);
}

.login-footer {
  margin-top: 20px;
  font-size: 13px;
  color: #64748b;
}
.link-create {
  color: #a78bfa;
  cursor: pointer;
  text-decoration: underline;
}
.device-id-mini {
  margin-top: 15px;
  font-size: 11px;
  color: #475569;
  background: #0f172a;
  padding: 5px;
  border-radius: 4px;
  display: inline-block;
}

/* Giao diện sau khi đăng nhập */
.profile-info {
  text-align: center;
}
.profile-stats {
  display: flex;
  justify-content: space-around;
  margin: 20px 0;
  background: #0f172a;
  padding: 15px;
  border-radius: 10px;
}
.stat-box .val {
  font-size: 18px;
  font-weight: bold;
  color: #fbbf24;
}
.stat-box .lbl {
  font-size: 11px;
  color: #94a3b8;
  text-transform: uppercase;
}

.btn-logout {
  background: transparent;
  color: #ef4444;
  border: 1px solid #ef4444;
  padding: 8px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  margin-top: 10px;
}
.btn-sync-now {
  width: 100%;
  padding: 12px;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 10px;
}
/* --- GACHA NEON VIP V3 --- */

/* 1. Nền & Khung (Giữ nguyên độ ngầu) */
.gacha-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(15px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gacha-box {
  width: 360px;
  background: #000; /* Đen tuyệt đối để tôn màu Neon */
  border: 2px solid #333;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), inset 0 0 30px #111;
  position: relative;
  animation: zoomIn 0.3s ease;
}

/* Header */
.gacha-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid #222;
  padding-bottom: 10px;
}
.gacha-title {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 0 10px #fff, 0 0 20px #f0f; /* Glow trắng hồng */
  font-family: "Courier New", monospace;
}
.gacha-close {
  font-size: 24px;
  color: #555;
  cursor: pointer;
  transition: 0.2s;
}
.gacha-close:hover {
  color: #f00;
  transform: scale(1.2);
}

/* 2. Lưới ô (Grid) */
.ff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

/* Ô cơ bản */
.ff-cell {
  height: 85px;
  background: #111;
  border: 1px solid #222;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  position: relative;
  transition: 0.1s;
}
.ff-cell span {
  font-size: 32px;
  margin-bottom: 2px;
  filter: grayscale(1) opacity(0.5);
  transition: 0.2s;
}

/* --- MÀU SẮC NEON (THEO YÊU CẦU) --- */

/* 100 Coin - Tím (Purple) */
.style-purple {
  color: #a855f7;
  border-color: #581c87;
}
.style-purple.active,
.style-purple.winner {
  background: #2e1065 !important;
  border-color: #d8b4fe !important;
  color: #fff !important;
  box-shadow: 0 0 30px #a855f7; /* Glow Tím */
}
.style-purple.active span,
.style-purple.winner span {
  filter: drop-shadow(0 0 15px #a855f7) grayscale(0) opacity(1);
}

/* 10 Coin - Xanh (Blue) */
.style-blue {
  color: #06b6d4;
  border-color: #164e63;
}
.style-blue.active,
.style-blue.winner {
  background: #083344 !important;
  border-color: #67e8f9 !important;
  color: #fff !important;
  box-shadow: 0 0 30px #06b6d4; /* Glow Xanh */
}
.style-blue.active span,
.style-blue.winner span {
  filter: drop-shadow(0 0 10px #06b6d4) grayscale(0) opacity(1);
}

/* Coin thường - Vàng (Gold) */
.style-gold {
  color: #eab308;
  border-color: #713f12;
}
.style-gold.active,
.style-gold.winner {
  background: #422006 !important;
  border-color: #facc15 !important;
  color: #fff !important;
  box-shadow: 0 0 25px #eab308; /* Glow Vàng */
}
.style-gold.active span,
.style-gold.winner span {
  filter: drop-shadow(0 0 10px #eab308) grayscale(0) opacity(1);
}

/* Free - Hồng (Pink) */
.style-pink {
  color: #ec4899;
  border-color: #831843;
}
.style-pink.active,
.style-pink.winner {
  background: #500724 !important;
  border-color: #fbcfe8 !important;
  color: #fff !important;
  box-shadow: 0 0 25px #ec4899; /* Glow Hồng */
}
.style-pink.active span,
.style-pink.winner span {
  filter: drop-shadow(0 0 10px #ec4899) grayscale(0) opacity(1);
}

/* 0 Coin - Chết (Dead/Red) */
.style-dead {
  color: #ef4444;
  border-color: #450a0a;
}
.style-dead.active,
.style-dead.winner {
  background: #450a0a !important;
  border-color: #f87171 !important;
  color: #fff !important;
  box-shadow: 0 0 30px #ef4444; /* Glow Đỏ */
}
.style-dead.active span,
.style-dead.winner span {
  filter: drop-shadow(0 0 15px #ef4444) grayscale(0) opacity(1);
}

/* Hiệu ứng nhấp nháy khi trúng */
.ff-cell.winner {
  animation: flashWin 0.5s infinite alternate;
  z-index: 100;
  transform: scale(1.1);
}
@keyframes flashWin {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.7;
  }
}

/* Nút quay */
.ff-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.ff-spin-btn {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #facc15, #ca8a04); /* Vàng kim loại */
  border: none;
  border-radius: 12px;
  color: #000;
  font-weight: 900;
  font-size: 20px;
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.4);
  cursor: pointer;
  transition: 0.1s;
}
.ff-spin-btn:active {
  transform: scale(0.95);
}
.ff-spin-btn:disabled {
  background: #333;
  color: #666;
  box-shadow: none;
  cursor: not-allowed;
}

.gacha-status {
  text-align: center;
  margin-top: 20px;
  font-weight: 700;
  color: #a1a1aa;
  font-size: 14px;
  text-transform: uppercase;
}
@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
/* --- NÚT HỎI CHẤM (?) --- */
.gacha-info-btn {
  position: absolute; /* Bắt buộc để đặt vào góc */
  top: 15px; /* Cách mép trên */
  right: 50px; /* Cách mép phải 50px (Né nút X ra) */

  width: 28px;
  height: 28px;
  border-radius: 50%;

  /* Màu sắc tối giản sang trọng */
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #94a3b8;

  font-family: monospace;
  font-weight: bold;
  font-size: 16px;

  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100; /* Nổi lên trên cùng */
  transition: 0.2s;
}

.gacha-info-btn:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}

/* --- BẢNG TỶ LỆ (OVERLAY) --- */
.gacha-rates-overlay {
  position: absolute;
  inset: 0; /* Phủ kín cái máy Gacha */
  background: rgba(15, 20, 30, 0.98); /* Nền tối che máy */
  z-index: 101; /* Cao hơn nút ? */
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.rates-list-pro {
  list-style: none;
  padding: 0;
  width: 100%;
  margin: 15px 0;
}

.rates-list-pro li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed #334155;
  font-size: 13px;
  font-family: "Noto Sans", sans-serif;
  color: #cbd5e1;
}

.rates-header {
  font-size: 16px;
  font-weight: 800;
  color: #facc15;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-rates-close {
  padding: 8px 24px;
  background: #334155;
  border: 1px solid #475569;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
}
.btn-rates-close:hover {
  background: #475569;
}
/* Tìm class .ff-grid và THÊM dòng này vào */
.ff-grid {
  margin-top: 15px !important; /* Đẩy lưới xuống xa cái gạch ngang */
  /* Các thuộc tính cũ giữ nguyên: display: grid... */
}
/* --- GACHA HEADER LAYOUT (FIXED ALIGNMENT) --- */

/* 1. Khung chứa (Làm mốc toạ độ) */
.gacha-box {
  position: relative !important; /* Để các nút absolute bám vào đây */
  padding-top: 60px !important; /* Chừa khoảng trống phía trên cho Header */
  /* Giữ nguyên các style cũ như background, border... */
}
/* --- SỬA LẠI KHUNG GACHA CHO THOÁNG --- */

/* 1. Khung chính: Thu nhỏ chiều rộng, tăng padding */
.gacha-box {
  position: relative !important;
  background: #18181b;
  width: 340px !important; /* Thu nhỏ lại chút (cũ 360) */
  max-width: 85%;
  padding: 25px 20px 30px 20px !important; /* Tăng khoảng cách dưới đáy */
  border-radius: 24px;
  text-align: center;
  border: 3px solid #f59e0b;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.4);

  /* QUAN TRỌNG: Thêm padding-top để chừa chỗ cho Header */
  padding-top: 70px !important;
}

/* 2. Header: Đẩy cao lên và tạo khoảng cách với lưới */
.gacha-header {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 55px; /* Chiều cao Header */

  display: flex !important;
  align-items: center;
  justify-content: center;

  /* Kẻ đường gạch ngang mờ và cách xa lưới bên dưới */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;

  /* Màu nền nhẹ cho Header để tách biệt (Optional) */
  background: rgba(255, 255, 255, 0.03);
  border-radius: 20px 20px 0 0; /* Bo góc trên */
}

/* 3. Tiêu đề Lucky Spin: Chỉnh lại margin cho cân */
.gacha-title {
  font-size: 20px !important; /* Nhỏ lại xíu cho tinh tế */
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 0 10px #d946ef, 0 0 20px #8b5cf6; /* Glow Tím Hồng (Cyberpunk) */
  font-family: "Verdana", sans-serif; /* Đổi font cho hiện đại */
  margin: 0 !important; /* Xóa margin thừa */
}

/* 4. Nút ? và X: Căn chỉnh lại cho cân đối với Header mới */
.gacha-info-btn {
  top: 13px !important; /* Căn giữa theo chiều dọc của Header 55px */
  left: 15px !important;
  width: 28px;
  height: 28px;
  font-size: 14px;
  border-color: rgba(255, 255, 255, 0.3);
}

.gacha-close {
  top: 13px !important;
  right: 15px !important;
  font-size: 22px;
}
/* 2. Header (Chỉ chứa Title) */
.gacha-header {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px; /* Chiều cao cố định */
  display: flex !important;
  align-items: center;
  justify-content: center; /* Căn giữa chữ tuyệt đối */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  z-index: 1; /* Nằm dưới nút bấm một chút */
}

/* 3. Chữ Lucky Spin */
.gacha-title {
  margin: 0 !important;
  text-align: center !important;
  width: 100%; /* Chiếm hết chiều rộng để căn giữa */

  /* Style chữ */
  font-size: 22px !important;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 0 10px #d946ef, 0 0 20px #8b5cf6;
  font-family: "Verdana", sans-serif;
}

/* 4. Nút [?] (Góc Trái - Căn chỉnh toạ độ) */
.gacha-info-btn {
  position: absolute !important;
  top: 15px !important; /* Cách mép trên */
  left: 15px !important; /* Cách mép trái */
  right: auto !important; /* Xóa thuộc tính phải nếu có */

  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #94a3b8;
  font-weight: bold;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10; /* Nổi lên trên header */
  transition: 0.2s;
}
.gacha-info-btn:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}

/* 5. Nút [X] (Góc Phải - Căn chỉnh toạ độ) */
.gacha-close {
  position: absolute !important;
  top: 15px !important; /* Cách mép trên */
  right: 15px !important; /* Cách mép phải */
  left: auto !important;

  width: 32px; /* Tạo vùng bấm rộng bằng nút ? cho cân */
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 24px;
  color: #64748b; /* Màu xám cho đỡ gắt */
  cursor: pointer;
  z-index: 10;
  transition: 0.2s;
}
.gacha-close:hover {
  color: #ef4444; /* Hover đỏ */
  transform: scale(1.1);
}
/* ====================================================
   FIX FINAL: KHÔI PHỤC THANH TRƯỢT & NÚT BẤM MOBILE
   (Dán vào cuối file style-pro.css)
   ==================================================== */

/* 1. SỬA LỖI MODAL CÀI ĐẶT BỊ DÀI QUÁ KHÔNG CUỘN ĐƯỢC */
#settingsCard {
  max-height: 85vh !important; /* Giới hạn chiều cao card = 85% màn hình */
  display: flex !important;
  flex-direction: column !important;
}

#settingsBody {
  flex: 1 !important; /* Tự động chiếm chỗ còn lại */
  overflow-y: auto !important; /* Kích hoạt thanh cuộn dọc cho phần nội dung */
  /* Giúp vuốt được phần nhạc và các nút bên dưới */
  -webkit-overflow-scrolling: touch;
}

/* 2. SỬA LỖI MẤT NÚT 'VỀ TRANG CHỦ' & 'ADMIN' TRÊN ĐIỆN THOẠI */
@media (max-width: 768px) {
  /* Mở khóa cuộn toàn trang */
  html,
  body {
    height: auto !important;
    overflow-y: auto !important; /* Bắt buộc hiện thanh cuộn */
    overflow-x: hidden !important; /* Chặn cuộn ngang */
  }

  /* Đảm bảo Header không che mất nút Admin */
  .nav {
    position: relative !important; /* Không ghim cứng nữa */
    height: auto !important;
    flex-wrap: wrap !important;
    overflow: visible !important;
    z-index: 100 !important;
  }

  /* Dàn nút Admin và các nút khác xuống dòng nếu chật */
  .nav .controls {
    flex-wrap: wrap !important;
    height: auto !important;
    margin-bottom: 5px !important;
    justify-content: center !important;
  }

  /* Sửa màn hình làm bài (Quiz) để hiện nút Quay lại */
  #quiz {
    height: auto !important;
    overflow: visible !important;
    padding-bottom: 50px !important; /* Chừa chỗ dưới cùng */
  }

  #quiz .container {
    padding-top: 10px !important;
    height: auto !important;
  }

  /* Đảm bảo nút Quay lại (Back) luôn nổi lên trên và không bị che */
  .back {
    position: relative !important;
    z-index: 10;
    display: inline-block !important;
    margin-bottom: 15px !important;
  }

  /* Sửa lỗi nội dung chính bị cắt cụt */
  .dashboard-wrapper,
  .main-content-pro {
    height: auto !important;
    overflow: visible !important;
  }
}
/* ======================================================
   FIX LỖI TRÌNH PHÁT NHẠC TRÊN ĐIỆN THOẠI
   (Dán vào cuối file style-pro.css)
   ====================================================== */

@media (max-width: 640px) {
  /* 1. Ép các hàng điều khiển xuống dòng (Dọc) */
  .music-settings-box .music-controls-row {
    flex-direction: column !important;
    align-items: center !important;
    gap: 15px !important; /* Khoảng cách giữa nút và thanh volume */
  }

  /* 2. Căn giữa nhóm nút bấm (Play/Next/Prev) */
  /* Lưu ý: Do trong HTML bạn lồng 2 div cùng class music-controls-row */
  .music-settings-box .music-controls-row .music-controls-row {
    width: 100%;
    justify-content: center !important;
    margin-bottom: 5px;
    flex-direction: row !important; /* Nút bấm thì vẫn nằm ngang */
  }

  /* 3. Kéo dài thanh Volume ra cho dễ vuốt */
  .music-vol-row {
    width: 100% !important; /* Chiếm hết chiều ngang */
    margin-top: 0 !important;
    padding: 0 15px !important; /* Cách lề 2 bên 1 chút */
    box-sizing: border-box;
    display: flex !important;
    align-items: center !important;
  }

  /* 4. Tinh chỉnh thanh trượt (Slider) */
  .vol-slider {
    flex: 1; /* Tự dãn full khoảng trống ở giữa */
    width: auto !important;
    margin: 0 15px !important; /* Cách icon loa và số % ra */
  }
}
/* --- VIP STYLES --- */
.vip-badge {
  background: linear-gradient(135deg, #facc15 0%, #ca8a04 100%);
  color: #000;
  font-weight: 900;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.6);
  display: inline-block;
  animation: vipPulse 2s infinite;
}
@keyframes vipPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(250, 204, 21, 0.9);
  }
  100% {
    transform: scale(1);
  }
}

/* GỠ BỎ MÀN HÌNH KHÓA MỜ CŨ (QUAN TRỌNG) */
.settings-locked-wrapper > * {
  filter: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
.settings-lock-overlay {
  display: none !important;
}
/* =========================================
   VIP ROYAL GLOSSY THEME (BÓNG BẨY & SANG TRỌNG)
   ========================================= */

/* 1. Khung Modal (Nền tối pha tím than + Viền vàng phát sáng) */
.vip-card-glossy {
  width: min(420px, 92%);
  background: linear-gradient(160deg, #1e1e24 0%, #2a2a35 100%);
  border-radius: 24px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 0 2px #453825,
    /* Viền tối */ 0 0 20px rgba(250, 204, 21, 0.2); /* Hào quang vàng */
  overflow: hidden;
  text-align: center;
  color: #fff;
  transform: scale(0.95);
  animation: vipPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes vipPop {
  to {
    transform: scale(1);
  }
}

/* 2. Header Vàng Kim Loại (Metallic Gold) */
.vip-header-glossy {
  /* Gradient tạo hiệu ứng kim loại lấp lánh */
  background: linear-gradient(
    to right,
    #bf953f,
    #fcf6ba,
    #b38728,
    #fbf5b7,
    #aa771c
  );
  padding: 20px;
  color: #422006; /* Chữ nâu đậm */
  font-weight: 900;
  font-size: 22px;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 2;
}

/* Nút đóng (X) */
.vip-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #422006;
  font-weight: bold;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}
.vip-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* 3. Body (Hiệu ứng kính mờ) */
.vip-body-glossy {
  padding: 25px;
  background: radial-gradient(
    circle at top,
    rgba(255, 215, 0, 0.05),
    transparent 70%
  );
}

/* 4. Các dòng tính năng (Nổi khối 3D) */
.vip-feature-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 5px;
  margin-bottom: 20px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
}

.vip-row {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-align: left;
}
.vip-row:last-child {
  border-bottom: none;
}

.vip-row-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #4ade80 0%, #16a34a 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-right: 15px;
  box-shadow: 0 4px 10px rgba(34, 197, 94, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.vip-row-text {
  font-size: 14px;
  color: #e2e8f0;
  font-weight: 500;
}
.vip-row-text b {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* 5. Nút bấm (Bóng bẩy, có viền sáng) */
.btn-glossy {
  display: block;
  width: 100%;
  padding: 15px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 16px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s;
  margin-bottom: 15px;
}

.btn-glossy:active {
  transform: scale(0.98);
}

/* Nút MUA (Vàng rực) */
.btn-glossy.gold {
  background: linear-gradient(to bottom, #fbbf24, #d97706);
  color: #451a03;
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 6px 0 #92400e, 0 15px 20px rgba(0, 0, 0, 0.4);
}
.btn-glossy.gold:hover {
  filter: brightness(1.1);
}
.btn-glossy.gold:active {
  box-shadow: 0 2px 0 #92400e;
  transform: translateY(4px);
}

/* Nút DÙNG THỬ (Xanh ngọc) */
.btn-glossy.green {
  background: linear-gradient(to bottom, #34d399, #059669);
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 6px 0 #047857, 0 15px 20px rgba(0, 0, 0, 0.4);
}
.btn-glossy.green:active {
  box-shadow: 0 2px 0 #047857;
  transform: translateY(4px);
}

/* Thông tin giá tiền */
.vip-price-tag {
  font-size: 13px;
  color: #94a3b8;
  background: rgba(0, 0, 0, 0.3);
  display: inline-block;
  padding: 5px 15px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
/* =========================================
   VIP CROWN BADGE (HUY HIỆU HOÀNG GIA)
   ========================================= */

.vip-royal-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #ffd700 0%, #fdb931 50%, #b45309 100%);
  color: #422006; /* Chữ nâu đậm sang trọng */
  font-weight: 900;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid #fff8dc;

  /* Hiệu ứng đổ bóng & phát sáng */
  box-shadow: 0 0 10px rgba(253, 185, 49, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);

  animation: royalShine 3s infinite linear;
  vertical-align: middle;
  cursor: pointer;
}

/* Hiệu ứng ánh sáng chạy qua chữ VIP */
@keyframes royalShine {
  0% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.3) drop-shadow(0 0 5px gold);
  }
  100% {
    filter: brightness(1);
  }
}

/* Ẩn badge nếu không có class active (để JS xử lý) */
.vip-royal-badge.hidden {
  display: none !important;
}
/* --- VIP BADGE KHI CHƯA MUA (Nút Nâng Cấp) --- */
.vip-upgrade-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.1); /* Nền trong suốt */
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  margin-left: 10px;
  cursor: pointer;
  transition: all 0.2s;
  vertical-align: middle;
  text-transform: uppercase;
}

/* Hiệu ứng khi di chuột vào nút Nâng cấp */
.vip-upgrade-badge:hover {
  background: rgba(245, 158, 11, 0.2); /* Ánh vàng */
  color: #facc15;
  border-color: #facc15;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.3);
}

/* --- CHECKBOX "KHÔNG HIỆN LẠI" --- */
.vip-dont-show {
  margin-top: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
}
.vip-dont-show input {
  width: 16px;
  height: 16px;
  accent-color: #f59e0b; /* Màu tích vàng */
  cursor: pointer;
}
/* --- CHẾ ĐỘ THI (EXAM MODE STYLES) --- */

/* Nút Bắt đầu biến thành màu Xanh Dương đậm (Azota style) */
.btn-pro-start.exam-mode {
  background: linear-gradient(
    90deg,
    #0ea5e9 0%,
    #0284c7 100%
  ) !important; /* Xanh da trời đậm */
  color: #fff !important;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4) !important;
}

.btn-pro-start.exam-mode:hover {
  background: linear-gradient(90deg, #38bdf8 0%, #0369a1 100%) !important;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.6) !important;
}

/* Ẩn nút Ôn tập khi ở chế độ thi (Thi thì không có ôn) - Tùy chọn */
/* .btn-pro-start.exam-mode + .btn-pro-review {
  display: none;
} */
/* Ẩn nút Admin vĩnh viễn */
#btnDeveloper,
button[onclick*="openAdminPanel"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
/* ======================================================
   PERFORMANCE FIX: TẮT BLUR ĐỂ HẾT LAG TRÊN MOBILE
   (Dán vào cuối file style-pro.css)
   ====================================================== */

/* 1. Chọn tất cả các Modal nặng */
#storeModal .store-overlay, /* Shop */
#gachaModal,                /* Gacha */
#topupModal,                /* Nạp tiền */
#profileModal,              /* Hồ sơ */
#leaderboardModal,          /* BXH */
.login-modal-overlay {
  /* Đăng nhập */

  /* Tắt vĩnh viễn hiệu ứng làm mờ */
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;

  /* Thay bằng nền đen đậm (95% độ tối) để che bớt phía sau */
  background-color: rgba(15, 23, 42, 0.96) !important;
}

/* 2. Tắt hiệu ứng bóng đổ quá nhiều ở các Card */
.store-card,
.gacha-box,
#topupCard,
.modal-card-clean {
  box-shadow: 0 0 0 1px #334155, 0 20px 40px rgba(0, 0, 0, 0.6) !important;
  transform: none !important; /* Tắt transform 3D nếu không cần thiết */
}

/* 3. Tối ưu nút quay Gacha (để bấm nhạy hơn) */
.btn-gacha-spin {
  transition: none !important;
  box-shadow: 0 4px 0 #b45309 !important;
}
/* ================================================================
   FIX 3: ÉP TÀNG HÌNH MỌI SPINNER BỊ KẸT
   ================================================================ */
/* 1. Nếu là màn hình Loading to đùng giữa màn hình */
#loadingOverlay,
.loading-spinner,
.loader-container {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  z-index: -9999 !important;
  pointer-events: none !important;
}

/* 2. Nếu là các icon đang bị dính hiệu ứng xoay (như Cloud Sync) */
.fa-spin,
.spin,
.fa-spinner {
  animation: none !important; /* Cắt điện motor quay */
  transform: none !important;
}
/* FIX: Chống tự động Zoom màn hình khi gõ phím trên iPhone */
@media screen and (max-width: 768px) {
  input,
  select,
  textarea {
    font-size: 16px !important;
  }
}
/* HIỆU ỨNG Ổ KHÓA PREMIUM HOVER */
.card-pro {
  position: relative;
  overflow: hidden;
}
.card-lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 10;
}
.card-pro:hover .card-lock-overlay {
  opacity: 1;
}
.promo-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ec4899;
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 11px;
  z-index: 5;
  box-shadow: 0 4px 10px rgba(236, 72, 153, 0.4);
}
