/* ═══════════════════════════════════════════════════════════════
   RIGHT PANEL — css/right-panel.css
   Sprint: Panel Rebuild v8.43
   Phụ thuộc: css/base.css (CSS vars: --accent-gold, --z-modal-high)

   NGUYÊN TẮC KIẾN TRÚC (không được thay đổi):
   ─ position:fixed trên mọi breakpoint — tuyệt đối không chiếm
     space trong flex layout, không trigger reflow của main panel
   ─ transform:translateX() cho open/close — GPU-accelerated,
     không ảnh hưởng bất kỳ phần tử nào khác trên trang
   ─ visibility:hidden khi đóng — ngăn focus-trap, ngăn screen
     reader đọc nội dung ẩn
   ─ Tab sections: position:absolute + opacity — switch tab không
     gây layout recalc, chỉ composite layer change
   ─ z-index: 60 — trên main content (0), dưới modal overlay (9990),
     dưới sidebar mobile (200), dưới hamburger toggle (100)
═══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────
   1. PANEL SHELL
───────────────────────────────────────── */
#ytt-right-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  height: 100vh;
  background: #0d0d1a;
  border-left: 1px solid rgba(212, 175, 55, 0.12);
  box-shadow: -6px 0 32px rgba(0, 0, 0, 0.55);
  z-index: 60;
  display: flex;
  flex-direction: column;

  /* Trạng thái đóng — translateX không kích hoạt reflow */
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.25, 0.8, 0.25, 1),
              visibility 0s linear 0.28s;
  visibility: hidden;
}

/* Ẩn hoàn toàn khi guest — panel không tồn tại với guest */
body.guest-mode #ytt-right-panel {
  display: none;
}

/* Trạng thái mở */
#ytt-right-panel.ytt-rp-open {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.28s cubic-bezier(0.25, 0.8, 0.25, 1),
              visibility 0s linear 0s;
}

/* ─────────────────────────────────────────
   2. NÚT ĐÓNG
───────────────────────────────────────── */
.ytt-rp-close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
  z-index: 2;
  flex-shrink: 0;
}

.ytt-rp-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* ─────────────────────────────────────────
   3. TAB NAVIGATION
───────────────────────────────────────── */
.ytt-rp-tabs {
  display: flex;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
  background: rgba(0, 0, 0, 0.25);
  padding-right: 36px; /* Không bị đè bởi nút đóng */
}

.ytt-rp-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 2px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(255, 255, 255, 0.32);
  cursor: pointer;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  transition: color 0.15s ease, border-color 0.15s ease,
              background 0.15s ease;
  /* Đảm bảo không nhỏ hơn vùng tap tối thiểu */
  min-height: 52px;
}

.ytt-rp-tab i {
  font-size: 14px;
}

.ytt-rp-tab:hover {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.65);
}

.ytt-rp-tab.ytt-rp-tab-active {
  border-bottom-color: var(--accent-gold, #ffd700);
  color: var(--accent-gold, #ffd700);
  background: rgba(212, 175, 55, 0.05);
}

/* ─────────────────────────────────────────
   4. BODY — CONTAINER CHO CÁC SECTION
───────────────────────────────────────── */
.ytt-rp-body {
  flex: 1;
  position: relative; /* Anchor cho các section position:absolute */
  overflow: hidden;
  min-height: 0;
}

/* ─────────────────────────────────────────
   5. TAB SECTIONS — STACKED, SWITCH QUA OPACITY
   Dùng position:absolute + opacity thay vì display:none/block
   để: (a) tránh layout recalc khi đổi tab, (b) cho phép transition
───────────────────────────────────────── */
.ytt-rp-section {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 16px;

  /* Trạng thái ẩn */
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease,
              visibility 0s linear 0.18s;

  /* Scrollbar */
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.2) transparent;
}

.ytt-rp-section::-webkit-scrollbar { width: 5px; }
.ytt-rp-section::-webkit-scrollbar-track { background: transparent; }
.ytt-rp-section::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.2);
  border-radius: 4px;
}
.ytt-rp-section::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.35);
}

/* Trạng thái hiện */
.ytt-rp-section.ytt-rp-section-active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.18s ease, transform 0.18s ease,
              visibility 0s linear 0s;
}

/* ─────────────────────────────────────────
   6. LOADING SKELETON — hiện trong khi fetch content
───────────────────────────────────────── */
.ytt-rp-skeleton {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0;
}

