:root {
  --bg: #0f1218;
  --bg-2: #161a23;
  --bg-3: #1e2431;
  --line: #2a3140;
  --text: #e8ebf1;
  --muted: #8b93a7;
  --accent: #f5a524;
  --r1: #4b69ff;
  --r2: #8847ff;
  --r3: #d32ce6;
  --r4: #eb4b4b;
  --r5: #ffd700;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: radial-gradient(1200px 600px at 70% -10%, #1c2333 0%, var(--bg) 60%);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
input, select { font: inherit; }
[hidden] { display: none !important; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(16px, 4vw, 48px);
  background: rgba(15, 18, 24, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 17px; }
.brand-mark { color: var(--accent); font-size: 20px; }
.brand-tag { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); border: 1px solid currentColor; border-radius: 999px; padding: 2px 8px; }
.topnav { display: flex; gap: clamp(12px, 3vw, 28px); font-size: 14px; color: var(--muted); }
.topnav a:hover { color: var(--text); }
.pill { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--bg-3); color: var(--text); font-size: 12px; text-align: center; }

main { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px) 80px; }

.hero { padding: clamp(48px, 8vw, 96px) 0 32px; max-width: 720px; }
.hero h1 { font-size: clamp(34px, 6vw, 64px); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 16px; font-weight: 800; }
.hero p { font-size: clamp(15px, 1.6vw, 18px); color: var(--muted); margin: 0 0 32px; }
.hero-stats { display: flex; gap: clamp(20px, 4vw, 48px); flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-size: clamp(24px, 3vw, 36px); font-weight: 700; letter-spacing: -0.02em; }
.hero-stats span { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }

