:root {
  --bg: #0b1020;
  --bg2: #101735;
  --card: #161f3d;
  --card2: #1c2747;
  --line: #26325a;
  --txt: #e8ecf8;
  --muted: #93a0c4;
  --accent: #4dd8ff;
  --accent2: #ffd166;
  --purple: #a45dff;
  --radius: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(164, 93, 255, .18), transparent 60%),
    radial-gradient(900px 400px at 10% 0%, rgba(77, 216, 255, .12), transparent 60%),
    var(--bg);
  color: var(--txt);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.wrap { width: min(1180px, 100% - 2rem); margin: 0 auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Top bar */
.topbar { border-bottom: 1px solid var(--line); background: rgba(11, 16, 32, .85); position: sticky; top: 0; z-index: 50; backdrop-filter: blur(8px); }
.bar-inner { display: flex; align-items: center; gap: 1.5rem; padding: .8rem 0; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--txt); font-weight: 700; font-size: 1.15rem; }
.brand:hover { text-decoration: none; }
.logo {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: #081; font-weight: 800; font-size: .8rem; box-shadow: 0 0 18px rgba(77,216,255,.4);
}
.nav { display: flex; gap: 1.1rem; flex: 1; }
.nav a { color: var(--muted); font-size: .95rem; }
.nav a:hover { color: var(--txt); }
.nav-toggle { display: none; background: none; border: 0; color: var(--txt); font-size: 1.3rem; cursor: pointer; }

/* Hero */
.hero { padding: 3.5rem 0 2rem; text-align: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 0 0 .5rem; letter-spacing: -1px; }
.hero-sub { color: var(--muted); max-width: 620px; margin: 0 auto 1.4rem; font-size: 1.05rem; }
.hero-actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.cc { margin-top: 1.2rem; color: var(--accent2); font-size: .9rem; }

/* Sections */
main { flex: 1; }
.section { padding: 1.2rem 0 2rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .9rem; }
.section-head h1, .section-head h2 { margin: 0; }
.more { font-size: .9rem; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card-body { padding: .7rem .8rem .8rem; }
.thumb { background: #0e1430; }
.thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }

/* Shop grid */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .9rem; }
.item-card { transition: transform .12s ease, border-color .12s ease; border: 1px solid var(--line); }
.item-card:hover { transform: translateY(-3px); border-color: var(--accent); text-decoration: none; }
.item-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-meta { display: flex; justify-content: space-between; gap: .4rem; font-size: .78rem; color: var(--muted); margin-top: .3rem; }
.price { white-space: nowrap; }

