/* =====================================================================
   MPayz: bộ giao diện
   Tối "than chì" mặc định, sáng "giấy kem"; màu nhấn hồng san hô. Phẳng, ít bo tròn.
   ===================================================================== */

:root, :root[data-theme="dark"] {
    --bg: #0f0f12;
    --bg-pattern: none;
    --bg-glow: none;
    --surface: #17171c;
    --surface-2: #1f1f26;
    --surface-3: #2c2c35;
    --border: #2a2a32;
    --text: #f5f2ef;
    --muted: #9c97a1;
    --accent: #ff5c7c;
    --accent-2: #ff8a65;
    --accent-grad: linear-gradient(135deg, #ff5c7c, #ff8a65);
    --accent-soft: rgba(255, 92, 124, 0.14);
    --accent-text: #ff8fa5;
    --mint: #34d399;
    --mint-soft: rgba(52, 211, 153, 0.12);
    --gold: #fbbf24;
    --gold-soft: rgba(251, 191, 36, 0.12);
    --sky: #7cc4ff;
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.12);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --radius: 16px;
    --radius-sm: 10px;
    color-scheme: dark;
}

:root[data-theme="light"] {
    --bg: #faf8f5;
    --bg-pattern: none;
    --bg-glow: none;
    --surface: #ffffff;
    --surface-2: #f5f1ec;
    --surface-3: #ebe5de;
    --border: #ebe5de;
    --text: #1d1a1f;
    --muted: #6f6872;
    --accent: #e8445f;
    --accent-soft: #fde8ec;
    --accent-text: #d6304d;
    --mint: #059669;
    --mint-soft: #e3f7ef;
    --gold: #b7791f;
    --gold-soft: #fdf3dc;
    --danger: #dc2626;
    --danger-soft: #fdeaea;
    --shadow: 0 1px 2px rgba(20, 30, 60, 0.06);
    color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 15px;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display { font-family: "Be Vietnam Pro", sans-serif; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
h1:focus { outline: none; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: var(--surface-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; font-size: 0.9em; }
button { font: inherit; cursor: pointer; color: inherit; }
button:disabled { opacity: 0.5; cursor: default; }
img { max-width: 100%; }

.muted { color: var(--muted); }
.small-text { font-size: 13px; }
.error { color: var(--danger); font-weight: 600; margin: 8px 0; }
.success { color: var(--mint); font-weight: 600; }
.grad-text { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ===== Nút ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border);
    background: var(--surface); font-weight: 700; color: var(--text); text-decoration: none !important;
    transition: transform 0.08s, border-color 0.15s, background 0.15s, box-shadow 0.15s; white-space: nowrap;
}
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn-primary { background: var(--accent); border-color: transparent; color: #fff; }
.btn-primary:hover:not(:disabled) { filter: brightness(1.1); border-color: transparent; }
.btn-mint { background: var(--mint); border-color: transparent; color: #0d2b23; }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--danger); }
.btn-block { width: 100%; padding: 14px; font-size: 16px; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-lg { padding: 13px 22px; font-size: 16px; }
.icon-btn {
    width: 40px; height: 40px; border-radius: var(--radius-sm); border: 1px solid var(--border);
    background: var(--surface); display: inline-flex; align-items: center; justify-content: center; font-size: 17px;
}
.icon-btn:hover { border-color: var(--accent); }
/* Nút trên thanh trên cùng cao bằng nhau. */
.topnav-right .btn, .topnav-right .icon-btn { height: 40px; box-sizing: border-box; }
.topnav-right .btn-sm { padding: 0 16px; font-size: 14px; }

/* ===== Ô nhập ===== */
.field { display: block; margin-bottom: 16px; }
.field-label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 700; margin-bottom: 7px; font-size: 14px; }
.field-label small { font-weight: 500; color: var(--muted); }
.input, .field input:not([type=checkbox]):not([type=range]):not([type=color]), .field textarea, .field select, select.input {
    width: 100%; padding: 12px 15px; border-radius: var(--radius-sm); border: 1px solid var(--border);
    background: var(--surface-2); color: var(--text); font: inherit; transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .field input:focus, .field textarea:focus, .field select:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
}
.field textarea { resize: vertical; min-height: 90px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.row-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 14px; }
.switch-row { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 12px; }
@media (max-width: 900px) { .row-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .row-2, .row-3, .row-4 { grid-template-columns: 1fr; } }
input[type=range] { width: 100%; accent-color: var(--accent); }
input[type=color] { width: 100%; height: 42px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface-2); padding: 3px; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 15px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--surface-2); font-weight: 600; cursor: pointer; margin-bottom: 14px; }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: 999px; background: var(--surface-3); position: relative; cursor: pointer; transition: background 0.2s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 22px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-title h2 { font-size: 18px; }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.pink { background: var(--accent-soft); color: var(--accent); }
.badge.green { background: var(--mint-soft); color: var(--mint); }
.badge.gold { background: var(--gold-soft); color: var(--gold); }
.badge.red { background: var(--danger-soft); color: var(--danger); }

.empty { text-align: center; color: var(--muted); padding: 22px 0; }
.empty img { width: 76px; height: 76px; display: block; margin: 0 auto 6px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; z-index: 100; box-shadow: var(--shadow); animation: toast-in 0.25s ease-out; }
@keyframes toast-in { from { transform: translate(-50%, 10px); opacity: 0; } }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--accent-soft); border-top-color: var(--accent); animation: spin 0.8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { transform: scale(0.3); opacity: 0; } to { transform: none; opacity: 1; } }

/* =====================================================================
   Trang công khai (donate, tài khoản, ví)
   ===================================================================== */

/* Bề rộng chung: gần tràn màn hình, chỉ chừa lề 2 bên. */
:root { --page-width: 1640px; --gutter: clamp(16px, 3vw, 40px); }

.ico-svg { flex: none; display: inline-block; vertical-align: middle; }

.topnav { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topnav-inner { max-width: var(--page-width); margin: 0 auto; padding: 12px var(--gutter); display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; color: var(--text); text-decoration: none !important; letter-spacing: -0.02em; }
.brand img { width: 36px; height: 36px; }
.brand .brand-logo { width: 34px; height: 34px; border-radius: 9px; }
.topnav-links { display: flex; gap: 24px; }
.topnav-links a { color: var(--muted); font-weight: 600; font-size: 15px; }
.topnav-links a:hover { color: var(--text); text-decoration: none; }
.topnav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
@media (max-width: 720px) { .topnav-links { display: none; } .topnav-inner { gap: 12px; } }
.wallet-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--gold-soft); color: var(--gold); font-weight: 700; font-size: 14px; text-decoration: none !important; border: 1px solid transparent; }
.wallet-chip:hover { border-color: var(--gold); }
.avatar-btn { width: 40px; height: 40px; border-radius: 50%; background: #f97316; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px; text-decoration: none !important; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px #f97316; }

.public-page { max-width: 760px; margin: 0 auto; padding: 16px 16px 56px; }
.public-page.donate-page { max-width: var(--page-width); padding: 0 var(--gutter) 56px; }

.btn-soft { background: var(--accent); border-color: transparent; color: #fff; }
.btn-soft:hover:not(:disabled) { filter: brightness(1.1); border-color: transparent; }
.btn-outline { background: transparent; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.panel-body { padding: 24px 28px; }
@media (max-width: 640px) { .panel-body { padding: 18px 16px; } }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 18px 24px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; }
.panel-head .ico-svg { color: var(--accent-text); }

/* Thẻ hồ sơ: ảnh bìa mờ làm nền phía sau, avatar tròn, tên, thống kê, nút */
.profile-card { position: relative; overflow: hidden; margin: 24px 0; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.profile-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.22; filter: blur(2px) saturate(1.1); }
.profile-bg:not([style]) { opacity: 1; filter: none; background-image: radial-gradient(600px 220px at 0% 0%, var(--accent-soft), transparent 70%), repeating-linear-gradient(135deg, transparent 0 18px, color-mix(in srgb, var(--border) 45%, transparent) 18px 19px); }
.profile-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--surface) 30%, color-mix(in srgb, var(--surface) 55%, transparent)); pointer-events: none; }
.profile-row { position: relative; z-index: 1; display: flex; align-items: center; gap: 24px; padding: 26px clamp(18px, 2.5vw, 36px); flex-wrap: wrap; }
.profile-avatar { width: 108px; height: 108px; border-radius: 50%; overflow: hidden; background: var(--surface-2); flex: none; box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--accent); }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-info { flex: 1; min-width: 220px; }
.profile-handle { font-size: 13px; font-weight: 600; color: var(--accent-text); }
.profile-info h1 { font-size: clamp(26px, 2.4vw, 34px); font-weight: 800; letter-spacing: -0.02em; margin-top: 2px; }
.profile-desc { margin: 6px 0 0; color: var(--muted); max-width: 640px; }
.profile-stats { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.profile-stats b { color: var(--text); }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 720px) {
    .profile-row { gap: 16px; }
    .profile-avatar { width: 80px; height: 80px; }
    .profile-actions { flex-basis: 100%; }
    .profile-card::after { background: color-mix(in srgb, var(--surface) 80%, transparent); }
}

/* Bố cục: cột trái form + bảng vàng, cột phải lịch sử cuộn riêng */
.donate-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.donate-col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.donate-side { display: flex; flex-direction: column; min-width: 0; }
.donate-side .timeline { max-height: 70vh; overflow-y: auto; }
@media (min-width: 1000px) {
    .donate-layout { grid-template-columns: minmax(0, 1.5fr) minmax(380px, 1fr); }
    .donate-side { position: sticky; top: 84px; max-height: calc(100vh - 100px); }
    .donate-side .timeline { max-height: none; flex: 1; min-height: 0; }
}
.timeline { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.panel-count { margin-left: auto; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); letter-spacing: 0; }

/* Chọn chế độ: khối bấm dạng lưới */
.segments { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; padding: 6px; border-radius: 14px; background: var(--surface-2); margin-bottom: 22px; }
.segment { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--muted); text-align: left; transition: background 0.15s, color 0.15s; }
.segment span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.segment b { font-size: 14px; }
.segment small { font-size: 11px; font-weight: 600; opacity: 0.8; }
.segment .ico-svg { width: 20px; height: 20px; }
.segment:hover { color: var(--text); }
.segment.active { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: var(--shadow); }
.segment.active .ico-svg { color: var(--accent); }
@media (max-width: 520px) { .segments { grid-template-columns: repeat(2, minmax(0, 1fr)); } .segment { padding: 10px 8px; gap: 8px; } }

/* Số tiền: số to + nút mệnh giá */
.amount-field { margin-bottom: 18px; }
.amount-big { display: block; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); transition: border-color 0.15s, box-shadow 0.15s; }
.amount-big:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.amount-label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.amount-line { display: flex; align-items: baseline; gap: 6px; }
.amount-line input { flex: 1; min-width: 0; border: none; outline: none; background: none; color: var(--text); font: inherit; font-size: clamp(28px, 3vw, 38px); font-weight: 800; letter-spacing: -0.02em; padding: 2px 0 0; -moz-appearance: textfield; }
.amount-line input::-webkit-outer-spin-button, .amount-line input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.amount-line .suffix { font-size: 22px; font-weight: 800; color: var(--muted); }
.amount-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.amount-chip { padding: 9px 4px; border-radius: 10px; border: 1px dashed var(--border); background: none; font-weight: 700; font-size: 14px; color: var(--text); }
.amount-chip:hover { border-color: var(--accent); color: var(--accent); }
.amount-chip.active { border-style: solid; border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.submit-row { display: flex; gap: 14px; align-items: stretch; flex-wrap: wrap; margin-top: 4px; }
.submit-row .effect-preview { flex: 1 1 260px; margin: 0; }
.btn-submit { flex: 1 1 260px; padding: 16px 22px; font-size: 16px; }
.option-input b { width: 22px; height: 22px; border-radius: 6px; background: var(--accent-soft); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex: none; }

/* Bảng vàng tháng: thanh so với hạng 1 */
.rank-bars { list-style: none; margin: 0; padding: 10px 24px 18px; display: flex; flex-direction: column; gap: 14px; }
.rank-bars li { display: flex; align-items: center; gap: 12px; }
.rank-pos { width: 22px; font-weight: 800; color: var(--muted); text-align: center; flex: none; }
.rank-bars li.r1 .rank-pos { color: var(--gold); }
.rank-bars img { width: 38px; height: 38px; border-radius: 50%; background: var(--surface-2); flex: none; }
.rank-body { flex: 1; min-width: 0; }
.rank-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.rank-line b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.rank-bar { height: 6px; border-radius: 999px; background: var(--surface-2); margin-top: 6px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); opacity: 0.55; }
.rank-bars li.r1 .rank-bar i { background: var(--gold); opacity: 1; }
.money { color: var(--gold); font-weight: 700; white-space: nowrap; }