.section { padding: 48px 0 8px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.section-head h2 { font-size: clamp(22px, 3vw, 30px); letter-spacing: -0.02em; margin: 0; }
.section-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.section-tools input[type="search"], .section-tools select {
  background: var(--bg-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 12px; min-width: 160px;
}
.toggle { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); cursor: pointer; user-select: none; }
.toggle input { accent-color: var(--accent); }

.btn { border: 1px solid var(--line); background: var(--bg-3); color: var(--text); border-radius: 8px; padding: 8px 14px; font-weight: 500; transition: transform .15s, background .15s, border-color .15s; }
.btn:hover { transform: translateY(-1px); border-color: #3a4358; }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #1a1200; font-weight: 700; }
.btn-primary:hover { background: #ffb63a; border-color: #ffb63a; }
.btn-ghost { background: transparent; }
.btn-lg { padding: 12px 22px; font-size: 16px; border-radius: 10px; }

/* Case grid */
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.case-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; display: flex; flex-direction: column; gap: 8px; text-align: center;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.case-card:hover { transform: translateY(-3px); border-color: #3a4358; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.case-card img { width: 100%; aspect-ratio: 4/3; object-fit: contain; margin: 0 auto; filter: drop-shadow(0 8px 14px rgba(0,0,0,.4)); }
.case-card h3 { margin: 4px 0 0; font-size: 14px; font-weight: 600; line-height: 1.3; min-height: 2.6em; }
.case-card .year { font-size: 12px; color: var(--muted); }
.case-card .actions { display: flex; gap: 6px; margin-top: auto; }
.case-card .actions .btn { flex: 1; padding: 8px 6px; font-size: 13px; }

/* Inventory */
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.item {
  position: relative; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px; border-bottom: 3px solid var(--rc, var(--line)); overflow: hidden;
  transition: transform .15s;
}
.item:hover { transform: translateY(-2px); }
.item::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120px 60px at 50% 0%, color-mix(in srgb, var(--rc) 30%, transparent), transparent 70%); pointer-events: none; }
.item img { width: 100%; aspect-ratio: 4/3; object-fit: contain; position: relative; }
.item .name { font-size: 12px; font-weight: 600; line-height: 1.3; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item .sub { font-size: 11px; color: var(--muted); }
.item .st { position: absolute; top: 8px; left: 8px; font-size: 10px; font-weight: 700; color: #ff8a3d; background: rgba(0,0,0,.5); padding: 2px 6px; border-radius: 4px; }
.item .from { position: absolute; top: 8px; right: 8px; font-size: 10px; color: var(--muted); }
.empty { color: var(--muted); text-align: center; padding: 32px; border: 1px dashed var(--line); border-radius: var(--radius); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat-row { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; border-left: 4px solid var(--rc); }
.stat-row .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.stat-row .val { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.stat-row .cmp { font-size: 12px; color: var(--muted); }

/* Odds */
.odds-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.card h3 { margin: 0 0 12px; font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.odds-list { list-style: none; margin: 0; padding: 0; }
.odds-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.odds-list li:last-child { border-bottom: 0; }
.odds-list li b { margin-left: auto; font-weight: 600; }
.odds-list i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.note { font-size: 12px; color: var(--muted); margin: 12px 0 0; }

.footer { border-top: 1px solid var(--line); padding: 24px clamp(16px, 4vw, 48px); font-size: 12px; color: var(--muted); text-align: center; }
.footer a { text-decoration: underline; }
.muted { color: var(--muted); }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(5, 7, 11, .8); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .2s; }
.modal-box { position: relative; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 24px; animation: pop .25s; }
.modal-wide { max-width: 960px; }
.modal-close { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: var(--muted); font-size: 28px; line-height: 1; }
.modal-close:hover { color: var(--text); }
@keyframes fade { from { opacity: 0 } }
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0 } }

.case-detail-head { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.case-detail-head img { width: 180px; filter: drop-shadow(0 10px 20px rgba(0,0,0,.5)); }
.case-detail-head h2 { margin: 0 0 4px; font-size: 24px; }
.case-detail-head p { margin: 0 0 14px; }
.cd-group { margin-bottom: 18px; }
.cd-group h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--rc); display: flex; align-items: center; gap: 8px; }
.cd-group h4 span { color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; }
.cd-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.cd-list .item { padding: 8px; }
.cd-list .item img { aspect-ratio: 4/3; }
.cd-list .item .name { font-size: 11px; }

/* Roulette */
.modal-open { max-width: 900px; padding: 24px 0 28px; overflow: hidden; }
.open-title { text-align: center; margin: 0 0 16px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.roulette {
  position: relative;
  height: 150px;
  overflow: hidden;
  background: var(--bg);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  contain: paint layout;
}
.roulette::before, .roulette::after { content: ""; position: absolute; top: 0; bottom: 0; width: 80px; z-index: 2; pointer-events: none; }
.roulette::before { left: 0; background: linear-gradient(90deg, var(--bg-2), transparent); }
.roulette::after { right: 0; background: linear-gradient(-90deg, var(--bg-2), transparent); }
.roulette-marker { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--accent); z-index: 3; box-shadow: 0 0 10px var(--accent); }
.roulette-marker::before, .roulette-marker::after { content: ""; position: absolute; left: 50%; border: 7px solid transparent; transform: translateX(-50%); }
.roulette-marker::before { top: 0; border-top-color: var(--accent); }
.roulette-marker::after { bottom: 0; border-bottom-color: var(--accent); }
.roulette-strip {
  display: flex;
  gap: 6px;
  height: 100%;
  padding: 6px 0;
  will-change: transform;
}
.tile {
  flex: 0 0 var(--tile, 150px);
  width: var(--tile, 150px);
  height: 100%;
  background: var(--bg-3);
  border-radius: 8px;
  border-bottom: 4px solid var(--rc);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px;
  user-select: none;
  pointer-events: none;
}
.tile img {
  width: 100%;
  height: 80%;
  object-fit: contain;
  pointer-events: none;
}
.tile .name { font-size: 10px; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }

/* Result */
.result { padding: 24px 24px 0; text-align: center; animation: pop .35s; }
.result-card { position: relative; display: inline-block; width: min(100%, 380px); background: var(--bg-3); border: 1px solid var(--line); border-radius: 16px; padding: 22px 22px 18px; border-bottom: 5px solid var(--rc); box-shadow: 0 0 60px color-mix(in srgb, var(--rc) 30%, transparent); }
.result-card img { width: 100%; aspect-ratio: 4/3; object-fit: contain; filter: drop-shadow(0 14px 24px rgba(0,0,0,.5)); }
.result-card h3 { margin: 10px 0 4px; font-size: 20px; line-height: 1.25; }
.result-card p { margin: 0; font-size: 13px; }
.res-rarity { display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--rc); background: color-mix(in srgb, var(--rc) 15%, transparent); padding: 4px 10px; border-radius: 999px; }
.result-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.st-badge { color: #ff8a3d; }

@media (max-width: 640px) {
  .topnav { font-size: 13px; }
  .topnav a:nth-child(2), .topnav a:nth-child(3) { display: none; }
  .case-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .case-card { padding: 10px; }
  .inv-grid { grid-template-columns: repeat(2, 1fr); }
  .roulette { height: 120px; --tile: 110px; }
  .tile { --tile: 110px; }
  .modal-box { padding: 18px; }
  .modal-open { padding: 18px 0 22px; }
  .case-detail-head img { width: 120px; }
  .cd-list { grid-template-columns: repeat(3, 1fr); }
}

/* ===== v2: giá, zoom, battle ===== */
.price { color: #7ee2a8; font-weight: 600; font-variant-numeric: tabular-nums; }
.price-vnd { font-size: .85em; color: var(--muted); font-weight: 400; }
.item .price { font-size: 12px; margin-top: 2px; display: block; }
.case-card .cost { font-size: 12px; color: var(--muted); }
.case-card .cost b { color: var(--text); font-weight: 600; }
.inv-value { font-size: 15px; font-weight: 500; margin-left: 8px; }
.res-price { margin-top: 8px !important; font-size: 18px !important; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.modal-title { margin: 0 0 18px; font-size: 22px; }
.stat-row.profit .val.pos { color: #7ee2a8; }
.stat-row.profit .val.neg { color: #ff7b7b; }

.zoom-hint { position: relative; display: block; width: 100%; background: none; border: 0; padding: 0; color: inherit; cursor: zoom-in; }
.zoom-hint span { position: absolute; right: 6px; bottom: 6px; font-size: 11px; color: var(--muted); background: rgba(0,0,0,.55); padding: 3px 8px; border-radius: 999px; opacity: 0; transition: opacity .2s; }
.zoom-hint:hover span { opacity: 1; }
@media (hover: none) { .zoom-hint span { opacity: 1; } }
.item { cursor: zoom-in; }

/* Zoom modal */
.modal-dark { background: rgba(3, 4, 7, .96); padding: 0; flex-direction: column; }
.zoom-close {
  position: fixed;
  top: 12px;
  right: 16px;
  z-index: 100000 !important;
  font-size: 32px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 14, 22, 0.85);
  color: var(--text);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.zoom-close:hover {
  background: rgba(240, 60, 60, 0.9);
  color: #fff;
  border-color: rgba(255, 100, 100, 0.5);
  transform: scale(1.08);
}
.zoom-stage { flex: 1; width: 100%; overflow: hidden; display: flex; align-items: center; justify-content: center; cursor: grab; touch-action: none; user-select: none; }
.zoom-stage.dragging { cursor: grabbing; }
.zoom-stage img { max-width: min(90vw, 900px); max-height: 70vh; transform-origin: center; will-change: transform; filter: drop-shadow(0 30px 50px rgba(0,0,0,.7)); }
.zoom-bar { width: 100%; padding: 14px clamp(16px, 4vw, 48px) 20px; border-top: 1px solid var(--line); background: var(--bg-2); display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.zoom-info { display: flex; flex-direction: column; flex: 1; min-width: 200px; }
.zoom-info b { font-size: 16px; }
.zoom-info span { font-size: 13px; }
.zoom-ctrl { display: flex; align-items: center; gap: 6px; }
.zoom-ctrl .btn { min-width: 40px; }
#zoom-level { min-width: 52px; text-align: center; font-variant-numeric: tabular-nums; font-size: 14px; }
.zoom-tip { width: 100%; margin: 0; font-size: 12px; }

/* Battle intro */
.battle-intro { display: flex; gap: 20px; align-items: center; }
.battle-intro h3 { margin: 0 0 6px; font-size: 18px; text-transform: none; letter-spacing: 0; color: var(--text); }
.battle-intro p { margin: 0 0 6px; font-size: 14px; }

/* Battle setup */
.bs-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; }
.bs-field { margin-bottom: 18px; }
.bs-field > label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 3px; gap: 3px; }
.seg button { background: transparent; border: 0; color: var(--muted); padding: 7px 14px; border-radius: 6px; font-weight: 500; }
.seg button.active { background: var(--bg-3); color: var(--text); }
.bs-selected { display: flex; flex-wrap: wrap; gap: 8px; }
.bs-chip { display: flex; align-items: center; gap: 6px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px 4px 4px; font-size: 13px; }
.bs-chip img { width: 36px; height: 27px; object-fit: contain; }
.bs-chip .qty { display: flex; align-items: center; gap: 2px; margin-left: 4px; }
.bs-chip .qty button { width: 22px; height: 22px; border-radius: 5px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 13px; line-height: 1; padding: 0; }
.bs-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.bs-summary div { display: flex; flex-direction: column; }
.bs-summary b { font-size: 20px; }
.bs-right input { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; }
.bs-cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); grid-auto-rows: max-content; gap: 8px; max-height: 52vh; overflow: auto; padding-right: 4px; }
.bs-case { background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; color: var(--text); display: flex; flex-direction: column; gap: 4px; transition: border-color .15s, transform .15s; }
.bs-case:hover { border-color: var(--accent); transform: translateY(-2px); }
.bs-case img { width: 100%; aspect-ratio: 4/3; object-fit: contain; }
.bs-case .n { font-size: 11px; font-weight: 600; line-height: 1.25; }
.bs-case .c { font-size: 11px; color: var(--muted); }

/* Battle screen */
.modal-battle { max-width: 1100px; padding: 18px 20px 24px; }
.bt-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.bt-head .open-title { text-align: left; margin-bottom: 8px; }
.bt-rounds { display: flex; gap: 6px; flex-wrap: wrap; }
.bt-rounds img { width: 44px; height: 33px; object-fit: contain; opacity: .35; border-radius: 6px; padding: 2px; border: 1px solid transparent; transition: opacity .2s; }
.bt-rounds img.done { opacity: .8; }
.bt-rounds img.now { opacity: 1; border-color: var(--accent); background: var(--bg-3); }
.bt-players { display: grid; grid-template-columns: repeat(var(--n, 2), 1fr); gap: 12px; }
.bt-player { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .3s, border-color .3s; }
.bt-player.winner { border-color: var(--accent); box-shadow: 0 0 40px rgba(245, 165, 36, .25); }
.bt-player.loser { opacity: .55; }
.bt-ph { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.bt-ph .av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; background: var(--bg-3); flex-shrink: 0; }
.bt-ph .av.me { background: var(--accent); color: #1a1200; }
.bt-ph .nm { font-size: 13px; font-weight: 600; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-ph .tot { font-size: 15px; font-weight: 700; color: #7ee2a8; font-variant-numeric: tabular-nums; }
.bt-reel { position: relative; height: 210px; overflow: hidden; background: var(--bg-2); }
.bt-reel::before, .bt-reel::after { content: ""; position: absolute; left: 0; right: 0; height: 60px; z-index: 2; pointer-events: none; }
.bt-reel::before { top: 0; background: linear-gradient(var(--bg-2), transparent); }
.bt-reel::after { bottom: 0; background: linear-gradient(transparent, var(--bg-2)); }
.bt-marker { position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--accent); z-index: 3; box-shadow: 0 0 10px var(--accent); }
.bt-strip {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 10px;
  will-change: transform;
}
.bt-tile {
  flex: 0 0 var(--th, 90px);
  height: var(--th, 90px);
  background: var(--bg-3);
  border-radius: 8px;
  border-left: 4px solid var(--rc);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  user-select: none;
  pointer-events: none;
}
.bt-tile img {
  height: 100%;
  width: 45%;
  object-fit: contain;
  flex-shrink: 0;
  pointer-events: none;
}
.bt-tile .n { font-size: 11px; line-height: 1.3; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bt-tile .p { font-size: 12px; font-weight: 600; color: #7ee2a8; }
.bt-drops { display: flex; flex-direction: column; gap: 6px; padding: 10px; min-height: 60px; }
.bt-drop {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-2);
  border-radius: 8px;
  padding: 4px 8px 4px 4px;
  border-left: 3px solid var(--rc);
  font-size: 12px;
  animation: pop .3s;
  cursor: pointer;
  transition: transform .15s, background .15s, box-shadow .15s;
}
.bt-drop:hover {
  background: var(--bg-3);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.bt-drop img { width: 44px; height: 33px; object-fit: contain; }
.bt-drop .n { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bt-drop .p { color: #7ee2a8; font-weight: 600; white-space: nowrap; }
.bt-final { text-align: center; padding: 22px 0 0; animation: pop .35s; }
.bt-final h3 { margin: 0 0 6px; font-size: 26px; }
.bt-final p { margin: 0; }

@media (max-width: 760px) {
  .bs-grid { grid-template-columns: 1fr; }
  .bs-cases { max-height: 40vh; grid-template-columns: repeat(3, 1fr); }
  .bt-players { gap: 6px; }
  .bt-ph { padding: 8px 6px; gap: 5px; flex-wrap: wrap; }
  .bt-ph .av { width: 24px; height: 24px; font-size: 12px; }
  .bt-ph .nm { font-size: 11px; }
  .bt-ph .tot { font-size: 12px; width: 100%; }
  .bt-reel { height: 170px; }
  .bt-tile { --th: 70px; flex-direction: column; gap: 2px; padding: 4px; text-align: center; border-left: 0; border-bottom: 3px solid var(--rc); }
  .bt-tile img { width: 100%; height: 60%; }
  .bt-tile .n { display: none; }
  .bt-tile .p { font-size: 11px; }
  .bt-strip { padding: 0 4px; }
  .bt-drops { padding: 6px; gap: 4px; }
  .bt-drop { flex-direction: column; align-items: stretch; gap: 2px; padding: 4px; font-size: 10px; border-left: 0; border-bottom: 2px solid var(--rc); }
  .bt-drop img { width: 100%; height: 30px; }
  .bt-drop .n { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .modal-battle { padding: 14px 10px 18px; }
  .topnav a:nth-child(2) { display: none; }
}

/* ===== v3: ví, hòm đặc biệt, trade, bán ===== */
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
.wallet { display: flex; align-items: center; gap: 8px; margin-left: auto; margin-right: 8px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 12px; }
.wallet-label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.wallet b { color: #7ee2a8; font-variant-numeric: tabular-nums; font-size: 14px; }
.wallet .btn-sm { background: var(--accent); border-color: var(--accent); color: #1a1200; font-weight: 700; }
.topnav { margin-left: 0; }

.case-note { margin: -8px 0 16px; font-size: 13px; }
.case-card.custom { background: linear-gradient(180deg, color-mix(in srgb, var(--tag, #f5a524) 10%, var(--bg-2)), var(--bg-2)); }
.case-card .tag { position: absolute; top: 10px; left: 10px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--tag, var(--accent)); background: rgba(0,0,0,.45); padding: 3px 7px; border-radius: 999px; }
.case-card { position: relative; }
.case-card .desc { font-size: 11px; color: var(--muted); line-height: 1.35; }
.item .sell { display: block; width: 100%; margin-top: 8px; position: relative; z-index: 2; font-size: 12px; padding: 5px 8px; border-radius: 6px; background: var(--bg-3); border: 1px solid var(--line); color: #7ee2a8; font-weight: 600; transition: background .15s, border-color .15s; }
.item .sell:hover { background: #24402f; border-color: #7ee2a8; }
.item .odds { font-size: 11px; color: var(--accent); }

/* Trade */
.trade-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.trade-card h3 { text-transform: none; letter-spacing: 0; color: var(--text); font-size: 17px; }
.trade-card p { font-size: 14px; margin: 0 0 14px; }
.modal-trade { max-width: 1100px; }
.tr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tr-col { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; min-height: 0; }
.tr-col-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tr-col-head h4 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); flex: 1; }
.tr-col-head input, .tr-col-head select { background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.tr-col-head input { flex: 1 1 120px; min-width: 0; }
.tr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); grid-auto-rows: max-content; gap: 8px; max-height: 44vh; overflow: auto; padding-right: 4px; align-content: start; }
.tr-list .item { padding: 8px; cursor: pointer; }
.tr-list .item .name { font-size: 11px; }
.tr-list .item .sub { font-size: 10px; }
.tr-list .item .price { font-size: 12px; }
.item.pick { border-color: var(--line); }
.item.pick.selected { outline: 2px solid var(--accent); outline-offset: -1px; background: color-mix(in srgb, var(--accent) 8%, var(--bg-2)); }
.item.pick .chk { position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--muted); background: rgba(0,0,0,.4); z-index: 2; display: grid; place-items: center; font-size: 11px; color: #1a1200; }
.item.pick.selected .chk { background: var(--accent); border-color: var(--accent); }
.item.pick.selected .chk::after { content: "✓"; font-weight: 800; }
.item.pick .zoom-btn {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 3;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 6px;
  font-size: 13px;
  padding: 2px 6px;
  cursor: pointer;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.item.pick .zoom-btn:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  transform: scale(1.18);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.item.pick.disabled { opacity: .35; pointer-events: none; }
.tr-more { width: 100%; margin-top: 8px; }
.tr-summary { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.tr-sum-row { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 10px; }
.tr-sum-row div { display: flex; flex-direction: column; }
.tr-sum-row span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.tr-sum-row b { font-size: 18px; font-variant-numeric: tabular-nums; }
.tr-sum-row b.pos { color: #7ee2a8; }
.tr-sum-row b.neg { color: #ff7b7b; }
#tr-msg { margin: 0 0 10px; font-size: 13px; }
.tu-tabs { margin-bottom: 14px; flex-wrap: wrap; }
.tu-outcomes { display: flex; flex-direction: column; gap: 6px; max-height: 44vh; overflow: auto; padding-right: 4px; }
.tu-out { display: flex; align-items: center; gap: 10px; background: var(--bg-2); border-radius: 8px; padding: 6px 10px 6px 6px; border-left: 3px solid var(--rc); font-size: 12px; cursor: zoom-in; }
.tu-out img { width: 56px; height: 42px; object-fit: contain; }
.tu-out .n { flex: 1; line-height: 1.3; }
.tu-out .n small { display: block; color: var(--muted); }
.tu-out .pr { color: #7ee2a8; font-weight: 600; white-space: nowrap; }
.tu-out .pc { font-weight: 700; color: var(--accent); min-width: 52px; text-align: right; }
.tu-bar { height: 3px; background: var(--bg-3); border-radius: 2px; margin-top: 4px; overflow: hidden; }
.tu-bar i { display: block; height: 100%; background: var(--accent); }

/* ===== Modal Upgrade (Nâng Cấp Skin) ===== */
.modal-upgrade { max-width: 1320px; width: 96vw; padding: 20px 24px; }
.up-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.up-head .modal-title { margin: 0; }
.up-badge { background: rgba(0, 245, 160, 0.12); color: #00f5a0; border: 1px solid rgba(0, 245, 160, 0.3); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 4px 10px; border-radius: 999px; }

.up-layout { display: grid; grid-template-columns: minmax(280px, 1.15fr) minmax(320px, 360px) minmax(280px, 1.15fr); gap: 16px; align-items: stretch; }
.up-col { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; min-height: 0; box-shadow: 0 4px 20px rgba(0,0,0,.25); }
.up-col-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.up-col-header h4 { margin: 0; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text); }
.up-col-actions { display: flex; gap: 6px; }

.up-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.up-filters input, .up-filters select { background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 12px; }
.up-filters input { flex: 1 1 120px; min-width: 0; }

.up-list { max-height: 48vh; min-height: 320px; }

/* Bội số chọn nhanh */
.up-mult-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.up-mult-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.up-mult-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.up-chip { background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); border-radius: 6px; padding: 3px 8px; font-size: 11px; font-weight: 700; cursor: pointer; transition: all .15s; }
.up-chip:hover { border-color: var(--accent); color: var(--text); }
.up-chip.active { background: var(--accent); border-color: var(--accent); color: #1a1200; box-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }

/* Cột giữa: Vòng xoay */
.up-col-center { background: radial-gradient(circle at center 40%, rgba(26, 31, 46, 0.8), rgba(12, 14, 20, 0.95)); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; box-shadow: 0 8px 30px rgba(0,0,0,.4); position: relative; overflow: hidden; }

/* So sánh 2 bên */
.up-compare { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 10px; margin-bottom: 12px; }
.up-compare-box { flex: 1; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; text-align: center; }
.up-compare-box .lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 2px; }
.up-compare-box b { font-size: 15px; font-variant-numeric: tabular-nums; color: var(--text); }
.up-box-wager b { color: #00f5a0; }
.up-box-target b { color: #ffd700; }
.up-compare-box small { font-size: 11px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.up-compare-vs { font-size: 14px; font-weight: 800; color: var(--muted); }

/* Container Vòng xoay */
.up-wheel-container { position: relative; width: 270px; height: 270px; margin: 6px auto 14px; display: grid; place-items: center; }
.up-wheel-outer { position: relative; width: 260px; height: 260px; border-radius: 50%; box-shadow: 0 0 35px rgba(0, 245, 160, 0.1), inset 0 0 25px rgba(0,0,0,0.8); }
.up-wheel-svg { width: 100%; height: 100%; filter: drop-shadow(0 0 10px rgba(0, 245, 160, 0.25)); }
.up-wheel-track { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 16; }
.up-wheel-arc { fill: none; stroke: url(#winGrad); stroke-width: 16; stroke-linecap: round; transition: stroke-dashoffset .25s ease, stroke-dasharray .25s ease; }

/* Kim quay */
.up-needle-wrap { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; transform-origin: 50% 50%; }
.up-needle { position: absolute; top: 50%; left: 50%; width: 4px; height: 116px; margin-left: -2px; margin-top: -116px; transform-origin: 50% 100%; will-change: transform; }
.up-needle::before { content: ''; position: absolute; bottom: 0; left: -8px; width: 20px; height: 20px; border-radius: 50%; background: #ffd700; box-shadow: 0 0 12px rgba(255, 215, 0, 0.8); }
.up-needle-tip { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-bottom: 24px solid #ffd700; filter: drop-shadow(0 0 8px #ffd700); }

/* Thông tin trung tâm */
.up-wheel-center-info { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, #1c2230 0%, #10141d 100%); border: 2px solid rgba(255, 255, 255, 0.1); display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(0,0,0,0.6); pointer-events: none; }
.up-center-title { font-size: 9px; font-weight: 700; letter-spacing: .12em; color: var(--muted); margin-bottom: 2px; }
.up-rate-num { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; color: #fff; text-shadow: 0 0 12px rgba(0, 245, 160, 0.6); }
.up-multiplier-badge { font-size: 11px; font-weight: 700; color: #ffd700; background: rgba(255, 215, 0, 0.12); border-radius: 4px; padding: 2px 6px; margin-top: 2px; }

/* Thanh kéo tỉ lệ */
.up-slider-box { width: 100%; max-width: 290px; margin: 0 auto 12px; display: flex; flex-direction: column; gap: 6px; }
.up-slider-header { display: flex; align-items: center; justify-content: space-between; }
.up-slider-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.up-slider-val-display { font-size: 14px; font-weight: 800; color: #00f5a0; font-variant-numeric: tabular-nums; }
.up-slider-control { display: flex; align-items: center; gap: 8px; }
.up-slider-bound { font-size: 10px; font-weight: 700; color: var(--muted); min-width: 22px; text-align: center; }
.up-range-slider { flex: 1; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); outline: none; transition: background .15s; cursor: pointer; }
.up-range-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #00f5a0; box-shadow: 0 0 10px rgba(0, 245, 160, 0.8); cursor: pointer; border: 2px solid #fff; transition: transform .1s; }
.up-range-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.up-range-slider::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #00f5a0; box-shadow: 0 0 10px rgba(0, 245, 160, 0.8); cursor: pointer; border: 2px solid #fff; }
.up-slider-presets { display: flex; gap: 4px; justify-content: space-between; margin-top: 2px; }
.up-preset-btn { flex: 1; background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 700; padding: 4px 0; border-radius: 6px; cursor: pointer; transition: all .15s; }
.up-preset-btn:hover { border-color: #00f5a0; color: #00f5a0; }
.up-preset-btn.active { background: rgba(0, 245, 160, 0.15); border-color: #00f5a0; color: #00f5a0; }

.up-wheel-outer { cursor: grab; user-select: none; touch-action: none; }
.up-wheel-outer:active { cursor: grabbing; }

/* Selector TRÁI / PHẢI */
.up-direction-selector { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 12px; width: 100%; }
.up-dir-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.up-dir-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; max-width: 260px; }
.up-dir-btn { background: var(--bg-2); color: var(--muted); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 12px; font-weight: 700; cursor: pointer; transition: all .2s; display: flex; align-items: center; justify-content: center; gap: 6px; }
.up-dir-btn:hover { border-color: rgba(0, 245, 160, 0.5); color: var(--text); }
.up-dir-btn.active { background: rgba(0, 245, 160, 0.15); border-color: #00f5a0; color: #00f5a0; box-shadow: 0 0 14px rgba(0, 245, 160, 0.3); }

/* Nút Nâng cấp */
.up-action-wrap { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.up-btn-roll { width: 100%; max-width: 280px; padding: 14px 20px; font-size: 16px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; box-shadow: 0 6px 20px rgba(255, 215, 0, 0.35); transition: transform .15s, box-shadow .15s; }
.up-btn-roll:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5); }
.up-btn-roll:not(:disabled):active { transform: translateY(1px); }
.up-status-msg { margin: 0; font-size: 12px; text-align: center; }

/* Panel Kết quả */
.up-result-panel { position: absolute; inset: 12px; background: rgba(13, 16, 24, 0.96); border: 2px solid var(--line); border-radius: 12px; z-index: 10; padding: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; backdrop-filter: blur(8px); animation: fadeInScale .3s ease; }
@keyframes fadeInScale { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }
.up-result-panel.win { border-color: #00f5a0; box-shadow: 0 0 35px rgba(0, 245, 160, 0.35); }
.up-result-panel.lose { border-color: #ff5252; box-shadow: 0 0 35px rgba(255, 82, 82, 0.35); }
.up-res-badge { font-size: 18px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; padding: 4px 16px; border-radius: 999px; }
.up-result-panel.win .up-res-badge { background: #00f5a0; color: #0b1f14; box-shadow: 0 0 15px rgba(0, 245, 160, 0.7); }
.up-result-panel.lose .up-res-badge { background: #ff5252; color: #fff; box-shadow: 0 0 15px rgba(255, 82, 82, 0.7); }
.up-res-content { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.up-res-content img { width: 140px; height: 100px; object-fit: contain; filter: drop-shadow(0 10px 20px rgba(0,0,0,.6)); cursor: zoom-in; transition: transform .15s; }
.up-res-content img:hover { transform: scale(1.08); }
.up-res-content h4 { margin: 0; font-size: 15px; font-weight: 700; }
.up-res-content p { margin: 0; font-size: 12px; }
.up-res-price { font-size: 18px; color: #7ee2a8; font-variant-numeric: tabular-nums; }
.up-res-actions { display: flex; gap: 8px; margin-top: 6px; }

/* Responsive Upgrade Modal */
@media (max-width: 1080px) {
  .up-layout { grid-template-columns: 1fr 1fr; }
  .up-col-center { grid-column: span 2; order: -1; }
}
@media (max-width: 760px) {
  .modal-upgrade { width: 98vw; padding: 12px; }
  .up-layout { grid-template-columns: 1fr; }
  .up-col-center { grid-column: span 1; }
  .up-wheel-container { width: 230px; height: 230px; }
  .up-wheel-outer { width: 220px; height: 220px; }
  .up-wheel-center-info { width: 130px; height: 130px; }
  .up-rate-num { font-size: 22px; }
  .up-needle { height: 96px; margin-top: -96px; }
}

/* Stats */
.stats-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; margin-top: 12px; }
.stats-cases { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow: auto; }
.sc-row { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 6px 8px; background: var(--bg); border-radius: 8px; }
.sc-row img { width: 40px; height: 30px; object-fit: contain; }
.sc-row .n { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sc-row .c { font-weight: 700; min-width: 44px; text-align: right; }
.sc-row .s { color: var(--muted); min-width: 70px; text-align: right; font-size: 12px; }
.best { display: flex; gap: 14px; align-items: center; }
.best img { width: 140px; filter: drop-shadow(0 8px 16px rgba(0,0,0,.5)); }
.best .n { font-weight: 600; }
.best .p { color: #7ee2a8; font-weight: 700; font-size: 18px; }
.best .s { font-size: 12px; color: var(--muted); }

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; }
  .wallet { order: 3; width: 100%; margin: 6px 0 0; justify-content: space-between; }
  .tr-grid { grid-template-columns: 1fr; }
  .tr-list { max-height: 30vh; grid-template-columns: repeat(3, 1fr); }
  .tu-outcomes { max-height: 30vh; }
  .stats-2 { grid-template-columns: 1fr; }
  .tr-sum-row { gap: 12px; }
  .tr-sum-row b { font-size: 15px; }
}

/* Phân trang kho đồ */
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.pager button { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); font-size: 13px; }
.pager button.active { background: var(--accent); border-color: var(--accent); color: #1a1200; font-weight: 700; }
.pager button:disabled { opacity: .35; cursor: default; }
.pager .info { font-size: 12px; color: var(--muted); margin-left: 8px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--bg-3); border: 1px solid var(--line); color: var(--text); padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 100; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.pos { color: #7ee2a8; } .neg { color: #ff7b7b; }

/* Header mobile gọn */
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 6px 8px; padding: 8px 12px; align-items: center; }
  .brand { font-size: 14px; flex-shrink: 0; }
  .brand-tag { display: none; }
  .profile-chip { order: 1; margin-left: auto; padding: 4px 8px; font-size: 11px; flex-shrink: 0; }
  .profile-chip b { max-width: 72px; }
  .wallet { order: 2; width: auto; margin: 0 0 0 4px; padding: 3px 6px; gap: 4px; flex-shrink: 0; }
  .wallet-label { display: none; }
  .wallet b { font-size: 12px; }
  .wallet .btn-sm { padding: 3px 6px; font-size: 11px; }
  .topnav { order: 3; width: 100%; justify-content: space-between; gap: 4px; font-size: 13px; }
  .topnav a:nth-child(2), .topnav a:nth-child(3), .topnav a:nth-child(4) { display: inline; }
  .topnav a:nth-child(5), .topnav a:nth-child(6) { display: none; }
}

.h-sub { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 10px; letter-spacing: 0; }
@media (max-width: 760px) { .topnav a:nth-child(2) { display: inline; } .topnav a:nth-child(5), .topnav a:nth-child(6), .topnav a:nth-child(7) { display: none; } }

/* ===== Inspect / trang bị ===== */
.zoom-stage { perspective: 1400px; position: relative; }
.zoom-glow { position: absolute; width: min(70vw, 700px); height: min(70vw, 700px); border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--rc, #ffd700) 28%, transparent) 0%, transparent 65%); filter: blur(20px); pointer-events: none; animation: glowPulse 3s ease-in-out infinite; }
@keyframes glowPulse { 0%, 100% { transform: scale(.9); opacity: .7 } 50% { transform: scale(1.05); opacity: 1 } }
.zoom-wrap { position: relative; transform-style: preserve-3d; will-change: transform; animation: drawIn .55s cubic-bezier(.2,.9,.3,1.2); }
.zoom-wrap.idle { animation: drawIn .55s cubic-bezier(.2,.9,.3,1.2), floatY 4s ease-in-out .55s infinite; }
@keyframes drawIn { from { transform: translateY(80px) rotateX(25deg) rotateY(-20deg) scale(.85); opacity: 0 } to { transform: none; opacity: 1 } }
@keyframes floatY { 0%, 100% { translate: 0 0 } 50% { translate: 0 -10px } }
.zoom-wrap.inspecting { animation: inspectSpin 1.7s cubic-bezier(.45,.05,.3,1) !important; }
@keyframes inspectSpin { 0% { transform: rotateY(0) rotateX(0) scale(1) } 30% { transform: rotateY(120deg) rotateX(12deg) scale(1.08) } 60% { transform: rotateY(250deg) rotateX(-10deg) scale(1.08) } 100% { transform: rotateY(360deg) rotateX(0) scale(1) } }
.zoom-wrap img { position: relative; z-index: 1; }
.zoom-shine { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.55) 48%, rgba(255,255,255,.9) 50%, rgba(255,255,255,.55) 52%, transparent 70%); background-size: 250% 100%; background-position: 120% 0; -webkit-mask-image: var(--mask); mask-image: var(--mask); -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; mix-blend-mode: screen; }
.zoom-shine.run { animation: shineSweep 1.1s ease-in-out; }
@keyframes shineSweep { 0% { opacity: 0; background-position: 120% 0 } 15% { opacity: 1 } 85% { opacity: 1 } 100% { opacity: 0; background-position: -120% 0 } }
.item .eq { position: absolute; top: 8px; left: 8px; z-index: 2; font-size: 10px; font-weight: 700; color: #1a1200; background: var(--accent); padding: 2px 6px; border-radius: 4px; }
.item .eq.shift { top: 28px; }
.item img { transition: transform .15s; }
.item:active img { transform: scale(.94) rotate(-3deg); }
.zoom-hint img { transition: transform .15s; }
.zoom-hint:active img { transform: scale(.96); }
@media (prefers-reduced-motion: reduce) { .zoom-wrap, .zoom-wrap.idle, .zoom-glow { animation: none !important; } }

/* ===== Ảnh hòm đặc biệt kiểu Skin Club ===== */
.cc-art { position: relative; width: 100%; aspect-ratio: 1/0.9; margin: 0 auto 4px; display: grid; place-items: center; overflow: visible; }
.cc-art::before { content: ""; position: absolute; inset: 12% 8% 6%; border-radius: 50%; background: radial-gradient(ellipse at 50% 60%, color-mix(in srgb, var(--tag) 55%, transparent), transparent 70%); filter: blur(14px); opacity: .8; transition: opacity .3s, transform .3s; }
.cc-art .crate { position: absolute; left: 50%; bottom: 0; width: 80%; transform: translateX(-50%); filter: hue-rotate(var(--hue, 0deg)) saturate(var(--sat, 1.1)) brightness(var(--bri, 1)) drop-shadow(0 14px 18px rgba(0,0,0,.55)); transition: transform .35s; }
.cc-art .feat { position: absolute; left: 50%; top: 2%; width: 72%; transform: translateX(-50%) rotate(-14deg); filter: drop-shadow(0 12px 14px rgba(0,0,0,.6)) drop-shadow(0 0 16px color-mix(in srgb, var(--tag) 70%, transparent)); transition: transform .35s; animation: featBob 4s ease-in-out infinite; }
@keyframes featBob { 0%, 100% { margin-top: 0 } 50% { margin-top: -6px } }
.case-card.custom:hover .cc-art .feat { transform: translateX(-50%) rotate(-8deg) scale(1.08); }
.case-card.custom:hover .cc-art .crate { transform: translateX(-50%) scale(1.03); }
.case-card.custom:hover .cc-art::before { opacity: 1; transform: scale(1.1); }
.case-card.custom { overflow: hidden; padding-top: 18px; }
.case-card.custom h3 { margin-top: 10px; }
.bs-case .cc-mini, .bs-chip .cc-mini, .bt-rounds .cc-mini, .sc-row .cc-mini { filter: hue-rotate(var(--hue, 0deg)) saturate(1.1); }

/* ===== Hồ sơ người chơi ===== */
.profile-chip { margin-left: auto; background: var(--bg-2); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 6px 12px; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.profile-chip:hover { border-color: var(--accent); }
.profile-chip b { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet { margin-left: 8px; }
.modal-profile { z-index: 80; }
.modal-profile-box { max-width: 460px; text-align: center; }
.pf-head .brand-mark { font-size: 40px; display: block; margin-bottom: 6px; }
.pf-head h2 { margin: 0 0 6px; font-size: 26px; }
.pf-head p { margin: 0 0 18px; font-size: 14px; }
.pf-form { display: flex; gap: 8px; margin-bottom: 16px; }
.pf-form input { flex: 1; min-width: 0; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 16px; }
.pf-form input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.pf-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pf-item { display: flex; align-items: center; gap: 8px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px 8px 12px; color: var(--text); font-size: 14px; }
.pf-item:hover { border-color: var(--accent); }
.pf-item.current { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--bg-3)); }
.pf-item .pf-meta { font-size: 11px; color: var(--muted); }
.pf-item .pf-del { background: none; border: 0; color: var(--muted); font-size: 16px; padding: 0 2px; line-height: 1; }
.pf-item .pf-del:hover { color: #ff7b7b; }
@media (max-width: 760px) {
  .pf-form { flex-direction: column; }
}
@media (max-width: 760px) { .topnav a:nth-child(2) { display: none; } .topnav a:nth-child(5) { display: inline; } }

/* ===== Tài khoản ===== */
.auth-tabs { margin: 0 auto 14px; }
.auth-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.auth-form input { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 16px; }
.auth-form input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.auth-err { margin: 0; font-size: 13px; color: #ff7b7b; }
.auth-msg { margin: 0; font-size: 13px; line-height: 1.5; color: #00f5a0; background: rgba(0, 245, 160, 0.12); border: 1px solid rgba(0, 245, 160, 0.3); border-radius: 8px; padding: 10px 14px; }
.auth-hint { font-size: 12px; margin: 0 0 8px; }
.pf-avatar { font-size: 44px; display: block; }
.auth-actions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.btn.danger { color: #ff7b7b; }
.btn.danger:hover { border-color: #ff7b7b; }
.pf-item .pf-lock { font-size: 11px; color: var(--muted); }

/* ===== Đồng bộ / bảng xếp hạng ===== */
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: #7ee2a8; display: inline-block; box-shadow: 0 0 6px #7ee2a8; }
.sync-dot.saving { background: var(--accent); box-shadow: 0 0 6px var(--accent); animation: glowPulse 1s infinite; }
.sync-dot.error { background: #ff7b7b; box-shadow: 0 0 6px #ff7b7b; }
.sync-dot.offline { background: var(--muted); box-shadow: none; }
.stats-2 { grid-template-columns: 1fr 1.4fr 1fr; }
.lb-row { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 6px 8px; background: var(--bg); border-radius: 8px; }
.lb-row .rk { width: 24px; text-align: center; font-weight: 700; color: var(--muted); }

/* ===== Tài khoản ===== */
.auth-tabs { margin: 0 auto 14px; }
.auth-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.auth-form input { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 16px; }
.auth-form input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.auth-err { margin: 0; font-size: 13px; color: #ff7b7b; }
.auth-hint { font-size: 12px; margin: 0 0 8px; }
.pf-avatar { font-size: 44px; display: block; }
.auth-actions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.btn.danger { color: #ff7b7b; }
.btn.danger:hover { border-color: #ff7b7b; }
.pf-item .pf-lock { font-size: 11px; color: var(--muted); }

/* ===== Đồng bộ / bảng xếp hạng ===== */
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: #7ee2a8; display: inline-block; box-shadow: 0 0 6px #7ee2a8; }
.sync-dot.saving { background: var(--accent); box-shadow: 0 0 6px var(--accent); animation: glowPulse 1s infinite; }
.sync-dot.error { background: #ff7b7b; box-shadow: 0 0 6px #ff7b7b; }
.sync-dot.offline { background: var(--muted); box-shadow: none; }
.stats-2 { grid-template-columns: 1fr 1.4fr 1fr; }
.lb-row { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 6px 8px; background: var(--bg); border-radius: 8px; }
.lb-row .rk { width: 24px; text-align: center; font-weight: 700; color: var(--muted); }
.lb-row.top1 .rk { color: #ffd700; } .lb-row.top2 .rk { color: #c0c0c0; } .lb-row.top3 .rk { color: #cd7f32; }
.lb-row .n { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lb-row.me { outline: 1px solid var(--accent); }
.lb-row .w { color: #7ee2a8; font-weight: 700; }
.lb-row .o { color: var(--muted); font-size: 12px; }
@media (max-width: 1000px) { .stats-2 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .stats-2 { grid-template-columns: 1fr; } }

/* ===== Modal Nạp Tiền Ví Ảo (Có Giới Hạn) ===== */
.modal-topup-box { max-width: 460px; width: 92vw; padding: 24px; text-align: center; }
.topup-limit-card { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 16px 0; text-align: left; }
.topup-limit-header { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 8px; }
.topup-max-tag { font-size: 11px; font-weight: 700; color: #ffd700; background: rgba(255, 215, 0, 0.12); padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(255, 215, 0, 0.25); }
.topup-bar-track { width: 100%; height: 8px; background: rgba(255, 255, 255, 0.08); border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.topup-bar-fill { height: 100%; background: linear-gradient(90deg, #4ade80, #ffd700); border-radius: 999px; transition: width 0.3s ease; }
.topup-bar-fill.full { background: #ff5252; }
.topup-limit-sub { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.topup-full-alert { background: rgba(255, 82, 82, 0.12); border: 1px solid rgba(255, 82, 82, 0.3); color: #ff8585; border-radius: 10px; padding: 12px; font-size: 13px; line-height: 1.5; margin: 12px 0; text-align: left; }
.topup-form { text-align: left; }
.topup-input-wrap { display: flex; align-items: center; background: var(--bg); border: 2px solid var(--line); border-radius: 12px; padding: 0 16px; margin: 16px 0 12px; transition: all .2s; }
.topup-input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 16px rgba(255, 215, 0, 0.25); }
.topup-currency { font-size: 24px; font-weight: 800; color: var(--accent); margin-right: 8px; user-select: none; }
#topup-amount-input { flex: 1; background: transparent; border: none; outline: none; font-size: 24px; font-weight: 700; color: var(--text); padding: 12px 0; min-width: 0; font-variant-numeric: tabular-nums; }
.topup-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.topup-chip { background: var(--bg); border: 1px solid var(--line); color: var(--text); font-size: 13px; font-weight: 700; padding: 8px 4px; border-radius: 8px; transition: all .15s; }
.topup-chip:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.topup-chip:disabled { opacity: 0.35; cursor: not-allowed; border-color: transparent; }

/* Thẻ nạp vượt hạn mức ngày */
.topup-overlimit-card {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(0, 245, 160, 0.05));
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 14px 0;
  text-align: left;
}
.overlimit-badge {
  font-size: 11px;
  font-weight: 800;
  color: #ffd700;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.overlimit-desc {
  font-size: 13px;
  line-height: 1.5;
  color: #d1d5db;
  margin: 0;
}
.zalo-footer-link {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.zalo-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #38bdf8;
  text-decoration: none;
  font-weight: 500;
  transition: color .2s;
}
.zalo-link-chip:hover {
  color: #7dd3fc;
  text-decoration: underline;
}
.zalo-btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.3) !important;
}
.zalo-btn-link:hover {
  border-color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.1) !important;
}

/* ===== Modal Nạp Vượt Hạn Mức (VIP 10k VNĐ / $5.000) ===== */
.modal-vip-box {
  max-width: 480px;
  width: 92vw;
  padding: 24px;
  text-align: center;
}
.vip-qr-section {
  display: flex;
  gap: 16px;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin: 16px 0;
}
@media (max-width: 520px) {
  .vip-qr-section { flex-direction: column; text-align: center; }
  .vip-payment-info { width: 100%; }
}
.vip-qr-card {
  background: #ffffff;
  padding: 8px 10px 10px;
  border-radius: 10px;
  text-align: center;
  color: #000;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.zalopay-badge {
  background: #0068ff;
  color: #ffffff;
  font-weight: 800;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 6px;
}
.vip-qr-img {
  width: 140px;
  height: 140px;
  display: block;
  border-radius: 4px;
}
.vip-qr-scan-hint {
  font-size: 10px;
  color: #4b5563;
  margin-top: 6px;
}
.vip-payment-info {
  flex: 1;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}
.vip-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 6px;
}
.copy-field {
  display: flex;
  align-items: center;
  gap: 6px;
}
.copy-btn {
  padding: 2px 8px !important;
  font-size: 11px !important;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08) !important;
}
.copy-btn:hover {
  background: rgba(255, 255, 255, 0.18) !important;
}
.price-vnd-big {
  color: #ffb703;
  font-weight: 800;
  font-size: 15px;
}
.vip-status-box {
  background: rgba(0, 245, 160, 0.1);
  border: 1px solid rgba(0, 245, 160, 0.3);
  color: #00f5a0;
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
  margin: 12px 0;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
}
.vip-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00f5a0;
  box-shadow: 0 0 8px #00f5a0;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* ===== Modal Phóng To Ảnh & Soi Skin (Thuần 2D Siêu Mượt, Không Đơ Lag) ===== */
#modal-zoom {
  z-index: 99999 !important;
  background: radial-gradient(circle at center, rgba(16, 22, 34, 0.96) 0%, rgba(8, 11, 18, 0.98) 100%);
  backdrop-filter: blur(16px);
  padding: 0;
  display: flex;
  flex-direction: column;
}
#modal-zoom .zoom-close {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 30;
  font-size: 28px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}
#modal-zoom .zoom-close:hover {
  background: rgba(235, 75, 75, 0.35);
  border-color: #eb4b4b;
  transform: rotate(90deg);
}
.zoom-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
  touch-action: none;
  cursor: grab;
}
.zoom-stage:active {
  cursor: grabbing;
}
.zoom-glow {
  position: absolute;
  width: min(70vw, 550px);
  height: min(70vw, 550px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 210, 255, 0.18) 0%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
  filter: blur(40px);
  transition: background 0.3s ease;
}
.zoom-wrap {
  position: relative;
  display: inline-block;
  transform-origin: center center;
  will-change: transform;
  transition: transform 0.08s ease-out;
}
.zoom-wrap.is-animating {
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
#zoom-img {
  max-width: min(85vw, 680px);
  max-height: min(65vh, 520px);
  object-fit: contain;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.7));
}
.zoom-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.35) 50%, transparent 80%);
  opacity: 0;
  transform: translateX(-100%);
  transition: none;
}
.zoom-shine.sweep {
  animation: shineSweep 1s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes shineSweep {
  0% { opacity: 0; transform: translateX(-120%) skewX(-20deg); }
  30% { opacity: 0.8; }
  100% { opacity: 0; transform: translateX(120%) skewX(-20deg); }
}
.zoom-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 20px 18px;
  background: rgba(10, 14, 22, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  z-index: 10;
}
.zoom-info {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: center;
  flex-wrap: wrap;
  justify-content: center;
}
#zoom-name {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}
#zoom-sub {
  font-size: 13px;
  color: var(--muted);
}
.zoom-ctrl {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.zoom-ctrl .btn {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
}
#zoom-reset {
  min-width: 70px;
  font-family: monospace;
  font-size: 13px;
}
.zoom-tip {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
  text-align: center;
}
.zoom-tip b {
  color: #e2e8f0;
}
@media (max-width: 680px) {
  .zoom-bar {
    padding: 10px 12px 14px;
    gap: 8px;
  }
  .zoom-ctrl .btn {
    padding: 6px 10px;
    font-size: 12px;
  }
  #zoom-img {
    max-width: 92vw;
    max-height: 55vh;
  }
  .zoom-tip {
    font-size: 11px;
  }
}

/* Gold Knife / Special Rare Item Styling */
.tile.tile-rare-gold {
  background: radial-gradient(circle at 50% 35%, rgba(255, 215, 0, 0.28), rgba(12, 16, 24, 0.95)) !important;
  border-bottom: 4px solid #ffd700 !important;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.35) !important;
}
.tile.tile-rare-gold .name {
  color: #ffd700 !important;
  font-weight: 800 !important;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6) !important;
}
.bt-tile.bt-tile-rare-gold {
  background: radial-gradient(circle at 50% 35%, rgba(255, 215, 0, 0.28), rgba(12, 16, 24, 0.95)) !important;
  border-left: 4px solid #ffd700 !important;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.3) !important;
}
.bt-tile.bt-tile-rare-gold .n {
  color: #ffd700 !important;
  font-weight: 800 !important;
}

/* Single Special Rare Card in Case Details */
.card-rare-special {
  width: 220px !important;
  background: radial-gradient(circle at 50% 30%, rgba(255, 215, 0, 0.2), rgba(13, 17, 23, 0.95)) !important;
  border: 1.5px solid #ffd700 !important;
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.28) !important;
  padding: 12px !important;
  text-align: center;
  border-radius: 10px;
  transition: all 0.2s ease;
}
.card-rare-special:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 26px rgba(255, 215, 0, 0.5) !important;
}
.card-rare-special img {
  width: 100% !important;
  height: 90px !important;
  object-fit: contain !important;
}
.card-rare-special .n {
  color: #ffd700 !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  margin-top: 6px;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}
.card-rare-special .c {
  font-size: 11px;
  margin-top: 4px;
}
.cd-toggle-rare {
  margin-top: 10px;
  background: rgba(255, 215, 0, 0.1) !important;
  color: #ffd700 !important;
  border: 1px solid rgba(255, 215, 0, 0.35) !important;
  border-radius: 6px;
  padding: 6px 14px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}
.cd-toggle-rare:hover {
  background: rgba(255, 215, 0, 0.22) !important;
  border-color: #ffd700 !important;
  color: #fff !important;
}
.cd-rare-expanded {
  margin-top: 12px;
  border-top: 1px dashed rgba(255, 215, 0, 0.25);
  padding-top: 12px;
}

/* Nav FPS 3D Button */
.nav-fps-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: linear-gradient(135deg, #00b0ff, #0081cb) !important;
  color: #fff !important;
  font-weight: 700 !important;
  padding: 4px 12px !important;
  border-radius: 8px !important;
  box-shadow: 0 0 12px rgba(0, 176, 255, 0.4) !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
}
.nav-fps-btn:hover {
  transform: translateY(-1px) scale(1.02) !important;
  box-shadow: 0 0 18px rgba(0, 176, 255, 0.7) !important;
  color: #fff !important;
}

/* User Custom Cases Styles */
.case-card.user-custom {
  border: 1px solid rgba(255, 107, 0, 0.35);
  background: radial-gradient(circle at top right, rgba(255, 107, 0, 0.12), transparent 70%), var(--bg-2);
  position: relative;
}
.case-card.user-custom:hover {
  border-color: #ff8800;
  box-shadow: 0 8px 30px rgba(255, 107, 0, 0.25);
}
.ucc-tag {
  background: linear-gradient(135deg, #ff5e00, #ff8800) !important;
  color: #fff !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px;
}
.ucc-actions-bar {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  justify-content: center;
  border-top: 1px dashed rgba(255,255,255,0.12);
  padding-top: 8px;
}

/* Custom Case Editor Modal Components */
.ce-preset-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #eee !important;
  font-size: 11px !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  transition: all 0.15s ease !important;
}
.ce-preset-btn:hover {
  background: rgba(255, 107, 0, 0.25) !important;
  border-color: #ff8800 !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.ce-selected-chip {
  flex: 0 0 120px;
  background: rgba(25, 30, 42, 0.85);
  border: 1px solid var(--rc, #ffd700);
  border-radius: 8px;
  padding: 8px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.ce-selected-chip img {
  width: 60px;
  height: 45px;
  object-fit: contain;
  margin-bottom: 4px;
}
.ce-selected-chip .n {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}
.ce-selected-chip .p {
  font-size: 11px;
  color: #aaa;
  margin-top: 2px;
}
.ce-selected-chip .del-btn {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 50, 50, 0.85);
  color: #fff;
  border: none;
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s;
}
.ce-selected-chip .del-btn:hover {
  transform: scale(1.15);
  background: #ff2222;
}

.ce-catalog-card {
  background: rgba(22, 26, 36, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 3px solid var(--rc, #4b69ff);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.ce-catalog-card:hover {
  background: rgba(30, 36, 50, 0.95);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}
.ce-catalog-card.selected {
  background: rgba(255, 107, 0, 0.15);
  border-color: #ff8800;
}
.ce-catalog-card.selected::after {
  content: "✓";
  position: absolute;
  top: 4px;
  right: 6px;
  color: #ff8800;
  font-weight: 900;
  font-size: 14px;
}
.ce-catalog-card img {
  width: 70px;
  height: 52px;
  object-fit: contain;
  margin-bottom: 4px;
}
.ce-catalog-card .n {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}
.ce-catalog-card .p {
  font-size: 11px;
  color: #aaa;
  margin-top: 2px;
}

/* ============================================================
   ONLINE PVP CASE BATTLE STYLES
   ============================================================ */
.pvp-live-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 245, 160, 0.12);
  border: 1px solid rgba(0, 245, 160, 0.3);
  color: #00f5a0;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pvp-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00f5a0;
  box-shadow: 0 0 10px #00f5a0;
  animation: pvpPulse 1.6s infinite ease-in-out;
}
@keyframes pvpPulse {
  0% { transform: scale(0.9); opacity: 0.6; box-shadow: 0 0 4px #00f5a0; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 14px #00f5a0; }
  100% { transform: scale(0.9); opacity: 0.6; box-shadow: 0 0 4px #00f5a0; }
}

.battle-rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.battle-room-card {
  background: radial-gradient(circle at top right, rgba(245, 165, 36, 0.08), transparent 60%), var(--bg-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.battle-room-card:hover {
  border-color: rgba(245, 165, 36, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.battle-room-card.is-my-room {
  border-color: rgba(245, 165, 36, 0.5);
  background: radial-gradient(circle at top right, rgba(245, 165, 36, 0.15), transparent 60%), var(--bg-2);
}
.battle-room-card.status-running {
  border-color: rgba(0, 229, 255, 0.4);
}

.br-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.br-creator {
  display: flex;
  align-items: center;
  gap: 8px;
}
.br-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-3);
  display: grid;
  place-items: center;
  font-size: 16px;
  border: 1px solid var(--line);
}
.br-name {
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}
.br-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.br-badge.waiting {
  background: rgba(0, 245, 160, 0.15);
  color: #00f5a0;
  border: 1px solid rgba(0, 245, 160, 0.3);
}
.br-badge.running {
  background: rgba(0, 229, 255, 0.15);
  color: #00e5ff;
  border: 1px solid rgba(0, 229, 255, 0.3);
}
.br-badge.finished {
  background: rgba(255, 255, 255, 0.1);
  color: #888;
}

.br-cases-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.br-cases-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  flex: 1;
  padding-bottom: 2px;
}
.br-case-thumb {
  width: 36px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  padding: 2px;
  flex-shrink: 0;
}
.br-rounds-tag {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.br-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.br-cost {
  display: flex;
  flex-direction: column;
}
.br-cost .label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
}
.br-cost .val {
  font-size: 18px;
  font-weight: 800;
  color: #ffd700;
}
.br-mode-tag {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-3);
  color: var(--muted);
}
.br-mode-tag.crazy {
  color: #ff5555;
  background: rgba(255, 85, 85, 0.12);
  border: 1px solid rgba(255, 85, 85, 0.25);
}

.br-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.br-actions button {
  flex: 1;
}