.ytt-rp-skel-line {
  height: 13px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  animation: ytt-rp-shimmer 1.6s ease-in-out infinite;
}
.ytt-rp-skel-line.w-full  { width: 100%; }
.ytt-rp-skel-line.w-80    { width: 80%; }
.ytt-rp-skel-line.w-60    { width: 60%; }

.ytt-rp-skel-block {
  height: 80px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  animation: ytt-rp-shimmer 1.6s ease-in-out infinite;
}

@keyframes ytt-rp-shimmer {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 0.85; }
}

/* ─────────────────────────────────────────
   7. BACKDROP — chỉ active trên mobile
   Desktop: panel nổi bên phải, không cần backdrop
───────────────────────────────────────── */
#ytt-rp-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 59; /* Luôn 1 dưới panel (z:60) */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0s linear 0.28s;
}

#ytt-rp-backdrop.ytt-rp-backdrop-show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.28s ease, visibility 0s linear 0s;
}

/* Desktop: backdrop không bao giờ hiện */
@media (min-width: 769px) {
  #ytt-rp-backdrop {
    display: none !important;
  }
}

/* ─────────────────────────────────────────
   8. RESPONSIVE
───────────────────────────────────────── */

/* Tablet (768-1199px): thu hẹp lại một chút */
@media (max-width: 1199px) and (min-width: 769px) {
  #ytt-right-panel {
    width: 320px;
  }
}

/* Mobile (≤768px): full-width overlay từ phải */
@media (max-width: 768px) {
  #ytt-right-panel {
    width: 100vw;
    border-left: none;
    box-shadow: none;
  }

  .ytt-rp-tabs {
    padding-right: 44px; /* rộng hơn cho nút đóng khi full-width */
  }

  .ytt-rp-tab {
    font-size: 8px;
    min-height: 48px;
  }
}

/* Large desktop (≥1400px): rộng hơn, thoải mái hơn */
@media (min-width: 1400px) {
  #ytt-right-panel {
    width: 400px;
  }
}

/* ─────────────────────────────────────────
   9. TAB BÍ KÍP — override CSS guide-modal bên trong right panel
───────────────────────────────────────── */
.rp-guide-header {
  margin-bottom: 14px;
}
.rp-guide-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-gold, #ffd700);
  margin-bottom: 2px;
}
.rp-guide-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

/* Guide scroll area bên trong panel — bỏ max-height + overflow (section đã scroll) */
#rp-gd-container .guide-scroll-area {
  max-height: none;
  overflow: visible;
  padding: 0;
}
/* Section gap gọn hơn trong panel hẹp */
#rp-gd-container .guide-section {
  margin-bottom: 20px;
}
#rp-gd-container .task-grid {
  margin-bottom: 0;
}

/* ─────────────────────────────────────────
   10. PULL TAB — trigger mở panel từ cạnh phải
       Hiện khi panel đóng, ẩn khi panel mở
───────────────────────────────────────── */
#ytt-rp-pulltab {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%) translateX(0);
  width: 20px;
  height: 64px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-right: none;
  border-radius: 8px 0 0 8px;
  color: rgba(212, 175, 55, 0.45);
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 58; /* dưới backdrop(59) và panel(60) */
  transition: background 0.15s ease, color 0.15s ease,
              opacity 0.2s ease, transform 0.22s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#ytt-rp-pulltab:hover {
  background: rgba(212, 175, 55, 0.25);
  color: var(--accent-gold, #ffd700);
}

/* Ẩn pull tab khi panel đang mở — trượt ra cùng panel */
#ytt-rp-pulltab.ytt-rp-pulltab-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(100%);
}

/* Guest mode: không hiện pull tab */
body.guest-mode #ytt-rp-pulltab { display: none; }

/* Mobile: ẩn pull tab — backdrop đã đủ */
@media (max-width: 768px) {
  #ytt-rp-pulltab { display: none; }
}