/* Lịch sử: dòng thời gian theo ngày */
.timeline { padding: 0 20px 16px; }
.tl-day { position: sticky; top: 0; z-index: 2; padding: 14px 0 8px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; background: var(--surface); }
.tl-item { display: grid; grid-template-columns: 40px 14px minmax(0, 1fr); gap: 0 10px; position: relative; padding-bottom: 16px; }
.tl-item::before { content: ""; position: absolute; left: 56px; top: 14px; bottom: -2px; width: 2px; background: var(--border); }
.tl-day + .tl-item::before { top: 6px; }
.tl-time { font-size: 12px; color: var(--muted); padding-top: 4px; font-variant-numeric: tabular-nums; }
.tl-dot { width: 10px; height: 10px; margin: 6px 0 0 2px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); position: relative; z-index: 1; }
.tl-item.vip .tl-dot { border-color: var(--gold); background: var(--gold); }
.tl-item.supervip .tl-dot { border-color: var(--sky); background: var(--sky); }
.tl-item.fresh .tl-content { animation: pop 0.5s cubic-bezier(0.2, 1.5, 0.4, 1); }
.tl-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tl-head img { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); flex: none; }
.tl-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.tl-amount { margin-left: auto; font-weight: 800; font-size: 13px; color: var(--accent); white-space: nowrap; padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); }
.tl-kind { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.tl-msg { margin: 8px 0 0; padding: 2px 0 2px 12px; border-left: 3px solid var(--surface-3); font-size: 14px; overflow-wrap: anywhere; }
.tl-msg.q { font-weight: 700; border-left-color: var(--accent); }
.tl-options { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.tl-options div { padding: 7px 9px; border-radius: 8px; background: var(--surface-2); font-size: 12px; overflow-wrap: anywhere; }
.tl-options b { color: var(--accent); margin-right: 4px; }
.tl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tl-tags span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: var(--surface-2); }
.tl-tags span.song { color: var(--mint); background: var(--mint-soft); }
.timeline .empty { padding: 32px 0; }

/* Hero cũ: chỉ còn dùng ở phần xem trước trong Cài đặt trang */
.hero { text-align: center; margin-bottom: 18px; }
.hero-cover {
    height: 170px; border-radius: var(--radius); background-size: cover; background-position: center;
    background-image: radial-gradient(circle at 18% 35%, rgba(255, 255, 255, 0.35) 0, transparent 30%),
                      radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.25) 0, transparent 35%),
                      linear-gradient(120deg, #ff5c7c, #ff8a65);
    box-shadow: var(--shadow);
}
.hero-avatar { width: 116px; height: 116px; border-radius: 50%; margin: -58px auto 10px; border: 5px solid var(--bg); background: var(--surface-2); overflow: hidden; position: relative; box-shadow: var(--shadow); }
.hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hero h1 { font-size: 28px; }
.hero p { margin: 6px auto 0; color: var(--muted); max-width: 520px; }
.hero-chips { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--border); font-size: 13px; font-weight: 700; }



.amount-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
@media (max-width: 480px) { .amount-picker { grid-template-columns: repeat(2, 1fr); } }
.amount-pill { padding: 10px 4px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface-2); font-weight: 800; font-size: 14px; transition: all 0.15s; }
.amount-pill:hover { border-color: var(--accent); }
.amount-pill.active { background: var(--accent-grad); color: #fff; border-color: transparent; }
.amount-input { position: relative; }
.amount-input input { padding-right: 42px !important; font-weight: 800; font-size: 18px; }
.amount-input .suffix { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 800; }



.effect-preview { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); margin-bottom: 18px; }
.effect-preview img { width: 54px; height: 54px; flex: none; }
.effect-preview b { display: block; font-size: 14px; }
.effect-preview span { font-size: 12px; color: var(--muted); }
.effect-preview.vip { background: linear-gradient(120deg, var(--gold-soft), var(--accent-soft)); border: 1.5px solid var(--gold); }

.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 520px) { .option-grid { grid-template-columns: 1fr; } }
.option-input { display: flex; align-items: center; gap: 8px; padding-left: 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--surface-2); }
.option-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.option-input b { color: var(--accent); }
.option-input input { border: none !important; background: none !important; box-shadow: none !important; padding-left: 0 !important; }

.wheel-box { border-radius: var(--radius-sm); padding: 14px; margin-bottom: 16px; background: var(--surface-2); }
.wheel-box-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.wheel-box-head .spins { color: var(--accent); font-size: 20px; }
.prize-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
@media (max-width: 520px) { .prize-list { grid-template-columns: 1fr; } }
.prize-list li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--surface); font-size: 13px; font-weight: 600; }
.prize-list small { color: var(--muted); font-weight: 700; }

.music-preview { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 9px 13px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.music-preview.ok { background: var(--mint-soft); }
.music-preview .t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sticker-picker { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
@media (max-width: 520px) { .sticker-picker { grid-template-columns: repeat(6, 1fr); } }
.sticker-picker button { aspect-ratio: 1; border-radius: 12px; border: 2px solid transparent; background: var(--surface-2); padding: 4px; }
.sticker-picker button.active { border-color: var(--gold); background: var(--gold-soft); }
.sticker-picker img { width: 100%; height: 100%; }

/* Bước thanh toán */
.pay { text-align: center; }
.pay h2 { font-size: 20px; margin-bottom: 4px; }
.pay-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 18px; align-items: center; text-align: left; margin-top: 16px; }
@media (max-width: 620px) { .pay-grid { grid-template-columns: 1fr; } }
.qr-box { width: min(250px, 100%); aspect-ratio: 1; padding: 10px; margin: 0 auto; background: #fff; border-radius: 22px; box-shadow: 0 0 0 3px var(--accent), var(--shadow); }
.qr-box img { width: 100%; height: 100%; object-fit: contain; }
.bank-rows { border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.bank-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; }
.bank-row + .bank-row { border-top: 1px dashed var(--border); }
.bank-row span { color: var(--muted); font-size: 13px; }
.bank-row b { word-break: break-all; text-align: right; }
.bank-row .highlight { color: var(--accent); font-size: 18px; letter-spacing: 0.05em; }
.bank-row .copy { margin-left: 8px; }
.notice { background: var(--gold-soft); border-radius: 14px; padding: 10px 13px; font-size: 13px; text-align: left; margin-top: 12px; }
.waiting { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 16px 0 8px; font-weight: 700; }

.done { text-align: center; padding: 8px 0; }
.done-icon { width: 130px; height: 130px; margin: 0 auto 8px; animation: pop 0.6s cubic-bezier(0.2, 1.5, 0.4, 1) both; }
.done h2 { font-size: 22px; margin-bottom: 6px; }

/* Hộp chọn cách thanh toán (bottom sheet) */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(10, 6, 14, 0.55); backdrop-filter: blur(4px); z-index: 60; display: flex; align-items: flex-end; justify-content: center; animation: fade 0.2s; }
@media (min-width: 640px) { .sheet-backdrop { align-items: center; } }
.sheet { width: 100%; max-width: 460px; background: var(--surface); border-radius: 28px 28px 0 0; padding: 22px; box-shadow: var(--shadow); animation: sheet-up 0.25s ease-out; }
@media (min-width: 640px) { .sheet { border-radius: 28px; } }
.sheet h2 { font-size: 19px; margin-bottom: 4px; }
.pay-option { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; margin-top: 10px; border-radius: 18px; border: 2px solid var(--border); background: var(--surface-2); text-align: left; }
.pay-option.active { border-color: var(--accent); background: var(--accent-soft); }
.pay-option .ico { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; background: var(--surface); flex: none; }
.pay-option .t { flex: 1; min-width: 0; }
.pay-option .t b { display: block; }
.pay-option .t span { font-size: 12px; color: var(--muted); }
.pay-option .v { font-weight: 800; color: var(--accent); white-space: nowrap; }
.sheet-actions { display: flex; gap: 8px; margin-top: 18px; }
.sheet-actions .btn { flex: 1; }
@keyframes fade { from { opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(30px); opacity: 0; } }

/* Bức tường ủng hộ */
.wall-head { display: flex; align-items: center; gap: 8px; margin: 28px 0 12px; }
.wall-head h2 { font-size: 20px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 5px var(--mint-soft); animation: blink 1.6s infinite; }
@keyframes blink { 50% { box-shadow: 0 0 0 2px var(--mint-soft); } }

.note-options { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.note-options div { padding: 6px 9px; border-radius: 10px; background: var(--surface-2); font-size: 12px; overflow-wrap: anywhere; }
.note-options b { color: var(--accent); }

.footer { text-align: center; font-size: 12px; color: var(--muted); margin-top: 30px; }

/* Trang tài khoản / ví */
.auth-wrap { max-width: 420px; margin: 24px auto; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 999px; background: var(--surface-2); margin-bottom: 18px; }
.auth-tabs a { text-align: center; padding: 9px; border-radius: 999px; font-weight: 700; color: var(--muted); text-decoration: none !important; }
.auth-tabs a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.balance-card { border-radius: var(--radius); padding: 22px; background: var(--accent-grad); color: #fff; box-shadow: 0 16px 36px rgba(255, 92, 124, 0.3); position: relative; overflow: hidden; }
.balance-card::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255, 255, 255, 0.15); }
.balance-card .label { font-size: 13px; font-weight: 700; opacity: 0.9; }
.balance-card .value { font-size: 36px; font-weight: 700; margin: 4px 0; }
.ledger-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; }
.ledger-row + .ledger-row { border-top: 1px dashed var(--border); }
.ledger-row .ico { width: 36px; height: 36px; border-radius: 12px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; flex: none; }
.ledger-row .t { flex: 1; min-width: 0; }
.ledger-row .t span { display: block; font-size: 12px; color: var(--muted); }
.ledger-row .plus { color: var(--mint); font-weight: 800; }
.ledger-row .minus { color: var(--danger); font-weight: 800; }

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .plans { grid-template-columns: 1fr; } }
.plan { border-radius: var(--radius); padding: 20px; background: var(--surface); border: 2px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.plan.vip { border-color: var(--gold); }
.plan.supervip { border-color: transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(120deg, #7cc4ff, #ff6b9a, #ffd166) border-box; }
.plan h3 { font-size: 22px; display: flex; align-items: center; gap: 8px; }
.plan .price { font-size: 26px; font-weight: 700; }
.plan .price small { font-size: 13px; color: var(--muted); font-weight: 600; }
.plan ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14px; flex: 1; }
.plan li::before { content: "✦ "; color: var(--accent); }
.month-picker { display: flex; gap: 6px; }
.month-picker button { flex: 1; padding: 8px 4px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface-2); font-weight: 700; font-size: 13px; }
.month-picker button.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.vip-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 900; letter-spacing: 0.05em; padding: 2px 7px; border-radius: 999px; background: linear-gradient(120deg, #ffd166, #ffb36b); color: #4a2b00; }
.vip-tag.super { background: linear-gradient(120deg, #7cc4ff, #ff6b9a, #ffd166); color: #fff; }

/* =====================================================================
   Admin
   ===================================================================== */
.admin { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
@media (max-width: 900px) { .admin { grid-template-columns: 1fr; } }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 14px; background: var(--surface); border-right: 1.5px solid var(--border); display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 900px) { .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; border-right: none; border-bottom: 1.5px solid var(--border); } .side .side-group { display: none; } .side .side-foot { display: none; } }
.side .brand { margin: 0 6px 14px; }
.side-group { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin: 14px 10px 4px; }
.side a.side-link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; color: var(--text); font-weight: 600; font-size: 14px; text-decoration: none; }
.side a.side-link:hover { background: var(--surface-2); }
.side a.side-link.active { background: var(--accent-soft); color: var(--accent); }
.side a.side-link .ico { width: 22px; text-align: center; }
.side a.side-link .badge { margin-left: auto; }
.side-foot { margin-top: auto; padding-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.main { padding: 22px 28px 60px; min-width: 0; }
/* Thanh trên của GG Studio / GG Live: nút chuyển 2 phần bên trái, sáng-tối + tài khoản bên phải */
.app-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.app-top-right { display: flex; align-items: center; gap: 10px; }
.app-top-right .icon-btn { height: 40px; }
.mod-switch { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--border); }
.mod-switch a { padding: 7px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); text-decoration: none !important; white-space: nowrap; }
.mod-switch a:hover { color: var(--text); }
.mod-switch a.on { background: var(--accent); color: #fff; }
@media (max-width: 640px) { .main { padding: 16px 14px 48px; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .eyebrow { font-size: 12px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; }
.page-head h1 { font-size: 28px; margin-top: 2px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

.subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.subtab { padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface); font-weight: 700; font-size: 14px; color: var(--muted); }
.subtab.active { background: var(--accent-grad); border-color: transparent; color: #fff; }

.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }
.split > .sticky { position: sticky; top: 16px; }
.stack { display: flex; flex-direction: column; gap: 18px; }

.preview-stage { border-radius: 18px; min-height: 220px; display: flex; align-items: center; justify-content: center; padding: 16px; overflow: hidden;
    background: repeating-conic-gradient(var(--surface-2) 0% 25%, var(--surface) 0% 50%) 50% / 24px 24px; }
.preview-stage iframe { width: 100%; border: 0; background: transparent; color-scheme: light; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1.5px solid var(--border); border-radius: 22px; padding: 16px 18px; position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; right: -24px; bottom: -24px; width: 90px; height: 90px; border-radius: 50%; background: var(--accent-soft); }
.stat-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 25px; font-weight: 700; margin-top: 4px; }
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }
.grid-2-1 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; }
@media (max-width: 1000px) { .grid-2-1 { grid-template-columns: 1fr; } }

.chart { display: flex; align-items: flex-end; gap: 6px; height: 190px; padding-top: 10px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.chart-bar { width: 100%; max-width: 30px; border-radius: 10px 10px 4px 4px; min-height: 3px; background: var(--accent-grad); position: relative; }
.chart-bar:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); font-size: 12px; padding: 3px 8px; border-radius: 8px; white-space: nowrap; z-index: 2; }
.chart-label { font-size: 11px; color: var(--muted); }

