:root {
    --bg: #0c0716;
    --bg-2: #160c26;
    --flame: #ff6a1a;
    --gold: #ffc83d;
    --red: #e8263a;
    --violet: #8b5cf6;
    --cyan: #38d9f5;
    --text: #f6efff;
    --muted: #b8a9d6;
    --glass: rgba(255, 255, 255, 0.06);
    --glass-2: rgba(255, 255, 255, 0.1);
    --line: rgba(255, 200, 61, 0.22);
    --radius: 18px;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
    --grad-fire: linear-gradient(135deg, #ff3d3d 0%, #ff6a1a 45%, #ffc83d 100%);
    --grad-night: linear-gradient(160deg, #1d1035 0%, #0c0716 60%);
}

* { box-sizing: border-box; }

html { background: var(--bg); }
html, body.anime {
    margin: 0;
    min-height: 100%;
    color: var(--text);
    font-family: "Be Vietnam Pro", "Maven Pro", system-ui, sans-serif;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}
body.anime { background: transparent !important; }

body.anime a { color: var(--gold); text-decoration: none; }
body.anime a:hover { color: #fff; }
body.anime h1, body.anime h2, body.anime h3, body.anime h4 { font-family: "Baloo 2", "Be Vietnam Pro", sans-serif; letter-spacing: .3px; }

/* ---------- Background ---------- */
.bg-fx { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.bg-fx .bg-art {
    position: absolute; inset: -40px;
    background: url("../../images/banner.jpg") center top / cover no-repeat;
    filter: blur(14px) saturate(1.3) brightness(.35);
    transform: scale(1.08);
    animation: bgDrift 30s ease-in-out infinite alternate;
}
.bg-fx::after {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(1200px 600px at 85% -10%, rgba(255, 106, 26, .28), transparent 60%),
        radial-gradient(900px 500px at -10% 30%, rgba(139, 92, 246, .25), transparent 60%),
        linear-gradient(180deg, rgba(12, 7, 22, .2), rgba(12, 7, 22, .92) 70%);
}
#fxCanvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
@keyframes bgDrift { from { transform: scale(1.08) translate(0, 0); } to { transform: scale(1.15) translate(-20px, 10px); } }

/* ---------- Top bar ---------- */
.topbar {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 10px 18px;
    background: rgba(12, 7, 22, .72);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.topbar .brand img { height: 48px; display: block; filter: drop-shadow(0 4px 14px rgba(255, 106, 26, .45)); transition: transform .3s; }
.topbar .brand:hover img { transform: scale(1.05) rotate(-2deg); }
.side-menu .menu-head img { height: 42px; }
.topbar .top-actions { display: flex; align-items: center; gap: 10px; }
.top-nav { display: none; gap: 4px; }
.top-nav a {
    color: var(--muted) !important; font-weight: 600; font-size: 14px;
    padding: 8px 12px; border-radius: 999px; transition: all .25s;
}
.top-nav a:hover, .top-nav a.active { color: #fff !important; background: var(--glass-2); }
.top-nav a.active { box-shadow: inset 0 0 0 1px var(--line); }

.xu-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 200, 61, .18), rgba(255, 106, 26, .18));
    border: 1px solid rgba(255, 200, 61, .45);
    color: var(--gold) !important; font-weight: 700; font-size: 14px; white-space: nowrap;
}
.xu-chip img { width: 18px; height: 18px; }
.btn-login-top {
    padding: 8px 16px; border-radius: 999px; font-weight: 700;
    background: var(--grad-fire); color: #1a0b00 !important;
}

.hamburger {
    width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--line);
    background: var(--glass); cursor: pointer; position: relative; flex-shrink: 0;
}
.hamburger span {
    position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 2px;
    background: var(--gold); transition: transform .35s, opacity .25s, top .35s;
}
.hamburger span:nth-child(1) { top: 14px; }
.hamburger span:nth-child(2) { top: 21px; }
.hamburger span:nth-child(3) { top: 28px; }
body.menu-open .hamburger span:nth-child(1) { top: 21px; transform: rotate(45deg); }
body.menu-open .hamburger span:nth-child(2) { opacity: 0; }
body.menu-open .hamburger span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ---------- Slide menu ---------- */
.menu-backdrop {
    position: fixed; inset: 0; z-index: 60; background: rgba(5, 2, 12, .6);
    opacity: 0; pointer-events: none; transition: opacity .35s;
}
body.menu-open .menu-backdrop { opacity: 1; pointer-events: auto; }
.side-menu {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 70;
    width: min(320px, 86vw); padding: 18px 16px 24px;
    background: var(--grad-night);
    border-left: 1px solid var(--line);
    box-shadow: -20px 0 60px rgba(0, 0, 0, .6);
    transform: translateX(105%); transition: transform .45s cubic-bezier(.2, .9, .2, 1);
    overflow-y: auto; display: flex; flex-direction: column;
}
body.menu-open .side-menu { transform: translateX(0); }
.side-menu .menu-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.side-menu .menu-close { background: none; border: 0; color: var(--muted); font-size: 26px; cursor: pointer; }
.user-card {
    display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 14px;
    border-radius: var(--radius); background: var(--glass); border: 1px solid var(--line);
}
.user-card .avatar { width: 46px; height: 46px; border-radius: 14px; background: var(--grad-fire); display: grid; place-items: center; font-weight: 800; color: #1a0b00; font-size: 20px; }
.user-card .uname { font-weight: 700; }
.user-card .uxu { color: var(--gold); font-size: 13px; }
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-list li { opacity: 0; transform: translateX(30px); transition: opacity .35s, transform .35s; }
body.menu-open .menu-list li { opacity: 1; transform: none; }
.menu-list a {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 3px 0;
    border-radius: 14px; color: var(--text) !important; font-weight: 600; transition: background .2s, transform .2s;
}
.menu-list a i { width: 22px; text-align: center; color: var(--gold); font-size: 17px; }
.menu-list a:hover { background: var(--glass-2); transform: translateX(-4px); }
.menu-list a.active { background: linear-gradient(90deg, rgba(255, 106, 26, .28), rgba(255, 106, 26, 0)); box-shadow: inset 3px 0 0 var(--flame); }
.menu-list .tag-new { margin-left: auto; font-size: 10px; padding: 2px 8px; border-radius: 999px; background: var(--red); color: #fff; font-weight: 800; animation: pulse 1.6s infinite; }
.menu-foot { margin-top: auto; padding-top: 14px; }
.menu-foot a { display: block; text-align: center; padding: 11px; border-radius: 14px; border: 1px solid rgba(232, 38, 58, .5); color: #ff8d98 !important; font-weight: 700; }

/* ---------- Page ---------- */
.page { max-width: 1080px; margin: 0 auto; padding: 18px 14px 120px; animation: pageIn .6s cubic-bezier(.2, .9, .2, 1); }
@keyframes pageIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.section-title {
    display: flex; align-items: center; gap: 10px; margin: 6px 0 14px;
    font-size: 24px; font-weight: 800;
}
.section-title .bar { width: 6px; height: 26px; border-radius: 4px; background: var(--grad-fire); box-shadow: 0 0 14px var(--flame); }
.section-title small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: auto; font-family: "Be Vietnam Pro", sans-serif; }

.panel {
    position: relative; padding: 18px; margin-bottom: 18px;
    border-radius: var(--radius); background: var(--glass);
    border: 1px solid rgba(255, 255, 255, .08); box-shadow: var(--shadow);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.panel.glow::before {
    content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
    background: linear-gradient(135deg, rgba(255, 200, 61, .7), rgba(139, 92, 246, .3), rgba(255, 106, 26, .7));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.muted { color: var(--muted); }
.text-gold { color: var(--gold); }
.text-fire { background: var(--grad-fire); -webkit-background-clip: text; background-clip: text; color: transparent; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s cubic-bezier(.2, .9, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Buttons ---------- */
.btn-fire, .btn-ghost, .btn-claim {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 0; cursor: pointer; font-weight: 800; border-radius: 14px; padding: 12px 20px;
    transition: transform .15s, box-shadow .25s, filter .2s; font-size: 15px; font-family: inherit;
}
.btn-fire { background: var(--grad-fire); color: #1a0b00 !important; box-shadow: 0 8px 24px rgba(255, 106, 26, .45); position: relative; overflow: hidden; }
.btn-fire::after {
    content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .55), transparent);
    transform: skewX(-20deg); animation: shine 3.2s infinite;
}
.btn-fire:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(255, 106, 26, .6); }
.btn-fire:active, .btn-claim:active { transform: scale(.97); }
.btn-ghost { background: var(--glass-2); color: var(--text) !important; border: 1px solid var(--line); }
.btn-ghost:hover { background: rgba(255, 255, 255, .16); }
@keyframes shine { 0% { left: -60%; } 60%, 100% { left: 130%; } }

/* ---------- Hero ---------- */
.hero {
    position: relative; border-radius: 26px; overflow: hidden; margin-bottom: 22px;
    min-height: 260px; display: flex; align-items: flex-end;
    background: url("../../images/banner.jpg") center / cover no-repeat;
    box-shadow: var(--shadow); border: 1px solid var(--line);
}
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 7, 22, 0) 20%, rgba(12, 7, 22, .95) 100%); }
.hero .hero-body { position: relative; padding: 22px; width: 100%; }
.hero .hero-logo, .auth-wrap .auth-logo {
    height: 96px; width: auto;
    filter: drop-shadow(0 8px 22px rgba(255, 106, 26, .55)) drop-shadow(0 0 18px rgba(80, 160, 255, .35));
    animation: float 4s ease-in-out infinite;
}
.hero p { margin: 6px 0 14px; color: #f3ebff; max-width: 520px; text-shadow: 0 2px 8px rgba(0, 0, 0, .9); }
.hero .hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.download-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dl-btn {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px;
    background: #000; border: 1px solid rgba(255, 255, 255, .2); color: #fff !important; transition: transform .2s, border-color .2s;
}
.dl-btn:hover { transform: translateY(-3px); border-color: var(--gold); }
.dl-btn i { font-size: 30px; }
.dl-btn small { display: block; font-size: 11px; color: #bbb; }
.dl-btn b { font-size: 17px; }

.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.quick-card {
    position: relative; overflow: hidden; padding: 16px; border-radius: 18px; min-height: 110px;
    background: var(--glass); border: 1px solid rgba(255, 255, 255, .08); color: var(--text) !important;
    transition: transform .25s, border-color .25s, box-shadow .25s;
}
.quick-card:hover { transform: translateY(-4px); border-color: var(--line); box-shadow: 0 14px 30px rgba(0, 0, 0, .4); }
.quick-card .qi { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; margin-bottom: 10px; color: #1a0b00; background: var(--grad-fire); }
.quick-card.v .qi { background: linear-gradient(135deg, #8b5cf6, #38d9f5); color: #fff; }
.quick-card.r .qi { background: linear-gradient(135deg, #e8263a, #ff7ab6); color: #fff; }
.quick-card b { display: block; font-size: 16px; }
.quick-card span { font-size: 12.5px; color: var(--muted); }

.server-list { display: grid; gap: 10px; }
.server-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(0, 0, 0, .25); }
.server-item .dot { width: 10px; height: 10px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 10px #3ddc84; animation: pulse 1.8s infinite; }
.server-item .sv-open { margin-left: auto; font-size: 12px; color: var(--muted); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 6px; padding: 5px; border-radius: 16px; background: rgba(0, 0, 0, .35); margin-bottom: 16px; position: relative; }
.tabs button {
    flex: 1; border: 0; background: none; color: var(--muted); font-weight: 800; padding: 11px 10px;
    border-radius: 12px; cursor: pointer; transition: color .25s, background .25s; font-family: inherit; font-size: 14.5px;
}
.tabs button.active { color: #1a0b00; background: var(--grad-fire); box-shadow: 0 6px 18px rgba(255, 106, 26, .4); }
.tab-pane { display: none; animation: pageIn .45s; }
.tab-pane.active { display: block; }
body.anime .tab-pane:not(.active) { display: none !important; }

/* ---------- Progress summary ---------- */
.progress-hero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.progress-hero .big { font-size: 32px; font-weight: 900; font-family: "Baloo 2", sans-serif; line-height: 1; }
.progress-hero .reset { margin-left: auto; text-align: right; font-size: 13px; color: var(--muted); }
.countdown { font-family: "Baloo 2", monospace; font-weight: 800; color: var(--gold); font-size: 18px; letter-spacing: 1px; }

.role-picker { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.role-picker select { flex: 1; min-width: 160px; }

/* ---------- Tier cards ---------- */
.tier-list { display: grid; gap: 12px; }
.tier {
    position: relative; display: grid; grid-template-columns: 92px 1fr auto; gap: 14px; align-items: center;
    padding: 14px; border-radius: 18px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .07);
    transition: transform .25s, border-color .25s;
}
.tier:hover { transform: translateY(-2px); border-color: var(--line); }
.tier.ready { border-color: rgba(255, 200, 61, .6); box-shadow: 0 0 0 1px rgba(255, 200, 61, .25), 0 0 28px rgba(255, 106, 26, .25); }
.tier.done { opacity: .62; }
.tier .need { text-align: center; }
.tier .need b { display: block; font-family: "Baloo 2", sans-serif; font-size: 22px; line-height: 1; }
.tier .need small { color: var(--muted); font-size: 11px; }
.tier .bar { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .1); overflow: hidden; margin: 6px 0 10px; }
.tier .bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad-fire); transition: width 1.4s cubic-bezier(.2, .9, .2, 1); box-shadow: 0 0 12px var(--flame); }
.tier .bar-label { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; }
.items { display: flex; flex-wrap: wrap; gap: 8px; }
.item {
    position: relative; width: 54px; height: 54px; border-radius: 12px; display: grid; place-items: center;
    background: radial-gradient(circle at 30% 20%, rgba(255, 200, 61, .35), rgba(139, 92, 246, .25)); border: 1px solid rgba(255, 200, 61, .4);
}
.tier.ready .item { animation: bob 2.4s ease-in-out infinite; }
.tier.ready .item:nth-child(2) { animation-delay: .2s; }
.tier.ready .item:nth-child(3) { animation-delay: .4s; }
.item img { width: 40px; height: 40px; object-fit: contain; }
.item em { position: absolute; right: 2px; bottom: 0; font-style: normal; font-size: 11px; font-weight: 800; color: #fff; text-shadow: 0 1px 3px #000, 0 0 2px #000; }
.items.lines { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.items.lines .item {
    width: auto; height: auto; max-width: 100%; display: flex; align-items: center; gap: 8px;
    padding: 1px 0; justify-content: flex-start; animation: none !important;
    background: none; border: 0; border-radius: 0;
}
.items.lines .item img { width: 26px; height: 26px; flex: 0 0 26px; }
.items.lines .item .iname { font-size: 14px; font-weight: 600; line-height: 1.3; }
.items.lines .item em { position: static; margin-left: 0; color: var(--gold); text-shadow: none; white-space: nowrap; font-size: 14px; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

.btn-claim { min-width: 100px; padding: 11px 16px; }
.btn-claim.can { background: var(--grad-fire); color: #1a0b00; box-shadow: 0 6px 20px rgba(255, 106, 26, .5); animation: pulse 1.6s infinite; }
.btn-claim.got { background: rgba(61, 220, 132, .15); color: #6ff0a8; border: 1px solid rgba(61, 220, 132, .4); cursor: default; }
.btn-claim.lock { background: rgba(255, 255, 255, .07); color: var(--muted); cursor: not-allowed; }
.btn-claim.retry { background: rgba(232, 38, 58, .2); color: #ff9aa3; border: 1px solid rgba(232, 38, 58, .5); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 106, 26, .55); } 50% { box-shadow: 0 0 0 10px rgba(255, 106, 26, 0); } }

.tag-confirm {
    display: inline-block; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px;
    background: rgba(255, 200, 61, .15); color: var(--gold); border: 1px dashed rgba(255, 200, 61, .6);
}

/* ---------- Ranking ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 10px; align-items: end; margin: 10px 0 18px; }
.podium .p { text-align: center; padding: 14px 8px; border-radius: 18px 18px 10px 10px; background: rgba(0, 0, 0, .3); border: 1px solid rgba(255, 255, 255, .08); position: relative; animation: rise .8s cubic-bezier(.2, .9, .2, 1) both; }
.podium .p1 { min-height: 190px; border-color: rgba(255, 200, 61, .7); box-shadow: 0 0 30px rgba(255, 200, 61, .25); animation-delay: .15s; }
.podium .p2 { min-height: 160px; border-color: rgba(200, 210, 230, .6); }
.podium .p3 { min-height: 140px; border-color: rgba(220, 140, 80, .6); animation-delay: .3s; }
.podium .crown { font-size: 30px; display: block; animation: float 3s ease-in-out infinite; }
.podium .p1 .crown { color: var(--gold); text-shadow: 0 0 16px var(--gold); }
.podium .p2 .crown { color: #dfe6f3; }
.podium .p3 .crown { color: #e3a26f; }
.podium .pname { font-weight: 800; margin-top: 6px; word-break: break-word; }
.podium .pval { color: var(--gold); font-weight: 800; font-size: 14px; }
.podium .prank { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; border-radius: 50%; background: var(--grad-fire); color: #1a0b00; font-weight: 900; display: grid; place-items: center; font-size: 14px; }
@keyframes rise { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }

.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rank-list li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: rgba(0, 0, 0, .25); animation: pageIn .4s both; }
.rank-list .no { width: 30px; text-align: center; font-weight: 900; color: var(--muted); font-family: "Baloo 2", sans-serif; font-size: 17px; }
.rank-list .nm { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-list .nm small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.rank-list .vl { font-weight: 800; color: var(--gold); white-space: nowrap; }
.rank-list li.me { box-shadow: inset 0 0 0 1px var(--flame); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar select { max-width: 260px; }
.state-banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; margin-bottom: 14px; }
.state-banner.live { background: linear-gradient(90deg, rgba(255, 106, 26, .25), rgba(255, 106, 26, .05)); border: 1px solid rgba(255, 106, 26, .5); }
.state-banner.closed { background: linear-gradient(90deg, rgba(139, 92, 246, .25), rgba(139, 92, 246, .05)); border: 1px solid rgba(139, 92, 246, .5); }
.state-banner i { font-size: 22px; }
.empty { text-align: center; padding: 30px 10px; color: var(--muted); }
.empty i { font-size: 34px; display: block; margin-bottom: 8px; opacity: .6; }

/* ---------- Coming soon ---------- */
.soon { text-align: center; padding: 50px 16px; }
.soon .soon-icon { font-size: 70px; display: inline-block; animation: float 3s ease-in-out infinite; filter: drop-shadow(0 0 20px rgba(255, 106, 26, .6)); }
.soon h2 { font-size: 34px; margin: 10px 0 4px; }

/* ---------- Điểm danh ---------- */
.ci-lead { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.ci-board {
    position: relative; border-radius: 22px; padding: 16px 14px 18px;
    background:
        radial-gradient(700px 180px at 50% 0%, rgba(255, 200, 61, .14), transparent 62%),
        linear-gradient(180deg, #24180c 0%, #140e09 100%);
    border: 1px solid rgba(212, 168, 74, .5);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 214, 120, .08);
}
.ci-account {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 14px; margin-bottom: 14px; border-radius: 16px;
    background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 214, 120, .16);
}
.ci-kicker { font-size: 11px; font-weight: 800; letter-spacing: 1.2px; color: #d7b56a; }
.ci-user { font-weight: 800; margin-top: 2px; }
.ci-bal { display: flex; align-items: center; gap: 6px; color: var(--gold); font-weight: 800; }
.ci-bal img { width: 22px; height: 22px; }
.ci-bal b { font-family: "Baloo 2", sans-serif; font-size: 22px; line-height: 1; }
.ci-rule { margin: 0 0 14px; font-size: 13px; color: #d9c7a2; }
.ci-head { display: flex; align-items: center; justify-content: center; position: relative; min-height: 36px; margin-bottom: 6px; }
.ci-head h2 {
    margin: 0; font-size: 26px; letter-spacing: 1.5px; color: #f6e7c2;
    text-shadow: 0 2px 0 #3a2810, 0 0 18px rgba(255, 200, 61, .28);
}
.ci-count { position: absolute; right: 0; top: 50%; transform: translateY(-50%); color: #7fd4e8; font-weight: 800; font-size: 13px; letter-spacing: .4px; }
.ci-hint { text-align: center; margin: 0 0 12px; color: #f0d78a; font-weight: 700; font-size: 14px; }
.ci-wait { text-align: center; margin: -4px 0 12px; color: var(--muted); font-size: 13px; }
.ci-wait[hidden] { display: none; }
.ci-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ci-day {
    position: relative; border-radius: 14px; padding: 8px 4px 7px; text-align: center; min-height: 112px;
    background: linear-gradient(180deg, #2c2318, #1a140e); border: 1px solid rgba(255, 220, 160, .12);
    color: inherit; font: inherit;
}
button.ci-day { width: 100%; cursor: pointer; appearance: none; -webkit-appearance: none; }
a.ci-day, a.ci-day:hover { color: inherit !important; text-decoration: none; display: block; }
button.ci-day:disabled { opacity: 1; cursor: default; }
.ci-day .d { font-size: 11px; font-weight: 800; letter-spacing: .5px; color: #cbb892; }
.ci-day img { width: 36px; height: 36px; margin: 4px auto 1px; display: block; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .55)); }
.ci-day .amt { color: #5ec8e6; font-weight: 800; font-size: 12px; white-space: nowrap; }
.ci-day .st { margin-top: 1px; font-size: 11px; font-weight: 800; letter-spacing: .3px; color: #8a7a64; min-height: 14px; }
.ci-day.prize .amt { color: #ffd56a; }
.ci-day.got { background: linear-gradient(180deg, #163328, #0e1c16); border-color: rgba(61, 220, 132, .6); }
.ci-day .tick {
    position: absolute; top: 6px; right: 6px; width: 16px; height: 16px; border-radius: 50%;
    background: #3ddc84; color: #063; font-size: 9px; display: grid; place-items: center;
}
.ci-day.now {
    border-color: #e6c15a; cursor: pointer;
    background: linear-gradient(180deg, #3d2e14, #241a0c);
    box-shadow: 0 0 0 1px rgba(230, 193, 90, .45), 0 0 22px rgba(230, 193, 90, .32);
    animation: bob 2.4s ease-in-out infinite;
}
.ci-day.now .st { color: #f0d78a; }
.ci-foot { margin: 12px 0 0; text-align: center; color: #b5a48a; font-size: 12.5px; }

/* ---------- Social dock ---------- */
.social-dock { position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 40; display: flex; align-items: center; }
.social-dock .dock-toggle {
    writing-mode: vertical-rl; transform: rotate(180deg);
    padding: 14px 7px; border: 0; border-radius: 0 12px 12px 0; cursor: pointer;
    background: var(--grad-fire); color: #1a0b00; font-weight: 800; font-size: 12px; letter-spacing: 1px;
    box-shadow: 0 6px 20px rgba(255, 106, 26, .5); font-family: inherit;
}
.social-dock .dock-items {
    display: flex; flex-direction: column; gap: 8px; padding: 10px 8px;
    background: rgba(12, 7, 22, .85); border: 1px solid var(--line); border-right: 0; border-radius: 16px 0 0 16px;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    max-width: 0; padding-left: 0; padding-right: 0; overflow: hidden; opacity: 0;
    transition: max-width .4s, opacity .3s, padding .4s;
}
.social-dock.open .dock-items { max-width: 80px; opacity: 1; padding: 10px 8px; }
.dock-items a {
    position: relative; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
    color: #fff !important; font-size: 21px; transition: transform .2s;
}
.dock-items a:hover { transform: scale(1.12) rotate(-6deg); }
.dock-items a.fb { background: #1877f2; }
.dock-items a.grp { background: linear-gradient(135deg, #1877f2, #8b5cf6); }
.dock-items a.zalo { background: #0068ff; font-weight: 900; font-size: 13px; font-family: Arial, sans-serif; }
.dock-items a.dl { background: var(--grad-fire); color: #1a0b00 !important; }
.dock-items a .tip {
    position: absolute; right: 56px; white-space: nowrap; font-size: 12px; font-weight: 700;
    background: #000; padding: 5px 9px; border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.dock-items a:hover .tip { opacity: 1; }

.site-foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 26px 10px 40px; }

/* ---------- Forms, tables and legacy page classes ---------- */
body.anime .form-control, body.anime select, body.anime input[type=text], body.anime input[type=password],
body.anime input[type=number], body.anime input[type=email], body.anime textarea {
    background: rgba(0, 0, 0, .35) !important; color: var(--text) !important;
    border: 1px solid rgba(255, 255, 255, .14) !important; border-radius: 12px !important;
    min-height: 46px; padding: 10px 14px; box-shadow: none !important; font-family: inherit;
}
body.anime select option { background: var(--bg-2); color: var(--text); }
body.anime .form-control:focus, body.anime select:focus { border-color: var(--flame) !important; outline: none; box-shadow: 0 0 0 3px rgba(255, 106, 26, .2) !important; }
body.anime .input-group { display: flex; width: 100%; margin-bottom: 12px; }
body.anime .input-group .form-control { flex: 1; border-radius: 0 12px 12px 0 !important; }
body.anime .input-group-addon {
    display: flex; align-items: center; justify-content: center; min-width: 46px;
    background: rgba(255, 200, 61, .12); color: var(--gold); border: 1px solid rgba(255, 255, 255, .14); border-right: 0;
    border-radius: 12px 0 0 12px;
}
body.anime .input-group-addon.captcha { border-radius: 0 12px 12px 0; border-right: 1px solid rgba(255, 255, 255, .14); border-left: 0; padding: 0 6px; background: #fff; }
body.anime .form-group { margin-bottom: 12px; }
body.anime .btn-default, body.anime .btn-primary, body.anime .btn-success {
    background: var(--grad-fire) !important; color: #1a0b00 !important; border: 0 !important;
    font-weight: 800; border-radius: 14px; padding: 12px 22px; box-shadow: 0 8px 22px rgba(255, 106, 26, .35);
}
body.anime .btn-danger { background: rgba(232, 38, 58, .85) !important; border: 0 !important; color: #fff !important; border-radius: 14px; }
body.anime .btn-secondary { background: var(--glass-2) !important; color: var(--text) !important; border: 1px solid var(--line) !important; border-radius: 14px; }
body.anime .btn-block { display: block; width: 100%; }

body.anime .giftcodeparent, body.anime .invoice-box {
    display: block; margin: 0 0 18px !important; padding: 18px; border-radius: var(--radius);
    background: var(--glass); border: 1px solid rgba(255, 255, 255, .08); box-shadow: var(--shadow); color: var(--text);
}
body.anime .invoice-box .invoice-box { padding: 0; border: 0; box-shadow: none; background: none; }
body.anime .titlegcmxh { font-size: 20px; font-weight: 800; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
body.anime .titlegcmxh::before { content: ""; width: 5px; height: 22px; border-radius: 4px; background: var(--grad-fire); }
body.anime .titlegcmxh a, body.anime .titlegcmxh span { color: var(--text) !important; }
body.anime .giftcodeparent > ul { list-style: none; padding: 0; margin: 0; }
body.anime .giftcodeparent > ul > li { display: flex; align-items: center; gap: 10px; padding: 12px 4px; border-bottom: 1px dashed rgba(255, 255, 255, .1); flex-wrap: wrap; }
body.anime .giftcodeparent > ul > li i { color: var(--gold); }
body.anime .fll2 { font-weight: 700; }
body.anime .flr { margin-left: auto; }
body.anime .bank-info, body.anime .preview-xu, body.anime .invoice-warning { background: rgba(0, 0, 0, .3) !important; color: var(--text) !important; border-color: var(--line) !important; border-radius: 14px; }
body.anime .bank-info-row { border-bottom-color: rgba(255, 255, 255, .12) !important; }
body.anime .bank-info-row[style] { background: rgba(255, 200, 61, .14) !important; }
body.anime .bank-info-row strong { color: var(--gold) !important; }
body.anime .amount-btn { background: rgba(0, 0, 0, .3) !important; color: var(--text) !important; border-color: rgba(255, 255, 255, .18) !important; }
body.anime .amount-btn.active, body.anime .amount-btn:hover { border-color: var(--flame) !important; color: var(--gold) !important; }
body.anime .alert-warning { background: rgba(255, 200, 61, .12); border: 1px solid rgba(255, 200, 61, .4); color: var(--gold); border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; }
body.anime .card-header { font-weight: 800; font-size: 18px; margin-bottom: 8px; }

body.anime table { width: 100% !important; color: var(--text); border-collapse: separate; border-spacing: 0; }
body.anime .table > thead > tr > th, body.anime table th {
    background: rgba(255, 106, 26, .16) !important; color: var(--gold) !important; border: 0 !important;
    font-weight: 700; font-size: 13px; padding: 10px 8px; white-space: nowrap;
}
body.anime .table > tbody > tr > td, body.anime table td { border: 0 !important; border-bottom: 1px solid rgba(255, 255, 255, .07) !important; padding: 10px 8px; font-size: 13.5px; background: transparent !important; }
body.anime .table-bordered { border: 0 !important; }
body.anime .dataTables_wrapper { overflow-x: auto; color: var(--muted); }
body.anime .dataTables_wrapper .dataTables_paginate .paginate_button { color: var(--text) !important; border-radius: 10px; border: 0 !important; }
body.anime .dataTables_wrapper .dataTables_paginate .paginate_button.current { background: var(--grad-fire) !important; color: #1a0b00 !important; }
body.anime .dataTables_processing { background: rgba(12, 7, 22, .9) !important; color: var(--gold) !important; border: 1px solid var(--line); }
body.anime table.dataTable tbody tr { background: transparent !important; }

.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status-pill.ok { background: rgba(61, 220, 132, .15); color: #6ff0a8; }
.status-pill.wait { background: rgba(255, 200, 61, .15); color: var(--gold); }
.status-pill.bad { background: rgba(232, 38, 58, .18); color: #ff9aa3; }
.status-pill.off { background: rgba(255, 255, 255, .08); color: var(--muted); }

.swal2-popup { background: var(--bg-2) !important; color: var(--text) !important; border: 1px solid var(--line); border-radius: 20px !important; }
.swal2-title, .swal2-html-container { color: var(--text) !important; }
.swal2-confirm { background: var(--grad-fire) !important; color: #1a0b00 !important; font-weight: 800 !important; border-radius: 12px !important; }

#skm_LockPane { display: none; }
#skm_LockPane.LockOn {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    position: fixed; inset: 0; z-index: 9000; background: rgba(5, 2, 12, .75); color: var(--gold); font-weight: 700; text-align: center;
}

/* ---------- Auth ---------- */
.auth-wrap { max-width: 440px; margin: 10px auto; }
.auth-wrap .auth-logo { display: block; margin: 6px auto 18px; height: 110px; }
.auth-links { display: flex; justify-content: space-between; font-size: 14px; margin-top: 10px; }

/* ---------- Đua top ---------- */
.dt-rewards { padding: 18px; }
.dt-head h3 { margin: 0; font-family: 'Baloo 2', sans-serif; font-size: 22px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: #fff; }
.dt-head h3 .tag-confirm { vertical-align: middle; font-size: 11px; }
.dt-range { color: var(--muted); font-size: 13px; margin-top: 2px; }
.dt-rule { margin-top: 10px; font-size: 13px; color: #ffe2a6; background: rgba(255, 200, 61, .08); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.dt-mine { margin-top: 8px; font-size: 13px; color: var(--muted); }
.dt-mine b { color: var(--gold); }
.dt-tier {
    margin-top: 10px; padding: 12px 14px; border-radius: 14px;
    background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .06);
    transition: border-color .25s, box-shadow .25s;
}
.dt-tier.hit { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(255, 200, 61, .35), 0 8px 26px rgba(255, 140, 30, .18); }
.dt-tier-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.dt-tier-top > b { color: var(--gold); font-weight: 700; font-size: 14px; }
.dt-need { font-size: 12px; font-weight: 700; color: #ffd7a0; background: rgba(255, 106, 26, .16); border: 1px solid rgba(255, 106, 26, .4); padding: 2px 8px; border-radius: 999px; }
.dt-act { margin-left: auto; }
.dt-act .btn-claim { padding: 6px 14px; font-size: 13px; }
.dt-you { font-size: 11px; font-weight: 700; color: #1a0d00; background: var(--gold); padding: 2px 8px; border-radius: 999px; vertical-align: middle; }
.dt-items { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.dt-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #e9e1f7; }
.dt-chip img { width: 26px; height: 26px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5)); }
.dt-chip b { font-weight: 600; color: #fff; }
.dt-board { padding: 0; overflow: hidden; }
.dt-board-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.dt-board-head b { font-size: 15px; color: #fff; }
.dt-board-head .muted { font-size: 12px; }
.dt-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dt-table th { text-align: left; font-size: 11px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 10px 18px; background: rgba(255, 255, 255, .03); }
.dt-table td { padding: 11px 18px; border-top: 1px solid rgba(255, 255, 255, .05); color: #f1ebfb; }
.dt-table .r { text-align: right; font-variant-numeric: tabular-nums; }
.dt-table .rk { color: var(--gold); font-weight: 700; width: 90px; }
.dt-table tr.top1 .rk { color: #ffd84d; }
.dt-table tr.top2 .rk { color: #d9e3f0; }
.dt-table tr.top3 .rk { color: #f0a96b; }
.dt-table tr.me td { background: rgba(255, 200, 61, .08); }
.dt-table tr.vacant td { font-style: italic; }
.dt-table tbody tr { animation: rowIn .35s both; }
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.bx-layout { display: grid; gap: 16px; }
.bx-history { padding: 14px; margin-bottom: 0; }
.bx-history h3 { margin: 0 0 12px; font-size: 16px; color: #fff; }
.bx-hist-item {
    display: block; padding: 10px 12px; margin-bottom: 8px;
    border-radius: 12px; border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .04); color: var(--text) !important;
    transition: border-color .2s, background .2s;
}
.bx-hist-item:last-child { margin-bottom: 0; }
.bx-hist-item:hover { border-color: rgba(255, 200, 61, .45); background: rgba(255, 200, 61, .08); }
.bx-hist-item.active { border-color: var(--gold); background: rgba(255, 200, 61, .12); }
.bx-hist-item b { display: block; font-size: 14px; margin: 4px 0 2px; color: #fff; }
.bx-hist-item .muted { font-size: 12px; }
.bx-hist-st {
    display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .4px;
    text-transform: uppercase; padding: 2px 7px; border-radius: 999px;
}
.bx-hist-st.live { color: #0b2; background: rgba(60, 220, 120, .2); }
.bx-hist-st.claim { color: #ffc83d; background: rgba(255, 200, 61, .18); }
.bx-hist-st.done { color: var(--muted); background: rgba(255, 255, 255, .08); }

/* ---------- Responsive ---------- */
@media (min-width: 720px) {
    .quick-grid { grid-template-columns: repeat(4, 1fr); }
    .ci-grid { grid-template-columns: repeat(6, 1fr); gap: 10px; }
    .ci-board { padding: 20px 18px 22px; }
    .ci-head h2 { font-size: 30px; letter-spacing: 2px; }
    .ci-day img { width: 42px; height: 42px; }
    .ci-day .amt { font-size: 13px; }
    .hero { min-height: 360px; }
    .hero .hero-logo { height: 128px; }
    .page { padding-top: 26px; }
    .social-dock .dock-items { max-width: 80px; opacity: 1; padding: 10px 8px; }
    .social-dock .dock-toggle { display: none; }
}
@media (min-width: 900px) {
    .bx-layout { grid-template-columns: 260px 1fr; align-items: start; }
    .bx-history { position: sticky; top: 78px; }
}
@media (min-width: 1100px) {
    .top-nav { display: flex; }
}
@media (max-width: 719px) {
    .social-dock { top: auto; bottom: 96px; transform: none; }
    .social-dock .dock-toggle { padding: 10px 6px; font-size: 11px; opacity: .92; }
}
@media (max-width: 560px) {
    .dt-rewards { padding: 14px; }
    .dt-head h3 { font-size: 18px; }
    .dt-chip { font-size: 12px; }
    .dt-chip img { width: 22px; height: 22px; }
    .dt-table th, .dt-table td { padding: 9px 10px; }
    .dt-table .rk { width: 52px; }
    .dt-table th:nth-child(3):nth-last-child(2), .dt-table td:nth-child(3):nth-last-child(2) { display: none; }
    .hero { min-height: 300px; }
    .hero::before { background: linear-gradient(180deg, rgba(12, 7, 22, .1) 0%, rgba(12, 7, 22, .75) 45%, rgba(12, 7, 22, .97) 100%); }
    .tier { grid-template-columns: 70px 1fr; }
    .tier .act { grid-column: 1 / -1; }
    .tier .act .btn-claim { width: 100%; }
    .tier .need b { font-size: 18px; }
    .item { width: 46px; height: 46px; }
    .item img { width: 34px; height: 34px; }
    .section-title { font-size: 21px; }
    .progress-hero .big { font-size: 26px; }
    .topbar .brand img { height: 40px; }
    .xu-chip { font-size: 12.5px; padding: 5px 10px; }
    .download-grid { grid-template-columns: 1fr; }
}
/* ---------- Bài sự kiện ---------- */
.news-all { margin-left: auto; font-size: 14px; font-family: "Be Vietnam Pro", sans-serif; font-weight: 600; }
.news-tag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: rgba(255, 200, 61, .14); color: var(--gold); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.news-st { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; }
.news-st.live { background: rgba(61, 220, 132, .18); color: #3ddc84; }
.news-st.soon { background: rgba(56, 217, 245, .18); color: var(--cyan); }
.news-st.ended { background: rgba(255, 255, 255, .1); color: var(--muted); }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; }
.news-list { display: flex; flex-direction: column; }
.news-line { display: flex; align-items: center; gap: 12px; padding: 11px 6px; border-bottom: 1px dashed rgba(255, 255, 255, .1); color: var(--text) !important; transition: background .2s; border-radius: 8px; }
.news-line:last-child { border-bottom: 0; }
.news-line:hover { background: var(--glass); }
.nl-date { flex: none; width: 52px; display: flex; flex-direction: column; align-items: center; line-height: 1.15; padding: 4px 0; border-radius: 8px; background: rgba(255, 200, 61, .1); }
.nl-date b { color: var(--gold); font-size: 15px; }
.nl-date small { color: var(--muted); font-size: 11px; }
.nl-title { flex: 1; min-width: 0; font-weight: 600; font-size: 14.5px; line-height: 1.4; }
.news-line .news-st { flex: none; font-size: 11px; padding: 2px 7px; }
.news-back { display: inline-block; margin-bottom: 12px; font-weight: 600; }
.news-detail h1 { font-size: 26px; margin: 10px 0 14px; line-height: 1.3; }
.news-hero { width: 100%; display: block; margin: 0 auto 16px; border-radius: 16px; }
.news-body { line-height: 1.75; font-size: 15px; margin-bottom: 18px; word-wrap: break-word; }
.news-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }
.news-toc a { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255, 200, 61, .45); color: var(--gold); font-weight: 700; font-size: 13.5px; background: rgba(255, 200, 61, .08); }
.news-body h2.news-h { font-size: 20px; margin: 26px 0 8px; color: var(--gold); line-height: 1.35; scroll-margin-top: 72px; }
.news-body h3.news-h { font-size: 16.5px; margin: 18px 0 6px; line-height: 1.35; }
.news-shot { width: 100%; max-width: 760px; display: block; margin: 12px auto 16px; border-radius: 12px; }
.news-stars { display: inline-flex; gap: 2px; align-items: center; flex: none; }
.news-stars img, .news-star { width: 28px; height: 28px; }
.news-star { vertical-align: -7px; }
.news-tier { display: flex; align-items: center; gap: 14px; padding: 8px 2px; border-bottom: 1px solid rgba(255,255,255,.08); }
.news-tier b { display: block; font-size: 15px; line-height: 1.3; }
.news-tier span { color: var(--muted); font-size: 13.5px; }
.news-table .news-star { width: 22px; height: 22px; vertical-align: -5px; }
@media (max-width: 560px) {
    .news-tier { gap: 8px; }
    .news-stars img, .news-star { width: 22px; height: 22px; }
    .news-tier b { font-size: 14px; }
}
.news-table-wrap { overflow-x: auto; margin: 8px 0 16px; -webkit-overflow-scrolling: touch; }
.news-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.news-table th, .news-table td { border-bottom: 1px solid rgba(255,255,255,.1); padding: 7px 10px; text-align: right; white-space: nowrap; }
.news-table th:first-child, .news-table td:first-child { text-align: left; }
.news-table th { color: var(--gold); font-weight: 700; }
.news-table tbody tr:nth-child(even) td { background: rgba(255,255,255,.04); }
.news-detail .btn-fire { display: inline-flex; }

/* ---------- Khuyến mãi nạp ---------- */
.km-bar {
    display: flex; align-items: center; gap: 14px; padding: 10px 14px; margin-bottom: 16px; border-radius: 16px;
    background: linear-gradient(90deg, rgba(232, 38, 58, .35), rgba(255, 106, 26, .22) 55%, rgba(255, 200, 61, .12));
    border: 1px solid rgba(255, 200, 61, .55); box-shadow: 0 8px 26px rgba(255, 106, 26, .25); color: var(--text) !important;
}
.km-bar:hover { color: var(--text) !important; border-color: var(--gold); }
.km-bar.live { animation: kmGlow 2.4s ease-in-out infinite; }
@keyframes kmGlow { 50% { box-shadow: 0 8px 34px rgba(255, 140, 26, .6); } }
.km-x {
    flex: none; font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 34px; line-height: 1; padding: 6px 12px; border-radius: 12px;
    background: var(--grad-fire); color: #1a0b00; text-shadow: 0 1px 0 rgba(255, 255, 255, .35);
}
.km-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.km-text b { font-size: 16px; color: var(--gold); }
.km-text small { color: var(--muted); font-size: 12.5px; }
.km-cd { flex: none; display: flex; flex-direction: column; align-items: flex-end; }
.km-cd small { color: var(--muted); font-size: 11.5px; }
.km-cd .countdown { font-size: 17px; }
.km-go { flex: none; padding: 8px 14px; border-radius: 999px; background: var(--grad-fire); color: #1a0b00; font-weight: 800; font-size: 13px; }
.km-pop { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(6, 3, 12, .78); backdrop-filter: blur(3px); }
.km-pop[hidden] { display: none; }
.km-pop-box { position: relative; width: min(440px, 100%); text-align: center; animation: kmIn .35s ease-out; }
.km-pop-box img { width: 100%; border-radius: 18px; border: 2px solid rgba(255, 200, 61, .7); box-shadow: 0 18px 60px rgba(255, 106, 26, .45); display: block; }
.km-pop-box .btn-fire { margin-top: 14px; display: inline-flex; }
.km-pop-close { position: absolute; top: -12px; right: -12px; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--gold); background: #1a0b00; color: var(--gold); font-size: 22px; line-height: 30px; cursor: pointer; z-index: 1; }
@keyframes kmIn { from { transform: scale(.9); opacity: 0; } }
.km-banner { display: block; margin-bottom: 18px; }
.km-banner img { width: 100%; max-width: 560px; display: block; margin: 0 auto; border-radius: 18px; border: 1px solid rgba(255, 200, 61, .5); }
.km-rate-box { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.km-rate-box span { padding: 4px 10px; border-radius: 999px; background: rgba(255, 200, 61, .12); border: 1px solid rgba(255, 200, 61, .35); font-size: 12.5px; }
@media (max-width: 560px) {
    .ci-head { flex-wrap: wrap; }
    .ci-head h2 { font-size: 22px; }
    .ci-count { position: static; transform: none; width: 100%; text-align: right; margin-top: 2px; }
    .ci-account { align-items: flex-start; }
    .ci-bal b { font-size: 18px; }
    .km-bar { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "x text text" "x cd go"; gap: 6px 10px; padding: 10px 12px; }
    .km-x { grid-area: x; align-self: center; font-size: 26px; padding: 6px 9px; }
    .km-text { grid-area: text; }
    .km-text b { font-size: 14.5px; }
    .km-text small { font-size: 12px; }
    .km-cd { grid-area: cd; flex-direction: row; gap: 6px; align-items: center; justify-content: flex-start; }
    .km-cd .countdown { font-size: 15px; }
    .km-go { grid-area: go; align-self: center; padding: 6px 12px; }
}

/* ---------- Giftcode ---------- */
.page:has(.gc-wrap) { max-width: 1180px; }
.gc-top { display: grid; grid-template-columns: 1.35fr .85fr; gap: 14px; align-items: stretch; }
.gc-h { margin: 0 0 12px; font-size: 20px; }
.gc-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gc-picks label { display: flex; flex-direction: column; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.gc-entry { display: flex; gap: 8px; margin-top: 12px; }
.gc-entry input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: 1px; font-size: 16px; }
.gc-hint { font-size: 12px; margin-top: 8px; }
.gc-got { display: flex; flex-direction: column; min-height: 220px; }
.gc-got-list { overflow: auto; max-height: 280px; display: flex; flex-direction: column; gap: 8px; }
.gc-got-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .07);
}
.gc-got-row b { display: block; letter-spacing: .4px; font-size: 14px; color: #8fd7ff; }
.gc-got-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.gc-got-row time { flex: none; color: var(--muted); font-size: 12px; white-space: nowrap; }
.gc-public-title {
    margin: 8px 0 4px; font-size: 28px; letter-spacing: 1px;
    background: linear-gradient(90deg, #7ee7ff, #9af0ff 40%, #d7fff4);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gc-public-note { margin: 0 0 14px; font-size: 13.5px; }
.gc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gc-card {
    padding: 14px 14px 12px; border-radius: 16px;
    background: linear-gradient(180deg, rgba(18, 36, 72, .72), rgba(10, 18, 40, .82));
    border: 1px solid rgba(120, 180, 255, .22);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
}
.gc-card.is-got { opacity: .82; }
.gc-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.gc-code { display: block; font-size: 16px; letter-spacing: .6px; color: #9ad7ff; word-break: break-all; }
.gc-title { margin-top: 2px; font-size: 13px; color: var(--text); }
.gc-limit { margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.gc-pill {
    flex: none; border: 0; border-radius: 999px; padding: 7px 16px; font-weight: 800; font-size: 14px; font-family: inherit;
}
.gc-pill.take { cursor: pointer; background: linear-gradient(180deg, #3ec2ff, #1f8fe6); color: #fff; box-shadow: 0 6px 16px rgba(40, 150, 230, .35); }
.gc-pill.take:hover { filter: brightness(1.08); }
.gc-pill.got { background: rgba(61, 220, 132, .16); color: #7dffa8; border: 1px solid rgba(61, 220, 132, .45); }
.gc-pill.sent { background: rgba(255, 200, 61, .16); color: #ffd56a; border: 1px solid rgba(255, 200, 61, .5); }
.gc-items { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.gc-item { width: auto; min-width: 46px; max-width: 92px; text-align: center; }
.gc-item img {
    width: 42px; height: 42px; object-fit: contain; display: block; margin: 0 auto;
    border-radius: 10px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .08);
}
.gc-item em { display: block; margin-top: 2px; font-style: normal; font-size: 10px; font-weight: 800; color: #ffe08a; line-height: 1.15; word-break: break-all; }
.gc-empty { color: var(--muted); text-align: center; padding: 18px 8px; }
a.gc-event { display: block; color: inherit !important; text-decoration: none; }
a.gc-event:hover { color: inherit !important; border-color: rgba(126, 231, 255, .55); transform: translateY(-2px); }
@media (max-width: 800px) {
    .gc-top, .gc-grid, .gc-picks { grid-template-columns: 1fr; }
    .gc-public-title { font-size: 22px; }
}

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