/* Bot Đảo Rồng — nền chung (v2.4, 06/11/2026): giao diện kiểu Discord / MEE6, nhấn màu HỒNG thay vàng kim.
   Bảng màu xám của Discord (#1e1f22 · #2b2d31 · #313338 · #383a40) + hồng #eb459e (Discord "fuchsia").
   Chữ sans hệ thống giống gg sans của Discord (đủ dấu tiếng Việt). Biến --gold* giữ TÊN cũ cho code cũ,
   nhưng giá trị giờ là hồng. */
:root {
  color-scheme: dark;
  --bg: #1e1f22;        /* nền ngoài cùng, thanh trên */
  --bg-2: #2b2d31;      /* thanh bên, thẻ */
  --bg-3: #313338;      /* vùng nội dung chính (như kênh chat Discord) */
  --bg-4: #383a40;      /* ô nhập, hover */
  --bg-5: #404249;      /* đang chọn */
  --line: #3f4147;
  --line-2: #4e5058;
  --text: #f2f3f5;
  --text-2: #dbdee1;
  --muted: #949ba4;
  --dim: #6d6f78;
  --pink: #eb459e;
  --pink-2: #ff7cc3;
  --pink-3: #c22f7f;
  --pink-soft: rgba(235, 69, 158, .14);
  --pink-line: rgba(235, 69, 158, .45);
  --gold: var(--pink);          /* tên cũ, màu mới */
  --gold-2: var(--pink-2);
  --gold-ink: #fff;
  --green: #23a55a;
  --red: #f23f43;
  --yellow: #f0b232;
  --blurple: #5865f2;
  --link: #00a8fc;
  --display: "gg sans", "Segoe UI Variable Display", "Segoe UI", "Noto Sans", "Helvetica Neue", Roboto, Arial, sans-serif;
  --body: "gg sans", "Segoe UI Variable Text", "Segoe UI", "Noto Sans", "Helvetica Neue", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  --r-sm: 4px;
  --r: 8px;
  --r-lg: 12px;
  --shadow: 0 4px 14px rgba(0, 0, 0, .25);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, .45);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); font-size: 1rem; line-height: 1.5; color: var(--text-2); background: var(--bg-3); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--pink-2); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Nút — chữ luôn đúng tâm (flex + line-height 1), kiểu nút Discord */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 40px; padding: 0 1.1em;
  border-radius: var(--r-sm); border: 1px solid transparent; font-weight: 600; font-family: var(--body); font-size: .94rem; line-height: 1;
  text-decoration: none; cursor: pointer; white-space: nowrap; text-align: center; vertical-align: middle;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn > svg, .btn > img, .btn > .ico { flex: none; align-self: center; }