.rank { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.rank + .rank { border-top: 1px dashed var(--border); }
.rank-no { width: 28px; height: 28px; border-radius: 10px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex: none; }
.ranks .rank:nth-child(1) .rank-no { background: var(--gold-soft); color: var(--gold); }
.ranks .rank:nth-child(2) .rank-no { background: rgba(180, 190, 210, 0.2); }
.ranks .rank:nth-child(3) .rank-no { background: rgba(255, 150, 90, 0.18); color: #ff9a5a; }
.rank-name { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-amount { font-weight: 800; color: var(--accent); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 11px 10px; border-bottom: 1px dashed var(--border); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
tr:last-child td { border-bottom: none; }
.num { text-align: right; }
.nowrap { white-space: nowrap; }
.amount { font-weight: 800; color: var(--accent); }
.msg { max-width: 420px; overflow-wrap: anywhere; }
.actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .input { flex: 1 1 220px; }
.toolbar select.input { flex: 0 0 170px; }
.live-controls { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px; border-radius: 18px; background: var(--surface-2); margin-bottom: 14px; align-items: center; }
.live-controls .label { font-weight: 700; font-size: 13px; color: var(--muted); margin-right: auto; }

.copy-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.copy-row .input { flex: 1 1 260px; min-width: 0; font-size: 13px; }
.seg { display: inline-flex; gap: 4px; padding: 4px; margin: 4px 0 12px; border-radius: 12px; background: var(--surface-2); }
.seg button { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 600; padding: 7px 16px; border-radius: 9px; cursor: pointer; }
.seg button.active { background: var(--accent-soft); color: var(--accent-text); }

.now-playing { display: flex; gap: 14px; align-items: center; }
.np-art { width: 76px; height: 76px; border-radius: 20px; background: var(--accent-soft); flex: none; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.np-art img { width: 100%; height: 100%; object-fit: cover; }
.np-info { flex: 1; min-width: 0; }
.np-title { font-weight: 800; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-meta { color: var(--muted); font-size: 13px; }
.controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.volume { display: flex; align-items: center; gap: 8px; margin-left: auto; min-width: 190px; }
.queue-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.queue-item + .queue-item { border-top: 1px dashed var(--border); }
.queue-no { width: 24px; color: var(--muted); font-weight: 800; text-align: center; flex: none; }
.queue-info { flex: 1; min-width: 0; }
.queue-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-meta { font-size: 12px; color: var(--muted); }

.interact-item { padding: 12px 0; }
.interact-item + .interact-item { border-top: 1px dashed var(--border); }
.interact-item.handled { opacity: 0.5; }
.interact-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.interact-top .muted { margin-left: auto; }
.interact-text { margin-top: 6px; font-weight: 700; overflow-wrap: anywhere; }
.interact-actions { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.result-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.result-tags span { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); }

.prize-editor { display: grid; grid-template-columns: minmax(0, 1fr) 90px 60px 36px; gap: 8px; align-items: center; margin-bottom: 8px; }
.prize-editor .pct { font-size: 12px; color: var(--muted); text-align: right; }
.word-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.word-chips span { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 11px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 600; }
.word-chips button { border: none; background: none; color: var(--muted); padding: 0 4px; }

.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.preset { border-radius: 16px; padding: 12px 8px; border: 2px solid var(--border); background: var(--surface-2); text-align: center; font-weight: 700; font-size: 13px; }
.preset.active { border-color: var(--accent); background: var(--accent-soft); }
.preset i { display: block; height: 26px; border-radius: 999px; margin-bottom: 8px; }

.center-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-card { width: 100%; max-width: 380px; }

/* ===== Blazor ===== */
#blazor-error-ui { background: #fff3cd; color: #333; bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); display: none; left: 0; padding: 0.6rem 1.25rem 0.7rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }
.blazor-error-boundary { background: #b32121; padding: 1rem; color: white; }
.blazor-error-boundary::after { content: "Có lỗi xảy ra." }

/* Admin nền tảng: viền nhấn khác Studio để không nhầm */
.admin-platform .side { border-right-color: var(--danger-soft); }
.admin-platform .side a.side-link.active { background: var(--danger-soft); color: var(--danger); }
.admin-platform .page-head .eyebrow { color: var(--danger); }
.detail-row td { background: var(--surface-2); }
.inline-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.inline-form .input { padding: 7px 11px; font-size: 13px; width: auto; flex: 1 1 140px; }

/* ===== Trang chủ nền tảng ===== */
.landing-hero { text-align: center; padding: 36px 0 20px; }
.landing-mascot { width: 112px; height: 112px; border-radius: 28px; box-shadow: 0 18px 40px rgba(255, 92, 124, 0.35); animation: pop 0.7s cubic-bezier(0.2, 1.5, 0.4, 1) both; }
.landing-hero h1 { font-size: clamp(30px, 6vw, 48px); line-height: 1.15; margin: 10px 0 12px; }
.landing-hero p { max-width: 620px; margin: 0 auto 22px; font-size: 16px; }
.landing-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; align-items: center; }
.landing-search { display: inline-flex; align-items: center; gap: 0; border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); padding: 4px 4px 4px 16px; }
.landing-search span { color: var(--muted); font-weight: 700; }
.landing-search input { border: none !important; background: none !important; box-shadow: none !important; padding: 8px 6px !important; width: 160px; font-weight: 700; color: var(--text); font: inherit; outline: none; }
.landing-search .btn { padding: 7px 14px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 26px 0; }
@media (max-width: 760px) { .features { grid-template-columns: repeat(2, 1fr); } }
.feature { background: var(--surface); border: 1.5px solid var(--border); border-radius: 22px; padding: 16px; }
.feature span { font-size: 28px; }
.feature b { display: block; margin: 6px 0 4px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 13px; }
.streamer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.streamer-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: 22px; padding: 16px 10px; text-align: center; color: var(--text); text-decoration: none !important; transition: transform 0.15s, border-color 0.15s; }
.streamer-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.streamer-card img { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto 8px; }
.streamer-card b { display: block; }
.streamer-card span { font-size: 12px; color: var(--muted); }

/* ===== Dành cho premium (trang donate) ===== */
.premium-box { margin: 4px 0 16px; padding: 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); }
.premium-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.premium-cta { background: var(--gold-soft); color: var(--gold); border-color: transparent; font-weight: 800; }
.premium-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.premium-slot { position: relative; }
.premium-slot .slot-main { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); text-align: left; min-height: 64px; }
.premium-slot .slot-main:hover { border-color: var(--accent); }
.premium-slot.set .slot-main { border-color: var(--accent); background: var(--accent-soft); }
.premium-slot .slot-label { font-size: 13px; color: var(--muted); }
.premium-slot .slot-value { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.premium-slot:not(.set) .slot-value { font-weight: 500; color: var(--muted); }
.premium-slot .slot-clear { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; border: none; background: transparent; color: var(--muted); font-size: 12px; }
.premium-slot .slot-clear:hover { color: var(--danger); background: var(--danger-soft); }

.picker { width: 100%; max-width: 760px; max-height: min(92vh, 900px); display: flex; flex-direction: column; background: var(--surface); border-radius: 24px 24px 0 0; box-shadow: var(--shadow); animation: sheet-up 0.25s ease-out; overflow: hidden; }
@media (min-width: 640px) { .picker { border-radius: 24px; } }
.picker-head { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.picker-head h2 { font-size: 19px; margin: 0; }
.picker-head p { margin: 2px 0 0; font-size: 13px; }
.picker-icon { width: 46px; height: 46px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 22px; border-radius: 14px; background: var(--accent-soft); }
.picker-x { margin-left: auto; flex: none; }
.picker-body { padding: 16px 20px; overflow-y: auto; flex: 1; min-height: 0; }
.picker-preview { border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 14px; background: repeating-conic-gradient(#1c1c24 0% 25%, #23232c 0% 50%) 0 0 / 22px 22px; }
/* Khung overlay thật cao 500px, thu nhỏ còn 60% để thấy trọn thẻ thông báo. */
.picker-preview { height: 300px; }
.picker-preview iframe { color-scheme: light; display: block; width: calc(100% / 0.6); height: 500px; border: 0; transform: scale(0.6); transform-origin: 0 0; }
.picker-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); }
.pick-group { margin: 14px 0 8px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.pick-grid.chips { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.pick-grid.memes { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.pick-tile, .pick-chip, .pick-meme { border: 1.5px solid var(--border); background: var(--surface-2); border-radius: var(--radius-sm); color: var(--text); }
.pick-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; font-weight: 700; font-size: 13px; text-align: center; }
.pick-tile small { font-weight: 500; font-size: 11px; }
.pick-emoji { font-size: 34px; line-height: 1.1; }
.pick-chip { padding: 10px 12px; font-weight: 600; font-size: 14px; }
.pick-meme { padding: 4px; aspect-ratio: 1; overflow: hidden; }
.pick-meme img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; display: block; }
.pick-tile:hover, .pick-chip:hover, .pick-meme:hover { border-color: var(--accent); }
.pick-tile.active, .pick-chip.active, .pick-meme.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent-soft); }
.voice-list { display: flex; flex-direction: column; gap: 8px; }
.voice-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--surface-2); cursor: pointer; font-weight: 600; }
.voice-row:hover, .voice-row.active { border-color: var(--accent); }
.voice-row.active { background: var(--accent-soft); }
.picker-more { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.giphy-credit { margin-left: auto; font-size: 11px; font-weight: 800; letter-spacing: 0.04em; color: var(--muted); }

/* Ghi âm lời nhắn */
.voice-recorder .rec-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px dashed var(--border); background: var(--surface-2); }
.voice-recorder .rec-row.recording { border-style: solid; border-color: var(--danger); background: var(--danger-soft); }
.voice-recorder audio { height: 36px; flex: 1; min-width: 200px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: rec-blink 1s infinite; }
@keyframes rec-blink { 50% { opacity: 0.2; } }
.wheel-picker { margin-bottom: 10px; }

/* Thư viện ảnh / âm thanh trong Studio */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.lib-item { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--surface-2); font-size: 11px; font-weight: 700; text-align: center; color: var(--text); }
.lib-item img { width: 100%; height: 100%; object-fit: contain; }
.lib-item:hover, .lib-item.active { border-color: var(--accent); }
.lib-item.active { background: var(--accent-soft); }
.lib-emoji { font-size: 26px; }
.sound-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.sound-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 12px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--surface-2); font-weight: 600; font-size: 14px; cursor: pointer; min-height: 44px; }
.sound-item:hover, .sound-item.active { border-color: var(--accent); }
.sound-item.active { background: var(--accent-soft); }
.sound-item .icon-btn { width: 32px; height: 32px; flex: none; }

/* Trang cài đặt kiểu tab lớn + tab con */
.maintabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.maintab { padding: 10px 14px; border: none; background: none; color: var(--muted); font-weight: 700; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.maintab.active { color: var(--accent); border-bottom-color: var(--accent); }
.pilltabs { display: flex; gap: 4px; padding: 4px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); overflow-x: auto; }
.pilltab { flex: 1; white-space: nowrap; padding: 9px 12px; border: none; border-radius: 8px; background: none; color: var(--muted); font-weight: 600; font-size: 13px; }
.pilltab.active { background: var(--accent-soft); color: var(--accent); }
.card-head { margin-bottom: 14px; }
.card-head h2 { font-size: 17px; margin: 0; }
.card-head p { margin: 4px 0 0; font-size: 13px; }
.card-head.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.link-reset { border: none; background: none; color: var(--accent-text); font-size: 12px; font-weight: 600; margin-left: auto; padding: 0; }
.field-label .link-reset { float: right; }
.input-suffix { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); overflow: hidden; }
.input-suffix input { border: none !important; background: transparent !important; flex: 1; min-width: 0; }
.input-suffix small { padding: 0 12px; color: var(--muted); border-left: 1px solid var(--border); font-size: 12px; }
.pill-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); font-size: 13px; font-weight: 600; cursor: pointer; }
.pill-toggle input { appearance: none; width: 34px; height: 20px; border-radius: 999px; background: var(--surface-3); position: relative; cursor: pointer; margin: 0; }
.pill-toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.pill-toggle input:checked { background: var(--accent); }
.pill-toggle input:checked::after { transform: translateX(14px); }
.preview-card { overflow: hidden; }
.preview-head, .preview-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; font-weight: 700; }
.preview-head { border-bottom: 1px solid var(--border); }
.preview-foot { font-weight: 500; font-size: 13px; }
.preview-card .preview-foot { padding: 8px 0 0; }
.preview-head .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-right: 6px; }
.preview-head .dot.on { background: var(--mint); }
.preview-card .preview-stage { border-radius: 14px; }
.voice-default { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--surface-2); }
.voice-default div { display: flex; flex-direction: column; gap: 2px; }
.prize-editor.head { font-size: 12px; color: var(--muted); font-weight: 700; }