/* ─────────────────────────────────────────
   11. TAB LỊCH SỬ — rp-history.js
───────────────────────────────────────── */
.rp-his-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.rp-his-hdr-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-gold, #ffd700);
}
.rp-his-clear-btn {
  background: none;
  border: 1px solid rgba(231, 76, 60, 0.35);
  border-radius: 6px;
  color: rgba(231, 76, 60, 0.7);
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.rp-his-clear-btn:hover {
  background: rgba(231, 76, 60, 0.12);
  color: #e74c3c;
}

/* Full-bleed list — kéo về sát cạnh section, items tự padding lại */
.rp-his-list {
  margin: 0 -16px;
}
.rp-his-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease;
}
.rp-his-item:last-child { border-bottom: none; }
.rp-his-item:hover      { background: rgba(255, 255, 255, 0.03); }

.rp-his-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.rp-his-icon.earn    { background: rgba(46,  204, 113, 0.12); color: #2ecc71; }
.rp-his-icon.spend   { background: rgba(231,  76,  60, 0.12); color: #e74c3c; }
.rp-his-icon.neutral { background: rgba(136, 136, 136, 0.10); color: #888;    }

.rp-his-meta {
  flex: 1;
  min-width: 0; /* Kích hoạt ellipsis bên trong */
}
.rp-his-title {
  font-size: 13px;
  font-weight: 600;
  color: #eee;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rp-his-content {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rp-his-time {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 3px;
}

.rp-his-amount {
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  text-align: right;
}
.rp-his-amount.earn   { color: #2ecc71; }
.rp-his-amount.spend  { color: #e74c3c; }
.rp-his-amount.exp    { color: #ff9800; }
.rp-his-amount.reward { color: #fbc02d; }

.rp-his-empty {
  text-align: center;
  padding: 40px 0;
  color: rgba(255, 255, 255, 0.3);
}
.rp-his-empty i {
  font-size: 28px;
  margin-bottom: 10px;
  display: block;
}
.rp-his-empty p {
  font-size: 13px;
  margin: 0;
}

/* ─────────────────────────────────────────
   12. TAB VÒNG QUAY — rp-wheel.js
───────────────────────────────────────── */
/* Khu vực bánh xe */
.rp-whl-arena {
  position: relative;
  width: 264px;
  height: 264px;
  margin: 0 auto 16px;
}
.rp-whl-pointer {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 26px;
  color: #ffd700;
  z-index: 10;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.7));
  pointer-events: none;
}
.rp-whl-disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  will-change: transform;
}
.rp-whl-disc canvas {
  display: block;
  border-radius: 50%;
}

.rp-whl-rates {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 10px;
  padding: 10px 0;
  margin-bottom: 12px;
}
.rp-whl-rate-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  font-size: 12px;
}
.rp-whl-rate-row + .rp-whl-rate-row {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.rp-whl-rate-icon {
  width: 24px;
  text-align: center;
  font-size: 13px;
}
.rp-whl-rate-name {
  flex: 1;
  color: #ddd;
}
.rp-whl-rate-pct {
  font-weight: 700;
  font-size: 12px;
}
.rate-vip  .rp-whl-rate-icon,
.rate-vip  .rp-whl-rate-pct { color: var(--accent-gold, #ffd700); }
.rate-buff .rp-whl-rate-icon,
.rate-buff .rp-whl-rate-pct { color: #e91e63; }
.rate-wish .rp-whl-rate-icon,
.rate-wish .rp-whl-rate-pct { color: #90a4ae; }

.rp-whl-pity {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 14px;
  line-height: 1.4;
}
.rp-whl-pity .fa-shield-alt {
  color: #ff5252;
  margin-right: 4px;
}

.rp-whl-result {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-gold, #ffd700);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 14px;
  text-align: center;
}

.rp-whl-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #b8860b, #ffd700, #b8860b);
  background-size: 200% auto;
  border: none;
  border-radius: 10px;
  color: #1a1400;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: background-position 0.4s ease, opacity 0.2s ease, transform 0.1s ease;
  letter-spacing: 0.3px;
}
.rp-whl-btn:hover:not(:disabled) {
  background-position: right center;
  transform: translateY(-1px);
}
.rp-whl-btn:active:not(:disabled) { transform: translateY(0); }
.rp-whl-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.rp-whl-btn.rp-whl-btn-broke {
  background: rgba(255, 255, 255, 0.08);
  color: #888;
}

.rp-whl-cost {
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 8px;
}

/* Kết quả spin */
.rp-whl-res-vip  { color: var(--accent-gold, #ffd700); font-size: 14px; text-shadow: 0 0 8px rgba(255,215,0,0.5); }
.rp-whl-res-buff { color: #e91e63; font-size: 14px; text-shadow: 0 0 8px rgba(233,30,99,0.4); }
.rp-whl-res-item { color: #69f0ae; font-size: 14px; text-shadow: 0 0 8px rgba(105,240,174,0.5); }
.rp-whl-res-lt   { color: #ffd700; font-size: 12px; }
.rp-whl-res-pity { color: #ff5252; font-size: 12px; }
.rp-whl-res-wish { color: #90a4ae; font-size: 12px; }

.rate-item .rp-whl-rate-icon,
.rate-item .rp-whl-rate-pct { color: #69f0ae; }
.rate-lt .rp-whl-rate-icon,
.rate-lt .rp-whl-rate-pct   { color: #ffd700; }

/* Compact history */
.rp-whl-history {
  margin-top: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(212,175,55,0.10);
  border-radius: 10px;
  overflow: hidden;
}
.rp-whl-hist-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  padding: 8px 14px 5px;
}
.rp-whl-hist-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 180px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(212,175,55,0.25) transparent;
}
.rp-whl-hist-list::-webkit-scrollbar { width: 4px; }
.rp-whl-hist-list::-webkit-scrollbar-track { background: transparent; }
.rp-whl-hist-list::-webkit-scrollbar-thumb { background: rgba(212,175,55,0.25); border-radius: 2px; }
.rp-whl-hist-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  font-size: 11px;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.rp-whl-hist-list li:first-child { border-top: none; }
.rp-whl-hist-empty { color: rgba(255,255,255,0.22); font-style: italic; }
.rp-whl-hist-icon  { font-size: 13px; width: 18px; text-align: center; flex-shrink: 0; }
.rp-whl-hist-name  { flex: 1; color: #ccc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-whl-hist-date  { color: rgba(255,255,255,0.28); font-size: 10px; white-space: nowrap; flex-shrink: 0; }

.rp-whl-empty {
  text-align: center;
  padding: 40px 0;
  color: rgba(255, 255, 255, 0.3);
}
.rp-whl-empty i { font-size: 28px; margin-bottom: 10px; display: block; }
.rp-whl-empty p { font-size: 13px; margin: 0; }

/* ─────────────────────────────────────────
   13. TAB CÀI ĐẶT — rp-settings.js
───────────────────────────────────────── */
.rp-set-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.rp-set-section:last-child { border-bottom: none; margin-bottom: 0; }

.rp-set-section-title {
  font-size: 11px;
  font-weight: 700;
  color: rgba(212, 175, 55, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
}
.rp-set-section-title i { margin-right: 5px; }

/* Tên hiển thị */
.rp-set-field { margin-bottom: 12px; }
.rp-set-label {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 5px;
}
.rp-set-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.rp-set-cur-name {
  font-size: 13px;
  font-weight: 600;
  color: #eee;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rp-set-email {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}
.rp-set-edit-btn {
  background: none;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 6px;
  color: rgba(212, 175, 55, 0.7);
  font-size: 11px;
  padding: 4px 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}
.rp-set-edit-btn:hover { border-color: #ffd700; color: #ffd700; }

.rp-set-name-form { margin-top: 10px; }
.rp-set-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  color: #eee;
  font-size: 13px;
  padding: 9px 11px;
  outline: none;
  transition: border-color 0.15s;
  margin-bottom: 8px;
}
.rp-set-input:focus { border-color: rgba(212, 175, 55, 0.5); }
.rp-set-input::placeholder { color: rgba(255, 255, 255, 0.25); }

.rp-set-row-btns {
  display: flex;
  gap: 8px;
}
.rp-set-btn {
  flex: 1;
  padding: 8px 0;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
  border: none;
}
.rp-set-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.rp-set-btn-primary {
  background: rgba(212, 175, 55, 0.85);
  color: #1a1400;
}
.rp-set-btn-primary:hover:not(:disabled) { background: #ffd700; }
.rp-set-btn-ghost {
  background: rgba(255, 255, 255, 0.07);
  color: #aaa;
}
.rp-set-btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); color: #ddd; }
.rp-set-btn-outline {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #bbb;
}
.rp-set-btn-outline:hover:not(:disabled) { border-color: rgba(212, 175, 55, 0.5); color: #ffd700; }

.rp-set-msg {
  font-size: 11px;
  margin-top: 6px;
  min-height: 16px;
  line-height: 1.4;
}

/* Mật khẩu */
.rp-set-pwd-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.rp-set-pwd-row .rp-set-btn {
  font-size: 11px;
  padding: 8px 6px;
}

/* Toggle Ám Ảnh */
.rp-set-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.rp-set-toggle-info { flex: 1; min-width: 0; }
.rp-set-toggle-name {
  font-size: 13px;
  font-weight: 600;
  color: #ddd;
}
.rp-set-toggle-name i { color: var(--primary-red, #e53935); margin-right: 5px; }
.rp-set-toggle-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.38);
  margin-top: 2px;
}

/* Ngôn ngữ */
.rp-set-langs {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 12px;
}
.rp-set-lang-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 8px;
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #ccc;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.rp-set-lang-btn:hover {
  background: rgba(212, 175, 55, 0.08);
  border-color: rgba(212, 175, 55, 0.3);
  color: #ffd700;
}
.rp-set-lang-btn img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.rp-set-empty {
  text-align: center;
  padding: 40px 0;
  color: rgba(255, 255, 255, 0.3);
}
.rp-set-empty i { font-size: 28px; margin-bottom: 10px; display: block; }
.rp-set-empty p { font-size: 13px; margin: 0; }

/* Preferences: nhóm (label + pills) */
.rp-pref-group {
  margin-bottom: 14px;
}
.rp-pref-label {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 7px;
}
.rp-pref-label i { margin-right: 4px; }

/* Pill buttons cho preferences */
.rp-pref-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rp-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.65);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.rp-pill-btn:hover {
  background: rgba(212,175,55,0.1);
  border-color: rgba(212,175,55,0.3);
  color: #fff;
}
.rp-pill-btn.active {
  background: var(--primary-red, #d32f2f);
  border-color: var(--primary-red, #d32f2f);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.rp-voice-img {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* Color theme grid */
.rp-theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.rp-theme-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 6px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.rp-theme-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
}
.rp-theme-btn.active {
  border-color: var(--accent-gold, #ffd700);
  background: rgba(212,175,55,0.08);
}
.rp-theme-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rp-theme-label {
  font-size: 10px;
  color: rgba(255,255,255,0.65);
  text-align: center;
  line-height: 1.3;
}
.rp-theme-btn.active .rp-theme-label { color: #fff; }

/* ─────────────────────────────────────────
   14. TAB ĐIỂM DANH — rp-calendar.js
───────────────────────────────────────── */

/* Empty state */
.rp-cal-empty {
  text-align: center;
  padding: 40px 0;
  color: rgba(255, 255, 255, 0.3);
}
.rp-cal-empty i { font-size: 28px; margin-bottom: 10px; display: block; }
.rp-cal-empty p { font-size: 13px; margin: 0; }

/* Header + Info tooltip */
.rp-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.rp-cal-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-gold, #ffd700);
}
.rp-cal-info-wrap {
  position: relative;
}
.rp-cal-info-btn {
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.rp-cal-info-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  color: var(--accent-gold, #ffd700);
}

.rp-cal-tooltip {
  position: absolute;
  top: 32px;
  right: 0;
  width: 280px;
  background: #1a1a2e;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 10px;
  padding: 14px;
  z-index: 10;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
}
.rp-cal-tooltip.rp-cal-tooltip-show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0s;
}
.rp-cal-tooltip-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-gold, #ffd700);
  margin-bottom: 8px;
}
.rp-cal-tooltip-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.rp-cal-tooltip-list li {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.rp-cal-tooltip-list li i {
  margin-top: 2px;
  font-size: 10px;
  flex-shrink: 0;
}
.rp-cal-tooltip-list li strong {
  color: #fff;
}

/* Stats bar */
.rp-cal-stats {
  display: flex;
  justify-content: space-around;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 12px;
  padding: 12px 8px;
  margin-bottom: 12px;
}
.rp-cal-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.rp-cal-stat i {
  font-size: 14px;
  margin-bottom: 2px;
}
.rp-cal-fire { color: #ff6b35; }
.rp-cal-total-icon { color: #2ecc71; }
.rp-cal-month-icon { color: #64b5f6; }
.rp-cal-stat-val {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.rp-cal-stat-lbl {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Nút điểm danh */
.rp-cal-checkin-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 14px;
  transition: background-position 0.4s ease, transform 0.1s ease, opacity 0.15s ease;
  background: linear-gradient(135deg, #b8860b, #ffd700, #b8860b);
  background-size: 200% auto;
  color: #1a1400;
  letter-spacing: 0.3px;
}
.rp-cal-checkin-btn:hover:not(:disabled) {
  background-position: right center;
  transform: translateY(-1px);
}
.rp-cal-checkin-btn:active:not(:disabled) { transform: translateY(0); }
.rp-cal-checkin-btn:disabled { cursor: not-allowed; }
.rp-cal-checkin-btn .rp-cal-reward {
  font-size: 12px;
  opacity: 0.85;
  margin-left: 4px;
}
.rp-cal-btn-done {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.3);
}
.rp-cal-btn-done:hover { background: rgba(46, 204, 113, 0.15); transform: none; }

/* Month navigator */
.rp-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.rp-cal-nav-btn {
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.rp-cal-nav-btn:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.rp-cal-nav-disabled {
  opacity: 0.2;
  pointer-events: none;
}
.rp-cal-nav-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-gold, #ffd700);
}

/* Calendar grid — 7 cột */
.rp-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 10px;
}
.rp-cal-day-name {
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  padding: 4px 0;
  letter-spacing: 0.3px;
}

/* Ô ngày */
.rp-cal-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  position: relative;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  gap: 1px;
}
.rp-cal-cell-empty { background: transparent; }
.rp-cal-d {
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: rgba(255, 255, 255, 0.5);
}

/* Đã điểm danh */
.rp-cal-checked {
  background: rgba(46, 204, 113, 0.15);
  border: 1px solid rgba(46, 204, 113, 0.35);
}
.rp-cal-checked .rp-cal-d { color: #2ecc71; }
.rp-cal-ck {
  font-size: 7px;
  color: #2ecc71;
}

/* Hôm nay chưa điểm danh */
.rp-cal-today {
  background: rgba(212, 175, 55, 0.12);
  border: 1.5px solid rgba(212, 175, 55, 0.5);
  cursor: pointer;
  animation: rp-cal-pulse 2s ease-in-out infinite;
}
.rp-cal-today .rp-cal-d { color: #ffd700; font-weight: 800; }
.rp-cal-today:hover {
  background: rgba(212, 175, 55, 0.22);
  transform: scale(1.08);
}

@keyframes rp-cal-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.3); }
  50%      { box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.08); }
}

/* Ngày bỏ lỡ */
.rp-cal-missed {
  background: rgba(231, 76, 60, 0.08);
  border: 1px solid rgba(231, 76, 60, 0.2);
  cursor: pointer;
}
.rp-cal-missed .rp-cal-d { color: rgba(231, 76, 60, 0.7); }
.rp-cal-gem {
  font-size: 6px;
  color: #00bcd4;
  filter: drop-shadow(0 0 2px rgba(0, 188, 212, 0.4));
}
.rp-cal-missed:hover {
  background: rgba(231, 76, 60, 0.15);
  transform: scale(1.08);
}
/* Ngày bỏ lỡ ở tháng cũ — không bù được */
.rp-cal-missed-old {
  cursor: default;
  opacity: 0.5;
}
.rp-cal-missed-old:hover { transform: none; }

/* Ngày tương lai */
.rp-cal-future {
  background: rgba(255, 255, 255, 0.02);
}
.rp-cal-future .rp-cal-d { color: rgba(255, 255, 255, 0.18); }

/* Legend */
.rp-cal-legend {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.rp-cal-leg-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.4);
}
.rp-cal-leg-dot {
  width: 8px;
  height: 8px;
  border-radius: 3px;
  flex-shrink: 0;
}
.rp-cal-leg-checked { background: rgba(46, 204, 113, 0.5); border: 1px solid #2ecc71; }
.rp-cal-leg-missed  { background: rgba(231, 76, 60, 0.3); border: 1px solid rgba(231, 76, 60, 0.5); }
.rp-cal-leg-today   { background: rgba(212, 175, 55, 0.3); border: 1px solid rgba(212, 175, 55, 0.5); }

/* Milestone section */
.rp-cal-ms-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(212, 175, 55, 0.1);
  border-radius: 10px;
  padding: 12px;
}
.rp-cal-ms-title {
  font-size: 11px;
  font-weight: 700;
  color: rgba(212, 175, 55, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.rp-cal-ms-title i { margin-right: 4px; color: var(--accent-gold, #ffd700); }

/* Nút nhận milestone */
.rp-cal-ms-claim {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(46, 204, 113, 0.08);
  border: 1px solid rgba(46, 204, 113, 0.25);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
}
.rp-cal-ms-claim-text {
  font-size: 11px;
  color: #2ecc71;
  font-weight: 600;
}
.rp-cal-ms-star { color: #fbc02d; margin-right: 4px; }
.rp-cal-ms-claim-btn {
  background: #2ecc71;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
}
.rp-cal-ms-claim-btn:hover { background: #27ae60; transform: translateY(-1px); }
.rp-cal-ms-claim-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Progress bar */
.rp-cal-ms-progress {
  margin-bottom: 10px;
}
.rp-cal-ms-bar {
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 5px;
}
.rp-cal-ms-fill {
  height: 100%;
  background: linear-gradient(90deg, #b8860b, #ffd700);
  border-radius: 3px;
  transition: width 0.4s ease;
}
.rp-cal-ms-info {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
}
.rp-cal-ms-info strong { color: var(--accent-gold, #ffd700); }

/* Mini milestone dots */
.rp-cal-ms-dots {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}
.rp-cal-ms-dot {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.15s;
}
.rp-cal-ms-dot:hover { transform: scale(1.15); }
.rp-cal-ms-reached {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
  border-color: rgba(46, 204, 113, 0.35);
}
.rp-cal-ms-claimed {
  background: rgba(212, 175, 55, 0.12);
  color: var(--accent-gold, #ffd700);
  border-color: rgba(212, 175, 55, 0.3);
}

/* ═══════════════════════════════════════════════════════════════
   TAB THÔNG BÁO — rp-notifications.js
═══════════════════════════════════════════════════════════════ */

/* Cần position:relative để badge absolute đúng góc */
.ytt-rp-tab { position: relative; }

/* Badge số thông báo chưa đọc trên tab button */
#rp-notif-tab-badge {
  position: absolute;
  top: 5px;
  right: 4px;
  min-width: 15px;
  height: 15px;
  background: #e74c3c;
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  border-radius: 8px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
  pointer-events: none;
  animation: rpBadgePop .22s ease;
}
@keyframes rpBadgePop {
  0%   { transform: scale(0); }
  75%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* 6 tabs: thu nhỏ font + padding để vừa trong 324px */
.ytt-rp-tabs--6 .ytt-rp-tab {
  font-size: 7.5px;
  padding: 8px 1px;
  min-height: 50px;
}
.ytt-rp-tabs--6 .ytt-rp-tab i { font-size: 13px; }

/* Notification section: không padding — layout tự quản lý */
#rp-tab-notif {
  padding: 0;
  overflow: hidden;
}

/* Wrapper flex column full height */
.rp-notif-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Header */
.rp-notif-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}
.rp-notif-hdr-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rp-notif-hdr-title i {
  color: var(--accent-gold, #ffd700);
  font-size: 0.95rem;
}
.rp-notif-readall {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.68rem;
  padding: 4px 11px;
  border-radius: 20px;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.rp-notif-readall:hover {
  border-color: var(--accent-gold, #ffd700);
  color: var(--accent-gold, #ffd700);
}

/* Filter pills */
.rp-notif-pills {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
}
.rp-notif-pills::-webkit-scrollbar { display: none; }
.rp-notif-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.68rem;
  padding: 4px 11px;
  border-radius: 20px;
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
  flex-shrink: 0;
}
.rp-notif-pill:hover {
  border-color: rgba(255, 215, 0, .35);
  color: rgba(255, 215, 0, .75);
}
.rp-notif-pill.active {
  background: rgba(255, 215, 0, .12);
  border-color: rgba(255, 215, 0, .45);
  color: var(--accent-gold, #ffd700);
  font-weight: 700;
}

/* Scrollable list */
.rp-notif-list {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .08) transparent;
}
.rp-notif-list::-webkit-scrollbar { width: 3px; }
.rp-notif-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .1);
  border-radius: 2px;
}

/* Item thông báo */
.rp-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: background .15s;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.rp-notif-item:last-child { border-bottom: none; }
.rp-notif-item:hover { background: rgba(255, 255, 255, 0.03); }

/* Highlight chưa đọc — vạch vàng trái */
.rp-notif-item.unread { background: rgba(255, 215, 0, 0.04); }
.rp-notif-item.unread::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent-gold, #ffd700);
  border-radius: 0 2px 2px 0;
}

/* Icon vòng tròn */
.rp-notif-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  flex-shrink: 0;
}

/* Content */
.rp-notif-cnt { flex: 1; min-width: 0; }

.rp-notif-ttl {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.35;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rp-notif-item.unread .rp-notif-ttl { color: #fff; }

.rp-notif-bdy {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.rp-notif-meta {
  display: flex;
  align-items: center;
  gap: 4px;
}
.rp-nm-rel {
  font-size: 0.63rem;
  color: rgba(255, 255, 255, 0.33);
}
.rp-nm-abs {
  font-size: 0.63rem;
  color: rgba(255, 255, 255, 0.2);
}
.rp-nm-abs::before { content: '·'; margin-right: 3px; }

/* Nút xóa — chỉ hiện khi hover item */
.rp-notif-del {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  flex-shrink: 0;
  align-self: center;
  opacity: 0;
  transition: opacity .15s, background .15s, color .15s;
}
.rp-notif-item:hover .rp-notif-del { opacity: 1; }
.rp-notif-del:hover { background: rgba(231, 76, 60, .2); color: #e74c3c; }

/* Empty / loading state */
.rp-notif-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.27);
  text-align: center;
  gap: 12px;
}
.rp-notif-empty i { font-size: 2.2rem; }
.rp-notif-empty p { font-size: 0.8rem; margin: 0; }

/* ═══════════════════════════════════════════════════════════════
   TOAST NỔI — Thông báo realtime (FB/Zalo style)
═══════════════════════════════════════════════════════════════ */
#ytt-notif-toast-box {
  position: fixed;
  bottom: 88px;
  right: 16px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 320px;
}

.ytt-nt {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 14px 16px;
  background: rgba(14, 14, 26, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 36px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.3);
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  min-width: 260px;
  max-width: 320px;

  /* Slide-in từ phải */
  transform: translateX(calc(100% + 24px));
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34,1.4,0.64,1), opacity 0.28s ease;
}
.ytt-nt.show  { transform: translateX(0); opacity: 1; }
.ytt-nt.hide  { transform: translateX(calc(100% + 24px)); opacity: 0; transition-timing-function: ease-in; }

/* Vạch màu trái */
.ytt-nt::before {
  content: '';
  position: absolute;
  left: 0; top: 12%; bottom: 12%;
  width: 3px;
  background: var(--nt-accent, #ffd700);
  border-radius: 0 3px 3px 0;
}

/* Icon */
.ytt-nt-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.88rem;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Body */
.ytt-nt-body { flex: 1; min-width: 0; }

.ytt-nt-label {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--nt-accent, #ffd700);
  margin-bottom: 3px;
  opacity: 0.85;
}
.ytt-nt-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ytt-nt-desc {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 3px;
}
.ytt-nt-time {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.28);
}

/* Nút đóng */
.ytt-nt-x {
  background: none;
  border: none;
  color: rgba(255,255,255,0.28);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background .15s, color .15s;
  align-self: flex-start;
}
.ytt-nt-x:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* Progress bar đếm ngược tự ẩn */
.ytt-nt-bar {
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  width: 100%;
  opacity: 0.6;
  transform-origin: left;
  animation: ytt-nt-drain 5s linear forwards;
}
@keyframes ytt-nt-drain {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* Mobile */
@media (max-width: 480px) {
  #ytt-notif-toast-box {
    right: 8px; left: 8px;
    max-width: none;
  }
  .ytt-nt { min-width: unset; max-width: none; }
}

/* Wrapper tạo gradient fade phải — chỉ ra còn pills ẩn khi scroll */
.rp-notif-pills-fade {
  position: relative;
  flex-shrink: 0;
  /* KHÔNG set overflow:hidden — sẽ chặn scroll của pills bên trong */
}
/* Gradient fade cạnh phải */
.rp-notif-pills-fade::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 28px;
  background: linear-gradient(to right, transparent, #0d0d1a 85%);
  pointer-events: none;
  z-index: 1;
}
/* Bên trong scroll được, không bị che bởi overflow:hidden của wrapper */
.rp-notif-pills-fade .rp-notif-pills {
  padding: 10px 32px 10px 14px; /* padding-right dư để pill cuối không bị che */
}