.btn:active { transform: translateY(1px); }
.btn-gold, .btn.gold, .btn-pink, .btn.pink { background: var(--pink); color: #fff; }
.btn-gold:hover, .btn.gold:hover, .btn-pink:hover, .btn.pink:hover { background: var(--pink-3); }
.btn-blurple, .btn.blurple { background: var(--blurple); color: #fff; }
.btn-blurple:hover, .btn.blurple:hover { background: #4752c4; }
.btn-ghost, .btn.ghost { background: #4e5058; color: #fff; }
.btn-ghost:hover, .btn.ghost:hover { background: #6d6f78; }
.btn-line, .btn.line { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-line:hover, .btn.line:hover { border-color: var(--muted); background: rgba(255, 255, 255, .04); }
.btn-red, .btn.red { background: var(--red); color: #fff; }
.btn-red:hover, .btn.red:hover { background: #da373c; }
.btn-sm { min-height: 32px; padding: 0 .85em; font-size: .86rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.discord-glyph { width: 1.25em; height: 1.25em; flex: none; }
.ico { width: 20px; height: 20px; flex: none; }

.bot-tag { display: inline-flex; align-items: center; gap: 2px; height: 15px; padding: 0 4px; border-radius: 3px; background: var(--blurple); color: #fff; font-size: .62rem; font-weight: 700; vertical-align: 2px; margin-left: .3rem; letter-spacing: .02em; }

/* Công tắc (dashboard có .sw riêng) */
.switch { position: relative; width: 40px; height: 24px; flex: none; display: inline-block; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #80848e; transition: background .15s ease; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s ease; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch input:checked + span { background: var(--pink); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--pink-2); outline-offset: 2px; }
.switch input:disabled + span { opacity: .5; }

.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 180%); background: #111214; color: #fff; padding: .8rem 1.2rem; border-radius: var(--r); box-shadow: var(--shadow-lg); transition: transform .25s ease; z-index: 100; max-width: min(92vw, 560px); border: 1px solid var(--line); white-space: pre-line; line-height: 1.5; }
.toast.show { transform: translate(-50%, 0); }
.toast.bad { border-color: var(--red); }
.toast.good { border-color: var(--green); }

/* Thanh trên kiểu MEE6 — dùng chung cho dashboard, trang game, bảng xếp hạng */
.xbar { position: sticky; top: 0; z-index: 60; height: 64px; background: rgba(30, 31, 34, .96); border-bottom: 1px solid rgba(255, 255, 255, .05); backdrop-filter: blur(10px); }
.xbar-in { max-width: 1240px; height: 100%; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 26px; }
.xbrand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.12rem; letter-spacing: -.01em; white-space: nowrap; }
.xbrand img { width: 34px; height: 34px; object-fit: contain; }
.xnav { display: flex; align-items: center; gap: 4px; }
.xnav > a, .xnav > .xdrop > button { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 6px; border: 0; background: none;
  color: var(--muted); font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; }
.xnav > a:hover, .xnav > .xdrop > button:hover, .xnav > a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, .05); }
.xnav > a[aria-current="page"] { color: var(--pink-2); }
.xsp { flex: 1; }
.xright { display: flex; align-items: center; gap: 10px; }
.xdrop { position: relative; }
.xdrop > button .chev { width: 14px; height: 14px; transition: transform .15s ease; }
.xdrop.open > button .chev { transform: rotate(180deg); }
.xmenu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 220px; padding: 6px; border-radius: 8px; background: #111214; box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, .06); display: none; z-index: 70; }
.xdrop.open .xmenu { display: block; }
.xmenu.left { left: 0; right: auto; }
.xmenu .xhead { padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid rgba(255, 255, 255, .07); color: var(--text); font-weight: 700; }
.xmenu .xhead small { display: block; color: var(--muted); font-weight: 400; font-size: .8rem; }
.xmenu a, .xmenu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 4px; background: none;
  color: var(--text-2); font-size: .92rem; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; }
.xmenu a:hover, .xmenu button:hover { background: var(--pink); color: #fff; }
.xmenu .danger:hover { background: var(--red); }
.xmenu .ico { width: 18px; height: 18px; }
.xmenu .xdesc { display: block; font-size: .78rem; color: var(--muted); font-weight: 400; }
.xmenu a:hover .xdesc { color: rgba(255, 255, 255, .85); }
.xuser { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 4px; border-radius: 999px; border: 1px solid var(--line-2); background: none; color: var(--text); font-weight: 600; cursor: pointer; }
.xuser img, .xuser .xav { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--bg-4); font-weight: 700; }
.xuser:hover { border-color: var(--muted); }
.xlang { display: inline-flex; align-items: center; height: 34px; border-radius: 6px; background: var(--bg-2); padding: 3px; }
.xlang button { height: 28px; padding: 0 9px; border: 0; border-radius: 4px; background: none; color: var(--muted); font-size: .78rem; font-weight: 700; cursor: pointer; }
.xlang button[aria-pressed="true"] { background: var(--bg-5); color: var(--text); }
.xmenu-btn { display: none; }
@media (max-width: 760px) {
  .xbar-in { gap: 10px; padding: 0 12px; }
  .xnav { display: none; }
  .xnav.open { display: flex; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 10px; background: #1e1f22; border-bottom: 1px solid var(--line); }
  .xnav.open > a, .xnav.open > .xdrop > button { width: 100%; justify-content: flex-start; }
  .xnav.open .xmenu { position: static; display: block; box-shadow: none; border: 0; background: transparent; }
  .xmenu-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 6px; background: none; color: var(--text); cursor: pointer; }
  .xbrand span { display: none; }
  .xuser span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