/* Chọn màu (thẻ QR) */
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--border); padding: 0; cursor: pointer; position: relative; }
.swatch.active { outline: 2px solid var(--accent); outline-offset: 2px; }
.swatch.custom { background: conic-gradient(#ef4444, #f59e0b, #22c55e, #06b6d4, #7c5cff, #ec4899, #ef4444); overflow: hidden; }
.swatch.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.angle-picker { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.angle-picker button { height: 38px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--surface-2); font-size: 18px; color: var(--text); }
.angle-picker button.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.gradient-bar { height: 28px; border-radius: var(--radius-sm); margin-top: 10px; border: 1px solid var(--border); }

/* Đăng nhập Google / quên mật khẩu */
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; color: #1f1f1f; border: 1px solid #dadce0; font-weight: 700; }
.btn-google:hover { background: #f7f8f8; color: #1f1f1f; }
.auth-or { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--muted); font-size: 12px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-links { display: flex; justify-content: space-between; margin: -4px 0 14px; font-size: 13px; }
.notice { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--mint-soft); color: var(--mint); font-size: 14px; font-weight: 600; margin-bottom: 14px; }

/* ===== Trang chủ ===== */
.home { --ha1: #ff5c7c; --ha2: #ff8a65; position: relative; max-width: 1120px; margin: 0 auto; padding: 0 16px 24px; overflow: hidden; }
.home.accent-purple { --ha1: #8b5cf6; --ha2: #ec4899; }
.home.accent-blue { --ha1: #3b82f6; --ha2: #22d3ee; }
.home.accent-green { --ha1: #10b981; --ha2: #84cc16; }
.home.accent-gold { --ha1: #f59e0b; --ha2: #ef4444; }
.home-glow { position: absolute; left: 0; right: 0; top: -120px; height: 620px; pointer-events: none; z-index: 0;
    background: radial-gradient(closest-side at 25% 45%, color-mix(in srgb, var(--ha1) 26%, transparent), transparent),
                radial-gradient(closest-side at 78% 35%, color-mix(in srgb, var(--ha2) 22%, transparent), transparent); }
.home > :not(.home-glow) { position: relative; z-index: 1; }
.home-hero { text-align: center; padding: 56px 0 24px; }
.home-badge { display: inline-block; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
    background: color-mix(in srgb, var(--ha1) 14%, transparent); color: var(--ha1); border: 1px solid color-mix(in srgb, var(--ha1) 30%, transparent); }
.home-title { font-size: clamp(34px, 6vw, 64px); line-height: 1.08; font-weight: 800; letter-spacing: -0.02em; margin: 18px auto 14px; max-width: 900px; }
.home-hl { background: linear-gradient(120deg, var(--ha1), var(--ha2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home-sub { max-width: 640px; margin: 0 auto; color: var(--muted); font-size: 17px; line-height: 1.6; }
.home-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.home-cta { background: linear-gradient(120deg, var(--ha1), var(--ha2)); border: none; box-shadow: 0 10px 30px color-mix(in srgb, var(--ha1) 40%, transparent); }
.home-cta:hover { transform: translateY(-1px); }
.home-search { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface); padding: 4px 4px 4px 14px; }
.home-search span { color: var(--muted); font-weight: 700; }
.home-search input { border: none; background: transparent; width: 150px; padding: 8px 4px; color: var(--text); outline: none; }
.home-search button { display: inline-flex; align-items: center; gap: 4px; border: none; border-radius: 10px; padding: 8px 12px 8px 14px; font: inherit; font-size: 14px; font-weight: 600; background: var(--accent); color: #fff; cursor: pointer; transition: filter 0.15s; }
.home-search button:hover { filter: brightness(1.1); }
.home-search button svg { width: 16px; height: 16px; }
.home-stats { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 34px; }
.home-stats div { min-width: 150px; padding: 14px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.home-stats b { display: block; font-size: 28px; font-weight: 800; }
.home-stats span { color: var(--muted); font-size: 13px; }
.home-demo { position: relative; max-width: 560px; height: 190px; margin: 40px auto 0; }
.demo-card { position: absolute; left: 50%; top: 40px; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; text-align: left;
    padding: 14px 22px 14px 14px; border-radius: 22px; background: var(--surface); border: 2px solid color-mix(in srgb, var(--ha1) 55%, transparent);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), 0 0 40px color-mix(in srgb, var(--ha1) 25%, transparent); animation: demo-float 4s ease-in-out infinite; }
.demo-card img { width: 70px; height: 70px; }
.demo-title { font-size: 18px; white-space: nowrap; } .demo-title b { color: var(--ha1); } .demo-title span { color: var(--ha2); font-weight: 800; }
.demo-msg { color: var(--muted); margin-top: 2px; }
.demo-chip { position: absolute; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--surface); border: 1px solid var(--border);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25); white-space: nowrap; animation: demo-float 5s ease-in-out infinite; }
.demo-chip.c1 { left: 0; top: 0; animation-delay: -1s; }
.demo-chip.c2 { right: 0; top: 10px; animation-delay: -2s; }
.demo-chip.c3 { left: 50%; bottom: 0; transform: translateX(-50%); animation-name: demo-float-c; }
@keyframes demo-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes demo-float-c { 0%, 100% { translate: 0 0; } 50% { translate: 0 6px; } }
@media (max-width: 640px) { .demo-chip.c1, .demo-chip.c2 { display: none; } }
.home-section { margin-top: 64px; }
.home-h2 { text-align: center; font-size: clamp(24px, 3.5vw, 34px); font-weight: 800; margin-bottom: 24px; }
.home-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.home-feature { padding: 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s; }
.home-feature:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--ha1) 50%, transparent); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2); }
.hf-icon { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; font-size: 24px; border-radius: 14px;
    background: color-mix(in srgb, var(--ha1) 14%, transparent); margin-bottom: 12px; }
.home-feature b { display: block; font-size: 17px; margin-bottom: 4px; }
.home-feature p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.home-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; counter-reset: step; }
.home-step { padding: 22px; border-radius: 20px; background: linear-gradient(160deg, color-mix(in srgb, var(--ha1) 10%, var(--surface)), var(--surface)); border: 1px solid var(--border); }
.hs-no { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 50%; font-weight: 800; color: #fff;
    background: linear-gradient(120deg, var(--ha1), var(--ha2)); margin-bottom: 12px; }
.home-step b { display: block; font-size: 17px; margin-bottom: 4px; }
.home-step p { margin: 0; color: var(--muted); font-size: 14px; }
.home-streamers { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.home-streamer { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 0 16px; border-radius: 20px; overflow: hidden;
    background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none !important; transition: transform 0.2s, box-shadow 0.2s; }
.home-streamer:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25); }
.hs-cover { width: 100%; height: 76px; background: linear-gradient(120deg, var(--ha1), var(--ha2)); background-size: cover; background-position: center; }
.hs-avatar { width: 76px; height: 76px; margin-top: -38px; border-radius: 50%; border: 4px solid var(--surface); background: var(--surface-2); overflow: hidden; }
.hs-avatar img { width: 100%; height: 100%; object-fit: cover; }
.home-streamer b { margin-top: 8px; }
.home-streamer span { font-size: 13px; }
.hs-go { margin-top: 8px; padding: 5px 14px; border-radius: 999px; font-weight: 700; color: var(--ha1); background: color-mix(in srgb, var(--ha1) 12%, transparent); }
.home-faq { max-width: 760px; margin-left: auto; margin-right: auto; }
.home-faq details { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); margin-bottom: 10px; padding: 0 18px; }
.home-faq summary { cursor: pointer; padding: 16px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; }
.home-faq summary::after { content: "+"; font-size: 20px; color: var(--muted); }
.home-faq details[open] summary::after { content: "−"; }
.home-faq p { margin: 0 0 16px; color: var(--muted); line-height: 1.6; }
.home-band { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-top: 64px; padding: 30px 34px; border-radius: 26px;
    background: linear-gradient(120deg, var(--ha1), var(--ha2)); color: #fff; }
.home-band h2 { font-size: 26px; margin: 0 0 4px; }
.home-band p { margin: 0; opacity: 0.9; }
.home-band .btn { background: #fff; color: #111; border: none; font-weight: 800; }

/* Sửa trang chủ (admin) */
.accent-picker { display: flex; gap: 8px; }
.accent-dot { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border); cursor: pointer; }
.accent-dot.active { box-shadow: 0 0 0 2px var(--accent); }
.accent-dot.accent-pink { background: linear-gradient(120deg, #ff5c7c, #ff8a65); }
.accent-dot.accent-purple { background: linear-gradient(120deg, #8b5cf6, #ec4899); }
.accent-dot.accent-blue { background: linear-gradient(120deg, #3b82f6, #22d3ee); }
.accent-dot.accent-green { background: linear-gradient(120deg, #10b981, #84cc16); }
.accent-dot.accent-gold { background: linear-gradient(120deg, #f59e0b, #ef4444); }
.item-editor { padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); margin-bottom: 8px; }
.item-row { display: flex; gap: 6px; margin-bottom: 6px; }
.item-row .item-icon { width: 56px; text-align: center; font-size: 18px; }
.item-row .item-title { flex: 1; min-width: 0; font-weight: 700; }
.item-row .icon-btn { width: 36px; height: 36px; flex: none; }
.item-editor textarea { width: 100%; }
.home-preview { height: 640px; overflow: hidden; }
.home-preview iframe { width: 250%; height: 1600px; border: 0; transform: scale(0.4); transform-origin: 0 0; }

/* Ảnh đại diện + menu tài khoản */
.user-avatar { width: var(--size, 36px); height: var(--size, 36px); border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center;
    object-fit: cover; background: var(--surface-2); }
.user-avatar.letter { background: linear-gradient(135deg, #ff8a3d, #ff5c7c); color: #fff; font-weight: 800; font-size: calc(var(--size, 36px) * 0.42); }
.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; border-radius: 50%; padding: 2px; border: 2px solid transparent; display: flex; transition: border-color 0.2s; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover, .user-menu[open] summary { border-color: var(--accent); }
.user-menu-panel { position: absolute; right: 0; top: calc(100% + 10px); width: 300px; padding: 8px; border-radius: 18px; z-index: 50;
    background: var(--surface); border: 1px solid var(--border); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35); animation: um-in 0.16s ease-out; }
@keyframes um-in { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: none; } }
.um-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.um-head div { display: flex; flex-direction: column; min-width: 0; }
.um-head b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-head span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; color: var(--text); text-decoration: none !important; }
.um-item:hover { background: var(--surface-2); }
.um-item > span { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 17px; background: var(--surface-2); flex: none; }
.um-item div { display: flex; flex-direction: column; min-width: 0; }
.um-item b { font-size: 14px; }
.um-item small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-item.primary > span { background: var(--accent-soft); }
.um-item.danger b { color: var(--danger); }
.um-sep { height: 1px; background: var(--border); margin: 6px 4px; }
@media (max-width: 480px) { .user-menu-panel { position: fixed; left: 12px; right: 12px; width: auto; top: 64px; } }

/* Trang hồ sơ */
.profile-card { overflow: hidden; }
.profile-banner { height: 110px; background: radial-gradient(400px 120px at 20% 0%, rgba(255, 255, 255, 0.25), transparent), linear-gradient(120deg, #ff5c7c, #8b5cf6 60%, #3b82f6); }
.profile-body { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-top: -56px; }
.profile-avatar { padding: 5px; border-radius: 50%; background: var(--surface); }
.profile-id { flex: 1; min-width: 200px; }
.profile-id h1 { font-size: 26px; margin: 0; }
.profile-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.profile-actions { display: flex; gap: 8px; }
.avatar-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.tl-avatar { border-radius: 50%; }
.option-input .correct-btn { flex: none; width: 34px; height: 34px; margin-right: 4px; border-radius: 8px; border: 1.5px solid var(--border); background: var(--surface); color: var(--muted); font-weight: 900; cursor: pointer; }
.option-input .correct-btn:disabled { opacity: 0.35; cursor: default; }
.option-input.correct { border-color: var(--mint); background: var(--mint-soft); }
.option-input.correct .correct-btn { background: var(--mint); border-color: var(--mint); color: #fff; }
.note-options .correct { border-color: var(--mint) !important; background: var(--mint-soft) !important; }

/* Trang link bio / nhúng */
.bio-page { min-height: 100vh; display: flex; justify-content: center; align-items: flex-start; padding: 24px 16px;
    background: radial-gradient(500px 300px at 20% 0%, rgba(255, 92, 124, 0.22), transparent), radial-gradient(500px 300px at 90% 10%, rgba(139, 92, 246, 0.2), transparent), var(--bg); }
.bio-page.embed { min-height: 0; padding: 0; background: transparent; }
.bio-card { width: 100%; max-width: 420px; padding: 20px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25); }
.bio-page.embed .bio-card { box-shadow: none; }
.bio-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.bio-head h1 { font-size: 20px; margin: 0; }
.bio-head span { font-size: 13px; }
.bio-avatar { width: 60px; height: 60px; border-radius: 50%; overflow: hidden; flex: none; background: var(--surface-2); border: 3px solid var(--accent-soft); }
.bio-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bio-amount { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); padding-right: 14px; }
.bio-amount input { border: none !important; background: transparent !important; font-size: 26px; font-weight: 800; flex: 1; min-width: 0; color: var(--accent); }
.bio-amount span { font-size: 22px; font-weight: 800; color: var(--muted); }
.bio-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.bio-chips button { padding: 8px 4px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface-2); font-weight: 700; color: var(--text); }
.bio-chips button.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.bio-submit { padding: 14px; font-size: 16px; }
.bio-more { display: block; text-align: center; margin-top: 12px; font-size: 13px; }
.bio-qr { background: #fff; border-radius: 18px; padding: 10px; margin: 0 auto 12px; max-width: 300px; }
.bio-qr img { width: 100%; display: block; }
.bio-done { text-align: center; padding: 10px 0; }
.bio-done img { width: 110px; height: 110px; }
.bio-foot { text-align: center; font-size: 11px; color: var(--muted); margin: 14px 0 0; }
.bio-share { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; }
.bio-share-qr { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bio-share-qr img { width: 150px; height: 150px; background: #fff; border-radius: 14px; padding: 6px; }
@media (max-width: 720px) { .bio-share { grid-template-columns: 1fr; } }

/* Khung chọn sticker */
.stk-picker { border: 1px solid var(--border); border-radius: 16px; background: var(--surface-2); padding: 10px; }
.stk-top { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.stk-tabs { display: flex; gap: 6px; overflow-x: auto; flex: 1 1 auto; scrollbar-width: thin; padding-bottom: 2px; }
.stk-tabs button { white-space: nowrap; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-weight: 700; font-size: 13px; }
.stk-tabs button.active { background: var(--accent-grad); color: #fff; border-color: transparent; }
.stk-search { flex: 0 1 220px; min-width: 160px; }
.stk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--tile, 76px), 1fr)); gap: 8px; max-height: 340px; overflow-y: auto; padding: 2px; }
.stk-tile { aspect-ratio: 1; border-radius: 16px; border: 2px solid transparent; background: var(--surface); padding: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; }
.stk-tile img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.18)); }
.stk-tile:hover { transform: translateY(-2px) scale(1.04); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.stk-tile.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }
.stk-tile.none span { font-size: 26px; }
.stk-tile.none small { font-size: 10px; font-weight: 700; text-align: center; color: var(--muted); line-height: 1.2; }

/* ===== Trang link bio tùy chỉnh ===== */
.lb-page { min-height: 100vh; }
.lb {
    --lb-bg: linear-gradient(160deg, #ffe0f0, #e3dcff 55%, #d5ecff);
    --lb-text: #2b2238; --lb-muted: #6d6380; --lb-surface: rgba(255, 255, 255, 0.62); --lb-border: rgba(255, 255, 255, 0.85);
    --lb-accent: #ff5c9e; --lb-shadow: 0 10px 30px rgba(90, 60, 140, 0.16);
    --lb-radius: 22px; --lb-btn-radius: 18px;
    position: relative; overflow: hidden; min-height: 100vh; isolation: isolate;
    color: var(--lb-text); font-family: "Be Vietnam Pro", system-ui, sans-serif;
    /* Form donate dùng lại biến của site */
    --text: var(--lb-text); --muted: var(--lb-muted); --accent: var(--lb-accent); --accent-text: var(--lb-accent);
    --accent-soft: color-mix(in srgb, var(--lb-accent) 16%, transparent); --border: color-mix(in srgb, var(--lb-text) 14%, transparent);
    --surface: var(--lb-surface); --surface-2: color-mix(in srgb, var(--lb-surface) 70%, var(--lb-text) 4%);
}
.lb::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--lb-bg); }
.lb-theme-midnight { --lb-bg: radial-gradient(circle at 20% 0%, #4b2a8a, transparent 55%), radial-gradient(circle at 90% 90%, #a0287a, transparent 50%), #120c22;
    --lb-text: #f4efff; --lb-muted: #b7a9d6; --lb-surface: rgba(255, 255, 255, 0.07); --lb-border: rgba(255, 255, 255, 0.14); --lb-accent: #b18cff; --lb-shadow: 0 12px 40px rgba(0, 0, 0, 0.45); }
.lb-theme-sunset { --lb-bg: linear-gradient(170deg, #ff9a8b, #ff6a88 45%, #ff99ac); --lb-text: #3a1020; --lb-muted: #7d3a4c; --lb-surface: rgba(255, 255, 255, 0.55); --lb-accent: #d6215b; }
.lb-theme-mint { --lb-bg: linear-gradient(160deg, #d4fc79, #96e6a1); --lb-text: #173a26; --lb-muted: #3f6b50; --lb-surface: rgba(255, 255, 255, 0.6); --lb-accent: #12a150; }
.lb-theme-ocean { --lb-bg: linear-gradient(170deg, #2e3192, #1bffff); --lb-text: #f0fbff; --lb-muted: #c9ecf5; --lb-surface: rgba(255, 255, 255, 0.14); --lb-border: rgba(255, 255, 255, 0.3); --lb-accent: #00e0ff; }
.lb-theme-paper { --lb-bg: #f6f3ee; --lb-text: #1d1a1f; --lb-muted: #706a75; --lb-surface: #ffffff; --lb-border: #e7e0d7; --lb-accent: #1d1a1f; --lb-shadow: 0 6px 20px rgba(0, 0, 0, 0.06); }
.lb-theme-neon { --lb-bg: radial-gradient(circle at 50% -10%, #3a0b5c, #07040d 60%); --lb-text: #fff; --lb-muted: #a59cc0; --lb-surface: rgba(20, 10, 35, 0.75);
    --lb-border: #39ff14; --lb-accent: #39ff14; --lb-shadow: 0 0 18px rgba(57, 255, 20, 0.35); }
.lb-theme-peach { --lb-bg: linear-gradient(160deg, #ffecd2, #fcb69f); --lb-text: #4a2414; --lb-muted: #8a5a45; --lb-surface: rgba(255, 255, 255, 0.6); --lb-accent: #f0643c; }
.lb-theme-mono { --lb-bg: #0d0d0f; --lb-text: #f2f2f2; --lb-muted: #9a9a9f; --lb-surface: #19191c; --lb-border: #2c2c31; --lb-accent: #ffffff; --lb-shadow: none; }
.lb-theme-candy { --lb-bg: linear-gradient(135deg, #fbc2eb, #a6c1ee 50%, #fdfd96); --lb-text: #3a2050; --lb-muted: #6e5585; --lb-surface: rgba(255, 255, 255, 0.65); --lb-accent: #ff3fa4; }
.lb-has-image { --lb-text: #fff; --lb-muted: rgba(255, 255, 255, 0.82); --lb-surface: rgba(20, 16, 28, 0.45); --lb-border: rgba(255, 255, 255, 0.22); }
.lb-font-nunito { font-family: "Nunito", system-ui, sans-serif; }
.lb-font-lora { font-family: "Lora", Georgia, serif; }
.lb-font-dancing h1, .lb-font-dancing h2, .lb-font-dancing h3 { font-family: "Dancing Script", cursive; font-size: 1.25em; }
.lb-font-mono { font-family: "Space Mono", ui-monospace, monospace; }
.lb-font-baloo { font-family: "Baloo 2", system-ui, sans-serif; }
.lb-corner-pill { --lb-radius: 28px; --lb-btn-radius: 999px; }
.lb-corner-square { --lb-radius: 6px; --lb-btn-radius: 6px; }

.lb-inner { position: relative; z-index: 1; max-width: 480px; margin: 0 auto; padding: 36px 16px 28px; display: flex; flex-direction: column; gap: 14px; }
.lb-share { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--lb-border);
    background: var(--lb-surface); color: var(--lb-text); font-size: 18px; backdrop-filter: blur(10px); cursor: pointer; }
.lb-head { text-align: center; margin-bottom: 6px; }
.lb-head h1 { font-size: 24px; font-weight: 800; margin: 12px 0 4px; letter-spacing: -0.01em; }
.lb-sub { margin: 0 auto; max-width: 360px; color: var(--lb-muted); font-size: 14px; line-height: 1.5; white-space: pre-line; }
.lb-avatar { width: 104px; height: 104px; margin: 0 auto; border-radius: 50%; padding: 4px; position: relative; }
.lb-avatar-img { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: var(--lb-surface); border: 3px solid var(--lb-surface); position: relative; z-index: 1; }
.lb-avatar-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-frame-ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%;
    background: conic-gradient(#ff5c9e, #ffb86b, #ffe66b, #6bffb8, #6bc5ff, #b18cff, #ff5c9e); animation: lb-spin 6s linear infinite; }
.lb-frame-glow .lb-avatar-img { box-shadow: 0 0 0 3px var(--lb-accent), 0 0 28px var(--lb-accent); }
@keyframes lb-spin { to { transform: rotate(360deg); } }
.lb-socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.lb-social { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--lb-surface); border: 1px solid var(--lb-border);
    font-size: 18px; text-decoration: none; transition: transform 0.15s; backdrop-filter: blur(10px); }
.lb-social:hover { transform: translateY(-3px) scale(1.06); text-decoration: none; }
.lb-social { color: #fff; font-weight: 800; border: none; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18); }
.lb-social-tiktok { background: #111; text-shadow: -1.5px -1px 0 #25f4ee, 1.5px 1px 0 #fe2c55; font-size: 20px; }
.lb-social-youtube { background: #ff0033; font-size: 15px; }
.lb-social-facebook { background: #1877f2; font-family: Arial, sans-serif; font-size: 22px; }
.lb-social-instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); font-size: 20px; }
.lb-social-discord { background: #5865f2; }
.lb-social-zalo { background: #0068ff; font-size: 11px; }
.lb-social-x { background: #000; font-size: 17px; }
.lb-social-twitch { background: #9146ff; }
.lb-social-shopee { background: #ee4d2d; }
.lb-social-email { background: #ea4335; }
.lb-social-website { background: var(--lb-accent); }

.lb-block { display: block; background: var(--lb-surface); border: 1px solid var(--lb-border); border-radius: var(--lb-radius); padding: 16px;
    box-shadow: var(--lb-shadow); color: var(--lb-text); text-decoration: none; animation: lb-in 0.5s both; }
.lb-card-glass .lb-block, .lb-card-glass .lb-share { backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); }
.lb-card-solid .lb-block { background: color-mix(in srgb, var(--lb-surface) 100%, transparent); --lb-surface: color-mix(in srgb, white 92%, var(--lb-accent)); }
.lb-theme-midnight.lb-card-solid .lb-block, .lb-theme-neon.lb-card-solid .lb-block, .lb-theme-mono.lb-card-solid .lb-block, .lb-theme-ocean.lb-card-solid .lb-block,
.lb-has-image.lb-card-solid .lb-block { --lb-surface: color-mix(in srgb, #15121c 88%, var(--lb-accent)); }
.lb-card-outline .lb-block { background: transparent; border: 2px solid var(--lb-text); box-shadow: none; }
.lb-inner > .lb-block:nth-child(2) { animation-delay: 0.05s; } .lb-inner > .lb-block:nth-child(3) { animation-delay: 0.1s; }
.lb-inner > .lb-block:nth-child(4) { animation-delay: 0.15s; } .lb-inner > .lb-block:nth-child(5) { animation-delay: 0.2s; }
@keyframes lb-in { from { opacity: 0; transform: translateY(14px); } }
a.lb-block { transition: transform 0.15s, box-shadow 0.15s; }
a.lb-block:hover { transform: translateY(-2px) scale(1.01); text-decoration: none; }
.lb-block-head { margin-bottom: 12px; text-align: center; }
.lb-block-head h3 { margin: 0; font-size: 17px; font-weight: 800; }
.lb-block-head p, .lb-muted { margin: 4px 0 0; color: var(--lb-muted); font-size: 13px; white-space: pre-line; }
.lb-hot { animation: lb-in 0.5s both, lb-wiggle 3.2s 1s infinite; box-shadow: 0 0 0 2px var(--lb-accent), 0 10px 30px color-mix(in srgb, var(--lb-accent) 35%, transparent); }
@keyframes lb-wiggle { 0%, 88%, 100% { transform: rotate(0); } 91% { transform: rotate(-2deg) scale(1.02); } 94% { transform: rotate(2deg) scale(1.02); } 97% { transform: rotate(-1deg); } }

.lb-bank-qr { background: #fff; border-radius: calc(var(--lb-radius) - 6px); padding: 8px; max-width: 280px; margin: 0 auto; }
.lb-bank-qr img { width: 100%; display: block; }
.lb-bank-info { margin-top: 12px; display: grid; gap: 6px; font-size: 14px; }
.lb-bank-info > div { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 8px 12px; border-radius: 12px;
    background: color-mix(in srgb, var(--lb-text) 5%, transparent); }
.lb-bank-info span { color: var(--lb-muted); font-size: 12px; }
.lb-bank-info b { margin-left: auto; }
.lb-copy { border: none; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; background: var(--lb-accent); color: #fff; cursor: pointer; }
.lb-copy.done { background: #12a150; }

.lb-image { padding: 0; overflow: hidden; }
.lb-image-pic img { width: 100%; display: block; aspect-ratio: 16 / 10; object-fit: cover; }
.lb-image-body { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.lb-image-body > div { flex: 1; min-width: 0; }
.lb-image-body h3 { margin: 0; font-size: 16px; font-weight: 800; }
.lb-image-body p { margin: 4px 0 0; color: var(--lb-muted); font-size: 13px; white-space: pre-line; }
.lb-image-row { display: flex; align-items: center; }
.lb-image-row .lb-image-pic { flex: none; width: 96px; align-self: stretch; }
.lb-image-row .lb-image-pic img { height: 100%; aspect-ratio: auto; min-height: 84px; }
.lb-image-row .lb-image-body { flex: 1; }
.lb-arrow { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--lb-accent); color: #fff; font-weight: 800; font-size: 18px; transition: transform 0.15s; }
a.lb-block:hover .lb-arrow { transform: translateX(3px); }
.lb-theme-neon .lb-arrow, .lb-theme-mono .lb-arrow { color: #000; }

.lb-link { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-radius: var(--lb-btn-radius); }
.lb-link-emoji { font-size: 24px; width: 40px; text-align: center; flex: none; }
.lb-link-thumb { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex: none; }
.lb-link-text { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: center; }
.lb-link-text b { font-size: 15px; }
.lb-link-text small { color: var(--lb-muted); font-size: 12px; }
.lb-link .lb-arrow { width: 32px; height: 32px; font-size: 15px; }

.lb-video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: calc(var(--lb-radius) - 8px); overflow: hidden; background: #000; }
.lb-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.lb-top ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lb-top li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--lb-text) 5%, transparent); }
.lb-top .lb-rank-1 { background: linear-gradient(90deg, rgba(255, 210, 60, 0.35), transparent); }
.lb-top .lb-rank-2 { background: linear-gradient(90deg, rgba(200, 210, 225, 0.4), transparent); }
.lb-top .lb-rank-3 { background: linear-gradient(90deg, rgba(220, 140, 80, 0.3), transparent); }
.lb-medal { width: 26px; text-align: center; font-weight: 800; }
.lb-top-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.lb-text { text-align: center; background: transparent; border: none; box-shadow: none; backdrop-filter: none !important; padding: 4px 8px; }
.lb-text h2 { margin: 0; font-size: 18px; font-weight: 800; }
.lb-text p { margin: 6px 0 0; color: var(--lb-muted); font-size: 14px; white-space: pre-line; line-height: 1.55; }

.lb-donate .field-label { color: var(--lb-text); }
.lb-donate input, .lb-donate textarea { background: color-mix(in srgb, var(--lb-surface) 60%, white 25%); color: var(--lb-text); }
.lb-theme-midnight .lb-donate input, .lb-theme-midnight .lb-donate textarea, .lb-theme-neon .lb-donate input, .lb-theme-neon .lb-donate textarea,
.lb-theme-mono .lb-donate input, .lb-theme-mono .lb-donate textarea, .lb-theme-ocean .lb-donate input, .lb-theme-ocean .lb-donate textarea,
.lb-has-image .lb-donate input, .lb-has-image .lb-donate textarea { background: rgba(0, 0, 0, 0.25); }
.lb-donate .btn-primary { background: var(--lb-accent); border-radius: var(--lb-btn-radius); }
.lb-theme-neon .lb-donate .btn-primary, .lb-theme-mono .lb-donate .btn-primary { color: #000; }
.lb-donate .bank-rows { background: transparent; }

.lb-brand { display: block; text-align: center; margin-top: 10px; font-size: 12px; color: var(--lb-muted); text-decoration: none; opacity: 0.9; }
.lb-brand:hover { text-decoration: underline; }

.lb-particles { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.lb-particles span { position: absolute; bottom: -40px; opacity: 0; animation: lb-float linear infinite; }
@keyframes lb-float {
    0% { transform: translateY(0) translateX(0) rotate(0); opacity: 0; }
    10% { opacity: 0.85; }
    50% { transform: translateY(-55vh) translateX(18px) rotate(160deg); }
    90% { opacity: 0.7; }
    100% { transform: translateY(-110vh) translateX(-12px) rotate(320deg); opacity: 0; }
}
.lb-preview { min-height: 100%; }
.lb-preview::before, .lb-preview .lb-particles { position: absolute; }
.lb-preview .lb-particles span { animation-name: lb-float-box; }
@keyframes lb-float-box {
    0% { transform: translateY(0) rotate(0); opacity: 0; }
    10% { opacity: 0.85; }
    100% { transform: translateY(-780px) rotate(320deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .lb *, .lb *::before { animation: none !important; } .lb-particles { display: none; } }

/* Studio: trình chỉnh link bio */
.lbe-phone { width: 100%; max-width: 380px; height: 720px; margin: 0 auto; border-radius: 40px; border: 10px solid #111; overflow: hidden; position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35); background: #111; }
.lbe-phone-scroll { position: absolute; inset: 0; overflow-y: auto; scrollbar-width: none; }
.lbe-phone-scroll::-webkit-scrollbar { display: none; }
.lbe-phone .lb-inner { padding-top: 30px; }
.lbe-phone .lb-preview { pointer-events: auto; }
.lbe-blocks { display: grid; gap: 8px; }
.lbe-block { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); transition: box-shadow 0.15s, border-color 0.15s, opacity 0.15s, transform 0.15s; }
.lbe-block:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06); }
.lbe-block.open { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lbe-block.off .lbe-block-bar > :not(.lbe-acts) { opacity: 0.45; }
.lbe-block.dragging { opacity: 0.4; }
.lbe-block.over { border-color: var(--accent); border-style: dashed; transform: scale(1.01); }
.lbe-block-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 6px; cursor: pointer; }
.lbe-grip { color: var(--muted); cursor: grab; display: grid; place-items: center; width: 22px; opacity: 0.6; }
.lbe-block:hover .lbe-grip { opacity: 1; }
.lbe-tile { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; flex: none; background: var(--surface-2); }
.lbe-tile-donate { background: linear-gradient(135deg, #ffe1ec, #ffc2d6); }
.lbe-tile-bank { background: linear-gradient(135deg, #dff3ff, #bfe3ff); }
.lbe-tile-image { background: linear-gradient(135deg, #fff1d6, #ffd9a8); }
.lbe-tile-link { background: linear-gradient(135deg, #e8e3ff, #d2c8ff); }
.lbe-tile-video { background: linear-gradient(135deg, #ffe0e0, #ffbdbd); }
.lbe-tile-top { background: linear-gradient(135deg, #fff6c9, #ffe58a); }
.lbe-tile-text { background: linear-gradient(135deg, #e3f7ea, #c1ecd0); }
.lbe-block-bar .name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.lbe-block-bar .name b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbe-block-bar .name small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbe-acts { display: flex; align-items: center; gap: 2px; flex: none; }
.lbe-act { width: 32px; height: 32px; border-radius: 10px; border: none; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; transition: background 0.12s, color 0.12s; }
.lbe-act:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.lbe-act.danger:hover:not(:disabled) { background: rgba(232, 68, 95, 0.12); color: #e8445f; }
.lbe-act:disabled { opacity: 0.25; cursor: default; }
.lbe-toggle { position: relative; width: 38px; height: 22px; margin-left: 6px; cursor: pointer; flex: none; }
.lbe-toggle input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.lbe-toggle i { position: absolute; inset: 0; border-radius: 999px; background: var(--border); transition: background 0.15s; pointer-events: none; }
.lbe-toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.15s; }
.lbe-toggle input:checked + i { background: var(--accent); }
.lbe-toggle input:checked + i::after { transform: translateX(16px); }
.lbe-block-body { padding: 4px 16px 16px; border-top: 1px solid var(--border); }
.lbe-add { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.lbe-add button { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px; border-radius: 14px; border: 1.5px dashed var(--border); background: transparent; color: var(--text); cursor: pointer; transition: border-color 0.12s, background 0.12s; }
.lbe-add button:hover { border-color: var(--accent); border-style: solid; background: var(--accent-soft); }
.lbe-add button b { display: block; font-size: 13px; }
.lbe-add button small { display: block; color: var(--muted); font-size: 11px; line-height: 1.35; }
.lbe-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.lbe-theme { border-radius: 14px; border: 2px solid var(--border); padding: 0; overflow: hidden; cursor: pointer; background: none; color: var(--text); }
.lbe-theme.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lbe-theme .sw { height: 54px; background: var(--lb-bg, linear-gradient(160deg, #ffe0f0, #e3dcff 55%, #d5ecff)); display: grid; place-items: center; }
.lbe-theme .sw i { width: 60%; height: 12px; border-radius: 6px; background: var(--lb-surface, rgba(255, 255, 255, 0.62)); border: 1px solid var(--lb-border, #fff); box-shadow: 0 0 0 1px var(--lb-accent, #ff5c9e); }
.lbe-theme span { display: block; font-size: 12px; padding: 5px 4px; font-weight: 600; }
.lbe-stat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lbe-stat div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.lbe-stat b { display: block; font-size: 22px; }
.lbe-stat span { font-size: 12px; color: var(--muted); }
.lbe-spark { display: flex; align-items: flex-end; gap: 2px; height: 46px; margin-top: 10px; }
.lbe-spark i { flex: 1; background: var(--accent); border-radius: 2px 2px 0 0; min-height: 2px; opacity: 0.8; }
.lbe-socials { display: grid; gap: 8px; }
.lbe-social-row { display: grid; grid-template-columns: 40px 150px minmax(0, 1fr) 32px; gap: 10px; align-items: center; padding: 6px; border-radius: 14px; background: var(--surface-2); }
.lbe-social-row .input { padding: 9px 12px; font-size: 14px; background: var(--surface); }
.lbe-social-add { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.lbe-social-add button { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.lbe-social-add button:hover { border-color: var(--accent); background: var(--accent-soft); }
.lbe-social-add .lb-social { width: 28px; height: 28px; font-size: 14px; box-shadow: none; }
.lbe-social-add .lb-social-zalo { font-size: 8px; }
.lbe-social-add small { font-size: 12px; font-weight: 600; }
.lb-social-website { background: var(--lb-accent, var(--accent)); }
@media (max-width: 640px) { .lbe-social-row { grid-template-columns: 40px minmax(0, 1fr) 32px; } .lbe-social-row input { grid-column: 1 / -1; } .lbe-phone { height: 620px; } .lbe-grip { display: none; } }

/* Ô chọn số tiền donate */
.amt-box { display: flex; align-items: baseline; justify-content: center; gap: 4px; padding: 12px 16px 8px; border-radius: 18px;
    border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 18%, transparent); }
.amt-box input { border: none !important; background: transparent !important; box-shadow: none !important; outline: none; padding: 0 !important;
    font-size: 34px !important; font-weight: 800 !important; letter-spacing: -0.02em; text-align: center; color: var(--text) !important; width: 100%; height: auto !important; min-width: 0; font-variant-numeric: tabular-nums; }
.amt-cur { font-size: 22px; font-weight: 800; color: var(--accent); }
.amt-words { text-align: center; font-size: 12px; color: var(--muted); margin: 6px 0 10px; }
.amt-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.amt-chips button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 14px; border: 1.5px solid var(--border);
    background: var(--surface-2); color: var(--text); cursor: pointer; transition: transform 0.12s, border-color 0.12s, background 0.12s; }
.amt-chips button:hover { transform: translateY(-2px); border-color: var(--accent); }
.amt-chips button b { font-size: 14px; font-weight: 800; }
.amt-emoji { font-size: 18px; line-height: 1; }
.amt-chips button.active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 40%, transparent); }
.lb-theme-neon .amt-chips button.active, .lb-theme-mono .amt-chips button.active { color: #000; }
.amt-readonly button, .amt-readonly input { pointer-events: none; }
.lbe-fake { pointer-events: none; }
.lbe-fake .field { margin-bottom: 12px; }

/* Bảng "Giới thiệu" trên trang donate */
.ab-backdrop { align-items: center; padding: 16px; overflow-y: auto; }
.ab { position: relative; width: 100%; max-width: 760px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border: 1px solid var(--border);
    border-radius: 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); animation: sheet-up 0.25s ease-out; scrollbar-width: thin; }
.ab-close { position: absolute; top: 12px; right: 12px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: none; display: grid; place-items: center;
    background: rgba(0, 0, 0, 0.45); color: #fff; cursor: pointer; backdrop-filter: blur(6px); }
.ab-cover { height: 170px; background: radial-gradient(500px 160px at 15% 0%, rgba(255, 255, 255, 0.25), transparent), linear-gradient(120deg, var(--accent), #8b5cf6 60%, #3b82f6);
    background-size: cover; background-position: center; position: relative; }
.ab-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 40%, var(--surface)); }
.ab-head { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: 16px; padding: 0 24px; margin-top: -62px; flex-wrap: wrap; }
.ab-avatar { width: 116px; height: 116px; border-radius: 26px; overflow: hidden; flex: none; background: var(--surface-2);
    box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--accent), 0 0 40px color-mix(in srgb, var(--accent) 55%, transparent); }
.ab-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ab-id { flex: 1; min-width: 180px; padding-bottom: 6px; }
.ab-id h2 { font-size: 26px; font-weight: 800; margin: 0; letter-spacing: -0.02em; }
.ab-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.ab-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 6px; }
.ab-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 20px 24px 0; }
.ab-stats div { padding: 12px 14px; border-radius: 16px; background: var(--surface-2); text-align: center; }
.ab-stats b { display: block; font-size: 22px; font-weight: 800; }
.ab-stats span { font-size: 12px; color: var(--muted); }
.ab-section { margin: 20px 24px 0; }
.ab-section h3 { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.ab-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.ab-dot.purple { background: #8b5cf6; } .ab-dot.green { background: #22c55e; } .ab-dot.gold { background: #f5b301; }
.ab-quote { margin: 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--accent); white-space: pre-line; line-height: 1.75; font-size: 15px; }
.ab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 4px; }
.ab-grid .ab-section { margin-right: 12px; }
.ab-grid .ab-section + .ab-section { margin-left: 12px; margin-right: 24px; }
.ab-socials { display: flex; flex-wrap: wrap; gap: 8px; }
.ab-social { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2);
    color: var(--text); font-size: 13px; font-weight: 600; text-decoration: none; transition: transform 0.12s, border-color 0.12s; }
.ab-social:hover { transform: translateY(-2px); border-color: var(--accent); text-decoration: none; }
.ab-social .lb-social { width: 30px; height: 30px; font-size: 15px; box-shadow: none; }
.ab-social .lb-social-zalo { font-size: 8px; }
.ab-info { display: grid; gap: 8px; }
.ab-info > div { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); font-size: 13px; color: var(--muted); }
.ab-info b { color: var(--text); }
.ab-ico { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--surface); flex: none; }
.ab-top { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ab-top-item { padding: 12px; border-radius: 16px; text-align: center; background: var(--surface-2); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ab-top-item .medal { font-size: 22px; }
.ab-top-item b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-top-item span:last-child { font-size: 12px; color: var(--accent-text); font-weight: 700; }
.ab-top-item.rank-1 { background: linear-gradient(160deg, rgba(255, 210, 60, 0.28), var(--surface-2)); }
.ab-top-item.rank-2 { background: linear-gradient(160deg, rgba(200, 210, 225, 0.3), var(--surface-2)); }
.ab-top-item.rank-3 { background: linear-gradient(160deg, rgba(220, 140, 80, 0.25), var(--surface-2)); }
.ab-foot { margin: 22px 24px 24px; padding-top: 16px; border-top: 1px solid var(--border); }
.ab-report { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; border: 1px solid rgba(232, 68, 95, 0.5);
    background: transparent; color: #e8445f; font-size: 13px; font-weight: 600; cursor: pointer; }
.ab-report:hover { background: rgba(232, 68, 95, 0.1); }
.ab-reported { color: #22c55e; font-weight: 600; font-size: 14px; }
.ab-report-form { display: grid; gap: 10px; }
.ab-reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.ab-reasons label { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); font-size: 13px; cursor: pointer; background: var(--surface-2); }
.ab-reasons label.active { border-color: #e8445f; background: rgba(232, 68, 95, 0.12); color: #e8445f; }
.ab-reasons input { display: none; }
.ab-report-form textarea { width: 100%; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface-2); color: var(--text); padding: 10px 12px; font: inherit; }
@media (max-width: 640px) {
    .ab-backdrop { padding: 0; align-items: flex-end; }
    .ab { border-radius: 26px 26px 0 0; max-height: 92vh; }
    .ab-cover { height: 130px; }
    .ab-head { padding: 0 16px; margin-top: -50px; }
    .ab-avatar { width: 92px; height: 92px; border-radius: 22px; }
    .ab-stats, .ab-section, .ab-foot { margin-left: 16px; margin-right: 16px; }
    .ab-grid { grid-template-columns: 1fr; }
    .ab-grid .ab-section, .ab-grid .ab-section + .ab-section { margin-left: 16px; margin-right: 16px; }
    .ab-top { grid-template-columns: 1fr; }
}
.follow-ava { overflow: hidden; padding: 0; } .follow-ava img { width: 100%; height: 100%; object-fit: cover; }

/* Trạng thái đang live */
.live-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; background: #ff1f4b; color: #fff;
    font-size: 12px; font-weight: 800; letter-spacing: 0.04em; box-shadow: 0 0 0 0 rgba(255, 31, 75, 0.6); animation: live-ring 1.8s infinite; vertical-align: middle; white-space: nowrap; }
.live-badge i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: live-dot 1s infinite alternate; }
.live-badge.compact { padding: 2px 7px 2px 6px; font-size: 10px; gap: 4px; }
.live-badge.compact i { width: 6px; height: 6px; }
@keyframes live-ring { 70% { box-shadow: 0 0 0 8px rgba(255, 31, 75, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 31, 75, 0); } }
@keyframes live-dot { to { opacity: 0.35; } }
.live-watch { background: #ff1f4b !important; border-color: transparent !important; color: #fff !important; }
.is-live .profile-avatar, .is-live.ab-avatar { box-shadow: 0 0 0 4px var(--surface), 0 0 0 7px #ff1f4b, 0 0 30px rgba(255, 31, 75, 0.55) !important; }
.profile-handle-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lb-live { display: flex; justify-content: center; gap: 8px; align-items: center; margin-top: 8px; }
.lb-live .live-watch { padding: 6px 14px; font-size: 13px; border-radius: 999px; }
.hs-live { position: relative; z-index: 1; margin-top: -12px; min-height: 0; line-height: 1; }
.hs-live:empty { display: none; }

/* Admin: đang hoạt động */
.act-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.act-kpi { padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; gap: 4px; }
.act-kpi span { font-size: 13px; color: var(--muted); font-weight: 600; }
.act-kpi b { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.act-kpi b em { font-style: normal; font-size: 16px; color: var(--muted); font-weight: 600; }
.act-kpi small { color: var(--muted); font-size: 12px; }
.act-kpi.live { border-color: rgba(255, 31, 75, 0.5); background: linear-gradient(160deg, rgba(255, 31, 75, 0.12), var(--surface)); }
.act-kpi.live b { color: #ff1f4b; }
.act-meter { display: grid; grid-template-columns: 80px 1fr 70px; gap: 10px; align-items: center; margin-top: 10px; font-size: 13px; }
.act-meter > div { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.act-meter i { display: block; height: 100%; border-radius: 999px; background: var(--accent); transition: width 0.4s; }
.act-meter b { text-align: right; }
.act-chart-label { font-size: 12px; color: var(--muted); margin: 10px 0 4px; }
.act-chart { display: flex; align-items: flex-end; gap: 1px; height: 64px; padding: 4px; border-radius: 10px; background: var(--surface-2); }
.act-chart i { flex: 1; min-height: 1px; background: var(--accent); border-radius: 2px 2px 0 0; opacity: 0.85; }
.act-chart.live i { background: #ff1f4b; }

/* Nút đăng xuất là form POST (LogoutForm): form không chiếm chỗ, nút trông như link/nút cũ. */
.logout-form { display: contents; }
.logout-form button.um-item { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.logout-form button.um-item:hover { background: var(--surface-2); }
.logout-form button.link-button { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.logout-form button.link-button:hover { text-decoration: underline; }

/* Studio → Quà TikTok: mỗi luật quà một hàng */
.tt-item { border: 1px solid var(--border); border-radius: 14px; margin-top: 10px; background: var(--surface-2); overflow: hidden; }
.tt-item.off { opacity: 0.6; }
.tt-item-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.tt-item-head .switch { margin: 0; }
.tt-thumb { width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--surface-3); display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 20px; }
.tt-thumb img { width: 100%; height: 100%; object-fit: contain; }
.tt-item-name { flex: 1; min-width: 0; text-align: left; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; display: flex; flex-direction: column; }
.tt-item-name b, .tt-item-name small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-item-name small { color: var(--muted); }
.tt-item-body { padding: 4px 14px 12px; border-top: 1px dashed var(--border); }
.tt-item.open .tt-item-head { background: var(--accent-soft); }
.tt-trigger { border-top: 0; padding-top: 10px; }
.tt-trigger-row { display: flex; flex-wrap: wrap; align-items: end; gap: 0 10px; }
.tt-trigger-row .field { flex: 1 1 150px; margin-bottom: 8px; }
.tt-trigger-row .field-label { white-space: nowrap; }
.tt-trigger-row .field.narrow { flex: 1 1 110px; max-width: 160px; }
.tt-trigger-row .switch { align-self: center; margin-bottom: 8px; }
.tt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tt-chip { border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.tt-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
.tt-stage { padding: 0; min-height: 0; aspect-ratio: 16 / 9; background: repeating-conic-gradient(#2a2a33 0 25%, #22222a 0 50%) 0 0 / 20px 20px; }
.tt-stage iframe { width: 100%; height: 100%; }
@media (max-width: 640px) { .tt-item-head { flex-wrap: wrap; } .tt-item-name { flex-basis: calc(100% - 110px); } }

/* ===== Hiệu ứng WOW (trang donate) ===== */
.wow-box-pick { margin: 4px 0 16px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, #c084fc 45%, var(--border));
    background: linear-gradient(120deg, color-mix(in srgb, #c084fc 14%, var(--surface-2)), color-mix(in srgb, #38bdf8 10%, var(--surface-2))); }
.wow-box-pick.locked { border-style: dashed; background: var(--surface-2); }
.wow-pick-row { display: flex; align-items: center; gap: 12px; }
.wow-pick-thumb { width: 52px; height: 52px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 14px; font-size: 24px;
    background: radial-gradient(circle, color-mix(in srgb, #c084fc 35%, transparent), transparent 70%), #15111f; }
.wow-pick-thumb img { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 0 6px #c084fc); }
.wow-pick-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; font-size: 13px; color: var(--muted); }
.wow-pick-text > b { font-size: 15px; color: var(--text); }
.wow-super-tag { margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 10px; letter-spacing: .08em; color: #fff; background: linear-gradient(90deg, #ff4fd8, #ffb84d, #4fe3ff); }
.wow-pick-btn { flex: none; font-weight: 800; }
.wow-picker { max-width: 980px; }
.wow-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.wow-modes .pick-chip { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.wow-modes .pick-chip small { font-size: 11px; color: var(--muted); font-weight: 600; }
.wow-modes .pick-chip:disabled { opacity: .55; cursor: not-allowed; }
.wow-pick-layout { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 760px) { .wow-pick-layout { grid-template-columns: 300px 1fr; align-items: start; } .wow-preview { position: sticky; top: 0; } }
.wow-preview { border-radius: var(--radius-sm); overflow: hidden; background: #07060d; }
.wow-preview iframe { display: block; width: 100%; aspect-ratio: 3 / 4; border: 0; color-scheme: dark; }
.wow-preview-name { padding: 8px 12px; text-align: center; font-weight: 800; color: #fff; background: #12101b; font-size: 14px; }
.wow-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.wow-tile { position: relative; padding: 10px 6px 8px; }
.wow-tile img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 0 8px var(--c, #c084fc)); transition: transform .2s; }
.wow-tile:hover img { transform: scale(1.1); }
.wow-tile span { font-size: 12px; line-height: 1.2; }
.wow-tile.active { border-color: var(--c, var(--accent)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c, #c084fc) 40%, transparent), 0 0 18px color-mix(in srgb, var(--c, #c084fc) 35%, transparent); }
.wow-tile.locked { opacity: .5; cursor: not-allowed; }
.wow-tile.locked img { filter: grayscale(.7); }
.wow-lock { position: absolute; top: 6px; right: 6px; font-style: normal; font-size: 12px; }
.wow-foot-note { margin-right: auto; align-self: center; }

/* Admin: bộ hiệu ứng WOW */
.wow-admin-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.wow-admin-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); }
.wow-admin-item.active { border-color: var(--c, var(--accent)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c, #c084fc) 30%, transparent); }
.wow-admin-item.off { opacity: .6; }
.wow-admin-thumb { position: relative; width: 84px; height: 84px; flex: none; border: 0; border-radius: 14px; padding: 6px; cursor: pointer; }
.wow-admin-thumb img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 8px var(--c)); }
.wow-admin-thumb span { position: absolute; right: 4px; bottom: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.wow-admin-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.wow-admin-fields .field { margin-bottom: 6px; }
.wow-admin-fields input[type=color] { width: 100%; height: 38px; padding: 2px; }
.wow-admin-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wow-admin-actions .spacer { flex: 1; }
.upload-btn { position: relative; overflow: hidden; cursor: pointer; }
.upload-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.wow-preview.wide iframe { aspect-ratio: 4 / 5; }
@media (max-width: 700px) { .wow-admin-item { flex-direction: column; } }

/* Admin: Ví xu */
.stats b.stat-value, .stats span.stat-sub { display: block; }
.amount-in { color: var(--mint); }
.amount-out { color: var(--danger); }
.coin-admin { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1000px) { .coin-admin { grid-template-columns: 1fr; } }
.coin-people { position: sticky; top: 16px; }
.coin-people-list { display: flex; flex-direction: column; gap: 4px; max-height: 64vh; overflow-y: auto; }
.coin-person { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.coin-person:hover { background: var(--surface-2); }
.coin-person.active { background: var(--accent-soft); border-color: var(--accent); }
.coin-person-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.coin-person-text b, .coin-person-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin-person-text small { color: var(--muted); font-size: 12px; }
.coin-person-bal { font-weight: 800; font-variant-numeric: tabular-nums; }
.avatar-dot { width: 34px; height: 34px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, #f472b6, #a855f7); }
.avatar-dot.big { width: 54px; height: 54px; font-size: 22px; }
.vip-mini { margin-left: 4px; padding: 0 6px; border-radius: 999px; font-size: 10px; color: var(--gold); background: var(--gold-soft); }
.coin-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 10px; text-align: center; }
.coin-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.coin-head h2 { margin: 0; font-size: 20px; }
.coin-total { margin-left: auto; text-align: right; display: flex; flex-direction: column; }
.coin-total small { color: var(--muted); font-size: 12px; }
.coin-total b { font-size: 24px; font-variant-numeric: tabular-nums; }
.wallet-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.wallet-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--surface-2); color: var(--text); text-align: left; cursor: pointer; }
.wallet-card b { font-size: 20px; font-variant-numeric: tabular-nums; }
.wallet-card b small { font-size: 12px; color: var(--muted); font-weight: 600; }
.wallet-card.active { border-color: var(--accent); background: var(--accent-soft); }
.quick-amounts, .reason-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; }
.reason-chips { margin: 4px 0 8px; }
.quick-amounts .pick-chip, .reason-chips .pick-chip { padding: 6px 12px; font-size: 13px; }
.coin-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-variant-numeric: tabular-nums; }
.coin-preview span { color: var(--muted); }
.coin-preview.bad { background: var(--danger-soft); color: var(--danger); }
.coin-preview em { font-style: normal; font-weight: 700; }
.coin-submit { display: flex; justify-content: flex-end; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.kv span { color: var(--muted); }

/* ---- GG Live: nội dung các trang ---- */
.ggl-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ggl-quick-item { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.ggl-quick-item span { font-size: 22px; }
.ggl-quick-item:hover { border-color: var(--accent); text-decoration: none; }
.ggl-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ggl-stats div { padding: 12px; border-radius: 12px; background: var(--surface-2); display: flex; flex-direction: column; }
.ggl-stats b { font-size: 22px; }
.ggl-stats span { color: var(--muted); font-size: 13px; }
.ggl-steps { margin: 0; padding-left: 20px; line-height: 1.8; }
.ggl-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.ggl-ov { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); overflow: hidden; display: flex; flex-direction: column; }
.ggl-ov-preview { height: 200px; background: repeating-conic-gradient(#2a2a33 0 25%, #22222a 0 50%) 0 0 / 20px 20px; }
.ggl-ov-preview iframe { width: 100%; height: 100%; border: 0; color-scheme: light; }
.ggl-ov-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ggl-ov-body p { margin: 0; flex: 1; }
.ggl-ov-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ggl-ov-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ggl-table tr.off td { opacity: 0.55; }
.ggl-table .switch { margin: 0; padding: 0; background: none; border: 0; }
.ggl-edit td { background: var(--surface-2); }
.link-btn { background: none; border: 0; padding: 0; color: inherit; font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.link-btn:hover { color: var(--accent); }
.ggl-clock { text-align: center; font-size: 56px; font-weight: 900; font-variant-numeric: tabular-nums; margin: 6px 0 4px; }
.ggl-person { display: flex; align-items: center; gap: 10px; }
.ggl-person small { font-size: 12px; }
.ggl-levels { display: flex; flex-wrap: wrap; gap: 6px; }
.ggl-levels span { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 13px; }

/* ===== Khung chung trang cài đặt GG Studio / GG Live ===== */
/* Thanh lưu nổi cuối màn hình */
.savebar { position: fixed; right: 28px; bottom: 18px; z-index: 60; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; border-radius: 999px;
    background: var(--surface); border: 1.5px solid var(--border); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28); transition: border-color 0.2s, box-shadow 0.2s; }
.savebar-state { font-size: 13px; font-weight: 700; color: var(--muted); margin-right: 6px; white-space: nowrap; }
.savebar.dirty { border-color: var(--accent); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3), 0 0 0 4px var(--accent-soft); }
.savebar.dirty .savebar-state { color: var(--accent); }
.savebar .btn { border-radius: 999px; padding: 8px 16px; }
.main:has(.savebar) { padding-bottom: 110px; }
.main:has(.savebar) .toast { bottom: 80px; }
@media (max-width: 900px) { .savebar { left: 16px; right: 16px; justify-content: flex-end; } .savebar-state { margin-right: auto; } }

/* Nút thử dưới khung xem trước */
.try-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 16px 0 8px; font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.try-head small { font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; }
.try-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.try-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 66px; padding: 10px 6px; border-radius: 14px;
    border: 1.5px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.1s; }
.try-btn span { font-size: 22px; line-height: 1; }
.try-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.try-btn:active { transform: scale(0.96); }
.try-row .copy-row, .try-row .try-wide { grid-column: 1 / -1; }
.preview-card .copy-row .input { flex: 1; min-width: 0; font-size: 13px; }

/* Ô chọn tệp */
input[type=file] { font: inherit; font-size: 13px; color: var(--muted); max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; font-weight: 700; font-size: 13px; color: var(--text); background: var(--surface-2); border: 1.5px solid var(--border);
    border-radius: 999px; padding: 7px 14px; margin-right: 10px; cursor: pointer; }
input[type=file]::file-selector-button:hover { border-color: var(--accent); }
.field input[type=file] { padding: 6px; }
.card-title .switch, .card-title .pill-toggle { margin: 0; padding: 7px 12px; font-size: 14px; }
.sub-head { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin: 18px 0 10px; padding-top: 16px; border-top: 1px dashed var(--border); }
.card-title + .sub-head, .rule-edit > .sub-head:first-child { margin-top: 4px; padding-top: 0; border-top: none; }
.rule-edit > .sub-head:first-child { margin-top: 14px; }
.card-desc { margin: -6px 0 14px; color: var(--muted); font-size: 13px; }

/* Kết nối TikTok Live */
.conn-status { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); margin-bottom: 16px; }
.conn-status b { display: block; font-size: 17px; }
.conn-status small { color: var(--muted); font-size: 13px; }
.conn-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--muted); flex: none; }
.conn-status.green .conn-dot { background: var(--mint); box-shadow: 0 0 0 5px var(--mint-soft); animation: conn-pulse 1.6s infinite; }
.conn-status.gold .conn-dot { background: var(--gold); box-shadow: 0 0 0 5px var(--gold-soft); }
.conn-status.red .conn-dot { background: var(--danger); box-shadow: 0 0 0 5px var(--danger-soft); }
@keyframes conn-pulse { 50% { box-shadow: 0 0 0 9px transparent; } }
.conn-form { display: flex; gap: 10px; flex-wrap: wrap; }
.conn-input { flex: 1 1 240px; display: flex; align-items: center; gap: 4px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface-2); }
.conn-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.conn-input span { color: var(--muted); font-weight: 800; font-size: 17px; }
.conn-input input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: 16px; font-weight: 600; padding: 13px 0; outline: none; }
.setup-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.setup-steps li { counter-increment: step; display: grid; grid-template-columns: 32px 1fr; column-gap: 12px; }
.setup-steps li::before { content: counter(step); grid-row: span 2; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.setup-steps li.done::before { content: "✓"; background: var(--mint-soft); color: var(--mint); }
.setup-steps li span { color: var(--muted); font-size: 14px; }

/* Giả lập: lưới quà */
.seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.seg > span { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 8px; }
.seg button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; padding: 5px 11px; border-radius: 999px; cursor: pointer; }
.seg button.on, .seg button.active { background: var(--accent); color: #fff; }
.card-title .seg, .try-row .seg { margin: 0; }
.gift-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.gift-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px 10px; border-radius: 16px; border: 1.5px solid var(--border);
    background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; transition: border-color 0.15s, transform 0.1s, background 0.15s; }
.gift-tile img { width: 44px; height: 44px; object-fit: contain; margin-bottom: 4px; }
.gift-tile b { font-size: 13px; }
.gift-tile small { font-size: 12px; color: var(--muted); }
.gift-tile:hover { border-color: var(--accent); background: var(--accent-soft); }
.gift-tile:active { transform: scale(0.95); }

/* Danh sách luật (âm báo, hành động, sự kiện) */
.rule-list { display: flex; flex-direction: column; gap: 8px; }
.rule-list.all-off { opacity: 0.55; }
.rule { border: 1.5px solid var(--border); border-radius: 16px; background: var(--surface-2); }
.rule.open { border-color: var(--accent); }
.rule.off .rule-main { opacity: 0.5; }
.rule-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 12px; }
.rule-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; padding: 4px 6px; }
.rule-main b { font-size: 14px; }
.rule-main small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.rule-edit { padding: 0 16px 16px; border-top: 1px solid var(--border); }
.switch.bare { padding: 0; border: 0; background: none; margin: 0; }
.icon-btn.sm { width: 32px; height: 32px; font-size: 13px; }
.empty-big { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 34px 16px; border: 1.5px dashed var(--border); border-radius: 18px; }
.empty-big > span { font-size: 38px; }
.empty-big b { font-size: 17px; }
.empty-big p { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.flow-explain { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.flow-explain > div { flex: 1 1 220px; display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; align-items: center; }
.flow-explain > div span { grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.flow-explain small { color: var(--muted); font-size: 13px; }
.flow-explain > i { font-style: normal; font-size: 20px; color: var(--muted); }
.rule .tt-thumb { width: 38px; height: 38px; }
.rate-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin-bottom: 4px; }
.rate-list label { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.rate-list label:last-child { border-bottom: 0; }
.rate-list span { flex: 1; font-weight: 600; font-size: 14px; }
.rate-list input { width: 110px; text-align: right; padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; }
.rate-list input:focus { outline: none; border-color: var(--accent); }
.rate-list small { width: 56px; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clock-main { display: flex; justify-content: center; margin: 4px 0 14px; }
.clock-main .btn { min-width: 180px; }
.upload-box { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; border: 1.5px dashed var(--border); background: var(--surface-2); }
.upload-thumb { flex: none; display: flex; align-items: center; justify-content: center; background: var(--surface-3); object-fit: cover; font-size: 22px; }
.upload-thumb.round { width: 52px; height: 52px; border-radius: 50%; }
.upload-thumb.wide { width: 92px; height: 40px; border-radius: 8px; }
.upload-box input[type=file] { min-width: 0; }
.danger-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--danger-soft); }
.danger-row b { display: block; }
.danger-row small { color: var(--muted); font-size: 13px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.choice-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.choice { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: 14px; border: 1.5px solid var(--border);
    background: var(--surface-2); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.choice:hover { border-color: var(--accent); }
.choice.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.jar-ico { display: block; border: 2.5px solid currentColor; border-top: 0; opacity: 0.8; }
.jar-ico.mason { width: 30px; height: 34px; border-radius: 6px 6px 9px 9px; }
.jar-ico.round { width: 34px; height: 34px; border-radius: 50% 50% 45% 45%; }
.jar-ico.tall { width: 20px; height: 38px; border-radius: 5px 5px 7px 7px; }
.jar-ico.wide { width: 40px; height: 26px; border-radius: 6px 6px 12px 12px; }
.file-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
label.btn { position: relative; cursor: pointer; }