/* Rarity accents */
.rarity-common { --rar: #aeb6c8; }
.rarity-uncommon { --rar: #4ac94a; }
.rarity-rare { --rar: #4a9bfc; }
.rarity-epic { --rar: #b45bff; }
.rarity-legendary { --rar: #fcaa3c; }
.rarity-mythic { --rar: #ff4a9b; }
.rarity-icon { --rar: #2dd4bf; }
.rarity-marvel { --rar: #e23636; }
.rarity-dc { --rar: #9fb8d8; }
.rarity-starwars { --rar: #a5a5a5; }
.rarity-gaminglegends { --rar: #2f9d63; }
.rarity-dark { --rar: #7f8bab; }
.item-card { border-top: 3px solid var(--rar, var(--line)); }
.rarity-text { color: var(--rar, var(--txt)); font-weight: 600; }
.detail-art { border-radius: var(--radius); border: 3px solid var(--rar, var(--line)); padding: .5rem; background: #0e1430; }
.detail-art img { width: 100%; border-radius: 8px; }

/* Toolbars */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar-right { display: flex; align-items: center; gap: 1rem; }
.filter-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  background: var(--card); color: var(--muted); border: 1px solid var(--line);
  padding: .35rem .8rem; border-radius: 999px; cursor: pointer; font-size: .82rem;
}
.chip:hover { color: var(--txt); border-color: var(--muted); }
.chip.active { background: var(--accent); color: #08242f; border-color: var(--accent); font-weight: 600; }
.select, .input, .search {
  background: var(--card2); color: var(--txt); border: 1px solid var(--line);
  border-radius: 8px; padding: .45rem .7rem; font-size: .9rem;
}
.search { min-width: 240px; }
.hidden { display: none !important; }

/* Buttons */
.btn { display: inline-block; padding: .6rem 1.2rem; border-radius: 10px; font-weight: 600; font-size: .95rem; border: 1px solid var(--line); cursor: pointer; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--purple)); color: #081; border: 0; }
.btn-ghost { background: transparent; color: var(--txt); }
.btn-ghost:hover { border-color: var(--accent); text-decoration: none; }

/* Countdowns */
.countdown-banner { color: var(--accent2); font-size: .95rem; font-weight: 600; }
.countdown-big { font-size: clamp(1.6rem, 4vw, 3rem); font-weight: 800; color: var(--accent); letter-spacing: 1px; margin: .4rem 0; }

/* News */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.news-card .thumb img { aspect-ratio: 16/9; object-fit: cover; }
.news-title { font-weight: 700; margin-bottom: .3rem; }
.news-body { color: var(--muted); font-size: .88rem; }
.news-date { margin-top: .5rem; }

/* Weapons */
.weapon-table { display: flex; flex-direction: column; gap: .35rem; }
.weapon-row {
  display: grid; grid-template-columns: 1.6fr 1fr .9fr .7fr .7fr .9fr .7fr 2.2fr;
  gap: .7rem; padding: .55rem .8rem; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; align-items: center; font-size: .88rem;
}
.weapon-row.head { background: var(--card2); font-weight: 700; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .4px; }
.w-name { font-weight: 600; }

/* XP calc */
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.form-row { margin: .7rem 0; }
.form-row label { display: block; color: var(--muted); font-size: .85rem; margin-bottom: .25rem; }
.form-row .input { width: 100%; }
.xp-out { font-size: 1.05rem; min-height: 3.4rem; color: var(--accent2); }
.stack-list { margin: .5rem 0 0; padding-left: 1.1rem; color: var(--muted); }
.stack-list li { margin: .35rem 0; }

/* Detail */
.detail-grid { display: grid; grid-template-columns: minmax(240px, 420px) 1fr; gap: 1.6rem; align-items: start; }
.crumbs { margin-bottom: .8rem; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: .4rem 1rem; margin: 1rem 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.art-thumbs { display: flex; gap: 1rem; margin-top: 1rem; }
.art-thumbs img { width: 48%; border-radius: 8px; border: 1px solid var(--line); }

/* Misc */
.center { text-align: center; padding: 2rem; }
.prose { padding: 1.4rem 1.6rem; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }

/* Custom-skin showcase player — our UI, zero YouTube branding */
.detail-col { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.video-panel { width: 100%; }
.video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; }
.v-native { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; background: transparent; pointer-events: none; }
.video-poster { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.v-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 7; display: flex; align-items: center; gap: 10px;
  padding: 12px 22px 12px 18px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px; cursor: pointer;
  background: rgba(10, 12, 22, .74); color: #fff; font-size: .92rem; font-weight: 600; letter-spacing: .03em;
  box-shadow: 0 6px 28px rgba(0, 0, 0, .55); transition: background .12s ease, transform .12s ease, border-color .12s ease; }
.v-play:hover { background: var(--accent); color: #0b0d16; border-color: var(--accent); transform: translate(-50%, -50%) scale(1.05); }
.v-tri { border-left: 13px solid currentColor; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.v-chrome { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.v-hit { position: absolute; inset: 0; pointer-events: none; }
.v-hit.on { pointer-events: auto; }
.v-top { position: absolute; top: 0; left: 0; right: 0; height: 46px; z-index: 6; display: flex; align-items: center; padding: 0 14px; pointer-events: auto; cursor: default;
  background: linear-gradient(180deg, rgba(0, 0, 0, .8), rgba(0, 0, 0, 0)); color: #fff; font-size: .88rem; }
.v-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 85%; }
.v-bar { position: absolute; bottom: 0; left: 0; right: 0; height: 48px; z-index: 6; display: flex; align-items: center; gap: 10px; padding: 0 10px; pointer-events: auto;
  background: linear-gradient(0deg, rgba(0, 0, 0, .85), rgba(0, 0, 0, 0)); }
.v-b-play { background: transparent; border: 0; color: #fff; font-size: 14px; cursor: pointer; width: 24px; padding: 0; }
.v-time { color: rgba(255, 255, 255, .85); font-size: .72rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.v-seek { flex: 1; height: 20px; position: relative; cursor: pointer; }
.v-seek-track { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .3); }
.v-seek-fill { position: absolute; left: 0; top: 50%; transform: translateY(-50%); height: 4px; border-radius: 99px; background: var(--accent); width: 0%; }
.v-vol { width: 64px; accent-color: var(--accent); cursor: pointer; background: transparent; }
.v-mute { background: transparent; border: 0; color: #fff; cursor: pointer; font-size: 14px; padding: 0; }
.v-msg { position: absolute; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; text-align: center; padding: 1rem;
  background: rgba(0, 0, 0, .86); color: #fff; font-size: .88rem; }
.v-msg[hidden] { display: none; }
.video-empty { display: flex; align-items: center; justify-content: center; border-style: dashed; }
.video-empty p { text-align: center; padding: 1rem; }

/* Creative directory */
.creative-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .9rem; }
.creative-card { transition: transform .12s ease, border-color .12s ease; }
.creative-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.creative-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .45rem; }
.creative-title { font-weight: 700; font-size: 1.02rem; margin-bottom: .3rem; }
.code-block { display: flex; align-items: center; gap: .6rem; margin-top: .7rem; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: .4rem .6rem; }
.cr-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .5px; font-size: .95rem; flex: 1; color: var(--accent); }
.copy-btn { padding: .25rem .6rem; font-size: .8rem; }

/* Tracker */
.notice { padding: 1.2rem 1.4rem; margin-bottom: 1rem; border-left: 4px solid var(--accent2); }
.stat-card { padding: 1.2rem 1.4rem; margin-bottom: 1rem; }
.stat-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.stat-head h2 { margin: 0; }
.progress { height: 12px; background: var(--bg2); border-radius: 999px; overflow: hidden; margin: .8rem 0 .4rem; border: 1px solid var(--line); }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--purple)); border-radius: 999px; transition: width .3s ease; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
.stat-mini { background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; }
.stat-mini span { display: block; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .4px; margin-bottom: .2rem; }
.stat-mini strong { font-size: 1.15rem; }

/* Footer */
.footer { border-top: 1px solid var(--line); margin-top: 2rem; padding: 1.4rem 0 2rem; color: var(--muted); font-size: .85rem; }

/* Responsive */
@media (max-width: 760px) {
  .nav { display: none; flex-direction: column; position: absolute; top: 56px; left: 0; right: 0; background: var(--bg2); padding: 1rem; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav-toggle { display: block; margin-left: auto; }
  .search { width: 100%; }
  .calc-grid, .detail-grid { grid-template-columns: 1fr; }
  .weapon-row { grid-template-columns: 1fr 1fr; }
  .weapon-row.head { display: none; }
}