:root {
  --bg: #070b12;
  --card: #101826;
  --line: #24344d;
  --blue: #2f7bff;
  --blue-2: #8eb6ff;
  --text: #f4f7fb;
  --muted: #9aabc4;
  --danger: #ff5d6c;
  --ok: #3ddc97;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(47, 123, 255, 0.22), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 7vw;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 28px; font-weight: 800; letter-spacing: 0.4px; }
.logo-ring {
  position: relative; width: 64px; height: 64px; flex: none;
  display: grid; place-items: center;
}
.logo-ring img {
  width: 48px; height: 48px; object-fit: cover; border-radius: 12px;
  position: relative; z-index: 1;
}
.logo-ring::before {
  content: "";
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 74%, rgba(47, 123, 255, 0.15) 82%, #4d94ff 91%, #fff 96%, transparent 100%);
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 66%);
  mask: radial-gradient(circle, transparent 60%, #000 66%);
  filter: drop-shadow(0 0 5px #2f7bff) drop-shadow(0 0 10px #2f7bff);
  animation: logo-sweep 3.2s ease-in-out infinite;
}
@keyframes logo-sweep {
  0% { transform: rotate(0deg); opacity: 0; }
  12% { opacity: 1; }
  70% { transform: rotate(360deg); opacity: 1; }
  84% { transform: rotate(390deg); opacity: 0; }
  100% { transform: rotate(390deg); opacity: 0; }
}
.brand .word { white-space: nowrap; }
.brand .zone { color: var(--blue); }
nav { display: flex; gap: 18px; align-items: center; color: var(--muted); flex-wrap: wrap; }
nav a:hover { color: var(--text); }
.menu { position: relative; }
.menu > button {
  background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 8px 0;
}
.menu:hover > button, .menu:focus-within > button { color: var(--text); }
.menu-panel {
  display: none; position: absolute; top: 100%; left: 0; min-width: 190px; z-index: 8;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px;
}
.menu:hover .menu-panel, .menu:focus-within .menu-panel { display: grid; }
.menu-panel a { padding: 8px 10px; border-radius: 8px; color: var(--text); }
.menu-panel a:hover { background: #18263c; }
main:has(.home-board) { width: min(1680px, calc(100vw - 14vw)); }
.home-board { display: grid; gap: 22px; }
.home-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: stretch;
}
.home-intro .eyebrow {
  margin: 0 0 6px; color: #fff; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; font-size: 11px;
}
.home-intro h1 {
  font-size: clamp(28px, 4vw, 40px); line-height: 1.05; letter-spacing: -0.02em;
  margin: 0 0 8px; color: #fff;
}
.home-intro h1 .zone { color: var(--blue); }
.home-intro .lead {
  color: #fff; max-width: 640px; font-size: 16px; line-height: 1.45; margin: 0;
}
.home-intro .lead b { color: var(--blue); }
.home-pair .feed,
.home-pair .board {
  width: auto; max-width: none; margin: 0; height: 100%;
  position: static;
}
.home-pair .feed h2,
.home-pair .board h2 { font-size: 18px; margin: 0 0 8px; }
.home-pair .feed h2 { color: #fff; }
.home-pair .drop { grid-template-columns: 54px 1fr; gap: 10px; padding: 10px 0; }
.home-pair .drop img, .home-pair .drop-empty { width: 54px; height: 40px; }
.home-pair .drop small { color: #fff; font-size: 14px; line-height: 1.4; }
.home-pair .k { color: var(--blue); font-weight: 800; }
.home-pair .ago { font-size: 13px; margin-top: 4px; color: var(--blue-2); }
.skill-rank { font-weight: 800; }
.board {
  border-radius: 16px;
  padding: 14px 14px 6px;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(47, 123, 255, 0.28), transparent 58%),
    #101826;
  border: 1px solid rgba(142, 182, 255, 0.4);
  box-shadow: 0 0 32px rgba(47, 123, 255, 0.22);
}
.board h2 { margin: 0 0 8px; font-size: 18px; color: #fff; }
.board-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
@property --spin {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@keyframes medal-spin { to { --spin: 360deg; } }
.board-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  grid-template-areas: "pos who pts" "pos lines pts";
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(8, 14, 24, 0.72);
}
.board-row .pos { grid-area: pos; font-size: 26px; font-weight: 800; }
.board-row .who { grid-area: who; font-weight: 800; font-size: 16px; }
.board-row .lines { grid-area: lines; display: grid; gap: 1px; font-size: 14px; color: #d5deea; line-height: 1.25; }
.board-row .lines b { font-weight: 800; }
.board-row .pts {
  grid-area: pts; font-weight: 800; font-size: 22px; color: var(--blue-2);
  display: grid; justify-items: end; line-height: 1;
}
.board-row .pts small { font-size: 12px; font-weight: 700; color: #9aabc4; }
.board-row.place-1,
.board-row.place-2,
.board-row.place-3 {
  border: 2px solid transparent;
  background:
    linear-gradient(rgba(8, 14, 24, 0.94), rgba(8, 14, 24, 0.94)) padding-box,
    conic-gradient(from var(--spin), var(--metal-dim) 0 55%, var(--metal) 78%, #fff 88%, var(--metal) 100%) border-box;
  animation: medal-spin 2.8s linear infinite;
}
.board-row.place-1 { --metal: #ffd56a; --metal-dim: #6e5014; box-shadow: 0 0 18px rgba(228, 174, 57, 0.35); }
.board-row.place-2 { --metal: #f4f7fb; --metal-dim: #667588; box-shadow: 0 0 16px rgba(213, 222, 232, 0.28); animation-duration: 3.6s; }
.board-row.place-3 { --metal: #e8a15a; --metal-dim: #6d3d16; box-shadow: 0 0 16px rgba(205, 127, 50, 0.32); animation-duration: 4.4s; }
.board-row.place-1 .pos { color: #ffd56a; text-shadow: 0 0 12px #e4ae39; }
.board-row.place-2 .pos { color: #f4f7fb; text-shadow: 0 0 10px #d5dee8; }
.board-row.place-3 .pos { color: #e8a15a; text-shadow: 0 0 10px #cd7f32; }
.server-ip { margin: 2px 0 6px; color: #fff; font-weight: 800; letter-spacing: 0.02em; }
.server-card { position: relative; }
.server-head { display: flex; gap: 12px; align-items: center; padding-right: 108px; }
.server-head .logo-ring { width: 76px; height: 76px; }
.server-head .logo-ring img { width: 56px; height: 56px; border-radius: 14px; }
.server-state {
  position: absolute; top: 16px; right: 16px;
  display: flex; align-items: center; gap: 8px; margin: 0;
  font-weight: 800; font-size: 14px;
}
.server-state i {
  width: 10px; height: 10px; border-radius: 50%; flex: none;
  background: currentColor; box-shadow: 0 0 8px currentColor;
  animation: status-pulse 1.4s ease-in-out infinite;
}
.server-state.online { color: #3ddc97; }
.server-state.offline { color: #ff5d6c; }
.server-state.restart { color: #ff9a1f; }
.server-clock { display: grid; gap: 4px; margin: 10px 0 4px; }
.server-clock .restart-line { color: #ffb020; font-weight: 800; font-size: 14px; }
.server-clock .uptime-line { color: #9aabc4; font-weight: 700; font-size: 13px; }
@keyframes status-pulse {
  0%, 100% { opacity: 0.5; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}
.server-head h2, .server-head .meta { margin: 0; }
.server-head h2 { margin-bottom: 4px; }
.user-menu > button { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; text-align: left; }
.who small { display: block; color: var(--blue-2); font-size: 11px; font-weight: 700; }
.avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.avatar.ph { display: inline-block; background: #1a2740; flex: 0 0 auto; }
.person { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; }
.person .avatar { width: 26px; height: 26px; flex: 0 0 auto; }
.rank-bit { color: var(--blue-2); font-weight: 700; margin-right: 4px; }
.rank-picks, .check { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 8px 0; }
.rank-picks label, .check { color: var(--text); }
.credit-tile { --rarity: #2f7bff; }
.credit-tile img { width: 70%; height: 58%; object-fit: contain; }
.coin-pick { max-width: 220px; margin-top: 10px; }
.coins-field { max-width: 220px; }
.ago { display: block; color: var(--blue-2); font-style: normal; font-size: 12px; margin-top: 4px; }
label { display: block; margin: 12px 0; color: var(--muted); }
input, textarea {
  display: block; width: 100%; margin-top: 6px; background: #0c1422; color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: inherit;
}
.stack { display: grid; gap: 10px; margin-top: 16px; }
.trade-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.hits { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.hits button {
  background: #18263c; color: white; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer;
}
form.tile-hit { margin: 0; }
form.tile-hit > button.tile {
  width: 100%; margin: 0; padding: 0; font: inherit; color: inherit; cursor: pointer;
}
.tile-act {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  font-style: normal; font-size: 10px; font-weight: 800;
  color: #ffb4bc; background: #3a1218; border-radius: 6px; padding: 2px 5px;
}
.tile.pick { cursor: pointer; }
.tile.pick input { position: absolute; top: 6px; left: 6px; width: auto; margin: 0; }
.tile.busy { opacity: 0.45; }
.trade-room { display: grid; gap: 16px; }
.trade-layout.with-chat { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 18px; align-items: start; }
.trade-layout .chat {
  position: sticky; top: 16px; margin: 0; min-width: 0; max-width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 14px 12px;
}
.trade-layout .chat h2 { margin: 0 0 10px; font-size: 18px; }
.trade-layout .chat-log { height: min(640px, calc(100vh - 230px)); }
.offer-board { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
button.tile.credit-tile {
  width: 100%; margin: 0; padding: 0; font: inherit; color: inherit; cursor: pointer;
}
.coin-ask {
  width: min(380px, 92vw); text-align: left;
  background: #121a2b; border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 8px;
}
.coin-ask p { margin: 0 0 8px; color: #fff; font-size: 20px; font-weight: 800; }
.coin-ask .warn { color: #ff8d98; font-size: 14px; font-weight: 700; }
.coin-ask .btn { margin-top: 0; }
.offer-side { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.offer-side .side-head { position: relative; padding: 14px 16px 12px; border-bottom: 1px solid var(--line); }
.side-head.has-marks { padding-right: 118px; }
.ready-marks { position: absolute; top: 50%; right: 14px; transform: translateY(-50%); display: flex; gap: 8px; }
.mark-btn {
  width: 42px; height: 42px; border-radius: 12px; border: 2px solid transparent;
  background: #0c1422; font-size: 22px; font-weight: 800; line-height: 1; cursor: pointer;
  display: grid; place-items: center; padding: 0;
}
.mark-btn.ready-on { color: #3ddc84; border-color: #3ddc84; background: rgba(61, 220, 132, 0.16); }
.mark-btn.ready-off { color: #245c38; border-color: #1c3d2a; }
.mark-btn.unready-on { color: #ff5c6a; border-color: #ff5c6a; background: rgba(255, 92, 106, 0.16); }
.mark-btn.unready-off { color: #6e3038; border-color: #3a1e24; }
.mark-btn.look { cursor: default; pointer-events: none; }
.offer-side.mine .side-head { box-shadow: inset 0 3px 0 var(--blue); }
.offer-side.theirs .side-head { box-shadow: inset 0 3px 0 #5c6b84; }
.offer-side h2 { margin: 2px 0 0; font-size: 22px; }
.side-kicker { margin: 0; color: var(--blue-2); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.offer-box { margin: 14px; padding: 12px; min-height: 150px; border-radius: 12px; background: #0c1422; }
.offer-side .picker { padding: 0 14px 14px; }
.ready { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.ready.yes { color: var(--ok); font-weight: 800; }
.deal-note { font-size: 20px; line-height: 1.4; }
.toasts {
  position: fixed; top: 78px; right: 16px; z-index: 40;
  display: grid; gap: 8px; width: min(240px, calc(100vw - 24px));
}
.toast {
  display: grid; gap: 8px; padding: 10px 12px; border-radius: 14px;
  background: #121a2b; border: 1px solid rgba(79, 140, 255, 0.5);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}
.toast { width: auto; }
.toasts { width: min(280px, calc(100vw - 24px)); }
.toast-line { margin: 0; font-size: 13px; line-height: 1.35; font-weight: 700; }
.count-pick { display: flex; gap: 8px; align-items: center; margin: 12px 0; }
.count-pick span { color: var(--muted); font-weight: 700; }
.count-pick button {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line);
  background: #121a2b; color: #fff; font-weight: 800; cursor: pointer;
}
.count-pick button.on { background: var(--blue); border-color: var(--blue); }
.win-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 12px 0; }
.win-grid .tile { width: 150px; }
.equip-note {
  padding: 12px 14px; border-radius: 14px;
  background: #10243f; border: 1px solid #4f8cff;
  box-shadow: 0 0 18px rgba(47, 123, 255, 0.7), 0 12px 28px rgba(0, 0, 0, 0.35);
  animation: note-in 0.35s ease;
}
.equip-note p { margin: 0; color: #d7e6ff; font-size: 13px; font-weight: 700; }
.equip-note strong { display: block; margin-top: 5px; font-size: 14px; line-height: 1.3; }
.equip-note span {
  display: inline-block; margin-top: 8px; padding: 3px 8px; border-radius: 999px;
  background: #1a3f78; color: #d7e6ff; font-size: 11px; font-weight: 800; letter-spacing: 0.04em;
}
.equip-note.out { animation: note-out 0.5s ease forwards; }
@keyframes note-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}
@keyframes note-out {
  to { opacity: 0; transform: translateY(-8px); }
}
.toast .btn { margin: 0; padding: 7px 10px; font-size: 13px; border-radius: 9px; }
.toast div { display: flex; gap: 6px; }
.btn.danger { background: #d23b4e; color: #fff; }
.btn.danger:hover { background: #b42e3f; }
.unban-inbox {
  display: grid; gap: 10px; margin-bottom: 22px;
}
.unban-inbox h2 { margin: 0; font-size: 18px; }
.unban-inbox article {
  padding: 14px 16px; border-radius: 14px;
  background: #142033; border: 1px solid var(--blue);
}
.unban-inbox p { margin: 0 0 8px; }
.unban-inbox .btn { margin-top: 4px; }
.count-overlay {
  position: fixed; inset: 0; z-index: 30; display: grid; place-items: center;
  background: rgba(4, 8, 16, 0.86); text-align: center;
}
.count-overlay[hidden] { display: none !important; }
.reward-box { width: min(720px, 92vw); }
.reward-box h2 { margin: 0 0 16px; font-size: 32px; }
.reward-grid { justify-content: center; }
.count-overlay p { margin: 0 0 8px; color: var(--blue-2); font-size: 18px; font-weight: 700; }
.count-overlay strong { font-size: 120px; line-height: 1; color: #fff; }
#count-stop { margin-top: 8px; background: #18263c; color: #fff; }
.wait-note { color: var(--blue-2); font-weight: 700; }
.invite h2 { margin-top: 0; }
.chat-log {
  height: 320px; overflow-x: hidden; overflow-y: auto; background: #0c1422; border: 1px solid var(--line);
  border-radius: 12px; padding: 10px;
}
.chat-log p { margin: 0 0 8px; overflow-wrap: anywhere; word-break: break-word; }
.chat-log .mine b { color: var(--blue-2); }
.emoji-row { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 8px; }
.emoji-row button {
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px;
  background: #0c1422; cursor: pointer; font-size: 18px; line-height: 1;
}
.emoji-row button:hover { background: #1a2c48; }
#chat-form { display: flex; gap: 8px; align-items: flex-end; min-width: 0; }
#chat-form textarea {
  flex: 1 1 auto; min-width: 0; width: 100%; margin: 0; resize: none;
  min-height: 42px; max-height: 140px; overflow-x: hidden; overflow-y: auto;
  line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
}
#chat-form .btn { margin-top: 0; flex: 0 0 auto; }
.post p { white-space: pre-wrap; }
main { width: min(1200px, 92vw); margin: 32px auto 64px; }
main:has(.trade-layout) { width: min(1580px, calc(100vw - 6vw)); }
h1 { font-size: 42px; margin: 0 0 8px; }
.lead { color: var(--muted); max-width: 640px; line-height: 1.5; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 28px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}
.card h2 { margin: 0 0 8px; font-size: 20px; }
.meta { color: var(--muted); font-size: 14px; line-height: 1.5; }
.btn, button.btn {
  display: inline-block;
  margin-top: 14px;
  background: var(--blue);
  color: white;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--blue-2); border: 1px solid var(--line); }
a.coins { color: var(--blue-2); font-weight: 800; text-decoration: none; }
a.coins:hover { text-decoration: underline; }
.case { position: relative; overflow: hidden; }
.case i {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background: var(--accent, var(--blue));
}
.price { font-size: 22px; margin: 10px 0 0; }
.result {
  margin-top: 24px;
  padding: 28px;
  text-align: center;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #142033, #101826);
  border-radius: 18px;
}
.result strong { display: block; font-size: 34px; margin: 8px 0; }
.row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.warn { color: var(--danger); }
.spin-root { margin-top: 22px; display: grid; gap: 12px; }
.spin-root.multi .skin-card { width: 132px; height: 148px; flex-basis: 132px; }
.spin-root.multi .skin-card img { width: 112px; height: 84px; }
.spinner {
  position: relative;
  background: linear-gradient(180deg, #0c1422, #101826);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.spinner .window { overflow: hidden; height: 208px; }
.spin-root.multi .spinner .window { height: 188px; }
.spinner .strip {
  display: flex;
  gap: 10px;
  width: max-content;
  padding: 22px 0 18px;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}
.spin-root.is-spin .strip { will-change: transform; }
.spin-root.is-spin .skin-card img { filter: none; }
.skin-card {
  position: relative;
  width: 148px;
  height: 168px;
  flex: 0 0 148px;
  border-radius: 12px;
  background:
    radial-gradient(80px 50px at 50% 42%, color-mix(in srgb, var(--rarity) 35%, transparent), transparent 70%),
    #121c2e;
  border: 1px solid #2a3d5c;
  border-bottom: 4px solid var(--rarity, var(--blue));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
}
.skin-card img {
  width: 128px;
  height: 96px;
  object-fit: contain;
  margin-top: 8px;
  filter: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.45));
}
.skin-card span {
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 6px 8px 8px;
  text-align: center;
  font-size: 11px;
  line-height: 1.25;
  color: var(--text);
}
.skin-card.winner {
  z-index: 1;
  animation: drop-pop 0.75s ease-out;
  box-shadow:
    0 0 0 2px var(--rarity),
    0 0 26px color-mix(in srgb, var(--rarity) 80%, transparent),
    0 0 54px color-mix(in srgb, var(--rarity) 40%, transparent);
}
.skin-card.winner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 28%, rgba(255, 255, 255, 0.55) 48%, transparent 64%);
  transform: translateX(-130%);
  animation: shine 0.7s ease-out 0.05s forwards;
  pointer-events: none;
}
.spinner.landed::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--hit, #8eb6ff) 62%, transparent), transparent 68%);
  animation: hit-bloom 0.85s ease-out forwards;
}
.win-grid .tile.reveal {
  overflow: visible;
  animation: tile-pop 0.8s ease-out;
  box-shadow:
    0 0 0 1px var(--rarity),
    0 0 22px color-mix(in srgb, var(--rarity) 70%, transparent);
}
@keyframes drop-pop {
  0% { transform: scale(0.94); filter: brightness(2.1); }
  42% { transform: scale(1.05); filter: brightness(1.35); }
  100% { transform: scale(1); filter: brightness(1.12); }
}
@keyframes shine {
  to { transform: translateX(130%); }
}
@keyframes hit-bloom {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.35); }
  28% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.4); }
}
@keyframes tile-pop {
  0% { transform: scale(0.82) translateY(8px); filter: brightness(2); }
  55% { transform: scale(1.05) translateY(0); }
  100% { transform: scale(1); }
}
.marker {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #f4f7fb;
  transform: translateX(-50%);
  pointer-events: none;
}
.marker::before, .marker::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
}
.marker::before { top: 0; border-top: 10px solid #f4f7fb; }
.marker::after { bottom: 0; border-bottom: 10px solid #f4f7fb; }
.case-card { display: block; color: inherit; }
.case-card:hover { border-color: var(--blue); transform: translateY(-3px); }
.hellcase { position: relative; height: 210px; margin: 4px 0 8px; }
.hellcase::after {
  content: "";
  position: absolute; inset: 4px 2px -2px; z-index: 0; pointer-events: none; border-radius: 16px;
  box-shadow:
    0 0 16px color-mix(in srgb, var(--accent) 75%, transparent),
    0 0 36px color-mix(in srgb, var(--accent) 40%, transparent);
  animation: case-glow 1.8s ease-in-out infinite;
}
.hell-flames { position: absolute; inset: -10px -8px -16px; z-index: 3; pointer-events: none; }
.hell-flames span {
  position: absolute; width: 22px; height: 36px; transform-origin: 50% 100%;
  background: radial-gradient(ellipse at 50% 78%, #fff 0 7%, var(--accent) 26%, transparent 70%);
  filter: blur(1.4px); mix-blend-mode: screen; opacity: 0.85;
  animation: flame 0.95s ease-in-out infinite;
}
.hell-flames span:nth-child(1) { left: 8%; bottom: 0; }
.hell-flames span:nth-child(2) { left: 26%; bottom: -4px; height: 46px; animation-delay: 0.15s; }
.hell-flames span:nth-child(3) { left: 46%; bottom: -2px; animation-delay: 0.32s; }
.hell-flames span:nth-child(4) { right: 16%; bottom: -4px; height: 44px; animation-delay: 0.08s; }
.hell-flames span:nth-child(5) { right: -2px; bottom: 28%; height: 30px; animation-delay: 0.22s; }
.hell-flames span:nth-child(6) { left: -2px; bottom: 30%; height: 28px; animation-delay: 0.4s; }
.hell-flames span:nth-child(7) { left: 42%; top: -4px; width: 16px; height: 22px; animation-delay: 0.18s; }
.hell-glow {
  position: absolute; left: 8%; right: 8%; bottom: 0; height: 36px; z-index: 2;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 80%, transparent), transparent 75%);
  filter: blur(3px);
  animation: case-glow 1.4s ease-in-out infinite;
}
@keyframes flame {
  0%, 100% { transform: scaleY(0.75) scaleX(1); opacity: 0.45; }
  50% { transform: scaleY(1.2) scaleX(0.8) translateY(-7px); opacity: 1; }
}
@keyframes case-glow {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}
.hell-lid, .hell-shell {
  position: absolute; left: 10px; right: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 65%, #fff);
}
.hell-lid {
  top: 8px; height: 34px; z-index: 2;
  border-radius: 10px 10px 3px 3px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 80%, #fff), var(--accent) 42%, #1a2436);
  transform: perspective(180px) rotateX(16deg);
  transform-origin: center bottom;
}
.hell-lid i {
  position: absolute; left: 50%; top: 16px; width: 28px; height: 8px; margin-left: -14px;
  border-radius: 3px; background: #f4f7fb;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 40%, #000);
}
.hell-shell {
  top: 36px; bottom: 10px; z-index: 1;
  border-radius: 6px 6px 14px 14px;
  background:
    linear-gradient(180deg, transparent 0 58%, color-mix(in srgb, var(--accent) 85%, #000) 58% 70%, #121a28 70%),
    radial-gradient(120px 70px at 50% 38%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 70%),
    linear-gradient(160deg, #24344d, #101826 55%);
  box-shadow: inset 0 0 0 4px rgba(0,0,0,.25), 0 12px 20px rgba(0,0,0,.35);
  overflow: hidden;
}
.hell-guns { position: absolute; left: 6px; right: 6px; top: 6px; bottom: 34px; }
.hell-guns img {
  position: absolute; width: 46%; height: 78%; object-fit: contain;
  left: 27%; bottom: 0;
  filter: drop-shadow(0 10px 6px rgba(0,0,0,.55));
}
.hell-guns img:nth-child(1) { width: 40%; left: 0; bottom: 4px; transform: rotate(-12deg); }
.hell-guns img:nth-child(2) { width: 68%; height: 86%; left: 16%; z-index: 2; }
.hell-guns img:nth-child(3) { width: 40%; left: auto; right: 0; bottom: 4px; transform: rotate(12deg); }
.hell-plate {
  position: absolute; left: 0; right: 0; bottom: 10px;
  text-align: center; font-weight: 800; letter-spacing: 0.6px;
  text-shadow: 0 2px 8px #000;
}
.hellcase.big { height: 280px; }
.hellcase.big .hell-lid { height: 48px; }
.hellcase.big .hell-shell { top: 48px; }
.hellcase.big .hell-guns { top: 10px; bottom: 48px; }
.hellcase.big .hell-plate { font-size: 22px; bottom: 16px; }
.case-detail { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 28px; align-items: center; }
.server-more { margin-top: 12px; }
.names { margin: 8px 0 14px; padding-left: 18px; }
.names li { margin: 4px 0; }
.meter { height: 8px; border-radius: 99px; background: #1c2940; overflow: hidden; margin: 8px 0 12px; }
.meter span { display: block; height: 100%; background: var(--blue); }
.spark { width: 100%; height: 72px; display: block; }
.spark polyline { fill: none; stroke: #8eb6ff; stroke-width: 2; }
.table-wrap { overflow-x: auto; margin-top: 18px; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 13px; }
.plus { color: var(--ok); font-weight: 700; }
.minus { color: var(--danger); font-weight: 700; }
.home-layout { display: grid; grid-template-columns: 280px 1fr; gap: 22px; align-items: start; }
.feed {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 14px 6px; position: sticky; top: 12px;
}
.feed h2 { margin: 0 0 8px; font-size: 16px; }
.drop { display: grid; grid-template-columns: 54px 1fr; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.drop img, .drop-empty { width: 54px; height: 40px; object-fit: contain; background: #121c2e; border-radius: 6px; border-bottom: 2px solid var(--rarity, var(--blue)); }
.drop p { margin: 0; }
.drop b { display: block; font-size: 13px; }
.drop small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-top: 18px; }
.tile {
  position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden;
  background: radial-gradient(50px 36px at 50% 40%, color-mix(in srgb, var(--rarity) 40%, transparent), transparent 70%), #121c2e;
  border: 1px solid #2a3d5c; border-bottom: 3px solid var(--rarity, var(--blue));
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
}
.tile img { width: 92%; height: 62%; object-fit: contain; margin-top: 6px; }
.tile span { display: block; width: 100%; min-height: 28px; padding: 2px 4px 6px; text-align: center; font-size: 10px; line-height: 1.2; }
.tile form.sell { position: absolute; left: 4px; right: 4px; bottom: 28px; opacity: 0; }
.tile:hover form.sell, .tile:focus-within form.sell { opacity: 1; }
.tile .sides { position: absolute; top: 6px; left: 6px; display: flex; gap: 4px; z-index: 2; }
.tile .side-form { margin: 0; }
.side {
  border: 0; border-radius: 6px; min-width: 28px; padding: 3px 6px;
  font-size: 11px; font-weight: 800; cursor: pointer;
  background: #121c2e; color: #9aabc4;
}
.side.on.side-t { color: #ffd56a; background: #3a2508; box-shadow: 0 0 12px #ff9a1f; }
.side.on.side-ct { color: #d7e6ff; background: #10284a; box-shadow: 0 0 12px #2f7bff; }
.tile button {
  width: 100%; border: 0; border-radius: 6px; background: var(--blue); color: white;
  font-size: 11px; font-weight: 700; padding: 4px 0; cursor: pointer;
}
.tile .side {
  width: auto; min-width: 28px; padding: 3px 6px; font-weight: 800;
  background: #121c2e; color: #9aabc4;
}
.tile .side.on.side-t { color: #ffd56a; background: #3a2508; box-shadow: 0 0 12px #ff9a1f; }
.tile .side.on.side-ct { color: #d7e6ff; background: #10284a; box-shadow: 0 0 12px #2f7bff; }
.upgrade-board {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(260px, 1fr);
  gap: 28px;
  align-items: center;
  margin: 18px 0 28px;
  padding: 22px;
  border-radius: 22px;
  background:
    radial-gradient(420px 240px at 20% 20%, rgba(61, 255, 154, 0.16), transparent 60%),
    radial-gradient(380px 220px at 80% 80%, rgba(255, 77, 106, 0.12), transparent 62%),
    #101826;
  border: 1px solid rgba(142, 182, 255, 0.35);
  box-shadow: 0 0 36px rgba(47, 123, 255, 0.16);
}
.wheel-wrap { display: grid; justify-items: center; gap: 12px; }
.wheel {
  width: min(360px, 86vw);
  aspect-ratio: 1;
  position: relative;
  filter: drop-shadow(0 0 22px rgba(61, 255, 154, 0.35));
}
.wheel-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #3dff9a 0 var(--win), #ff4d6a var(--win) 100%);
  box-shadow:
    0 0 28px rgba(61, 255, 154, 0.55),
    0 0 48px rgba(255, 77, 106, 0.28),
    inset 0 0 18px rgba(0, 0, 0, 0.35);
}
.wheel.is-spin .wheel-face { animation: wheel-pulse 0.8s ease-in-out infinite; }
@keyframes wheel-pulse {
  50% { filter: brightness(1.25); }
}
.wheel-needle {
  position: absolute;
  inset: 0;
  z-index: 2;
  transform-origin: 50% 50%;
  will-change: transform;
}
.wheel-needle span {
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: 7px;
  height: 36%;
  transform: translateX(-50%);
  border-radius: 4px;
  background: linear-gradient(#fff, #2f7bff);
  box-shadow: 0 0 10px #fff, 0 0 16px #2f7bff;
}
.wheel-needle span::after {
  content: "";
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-bottom: 26px solid #4d94ff;
  filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 10px #2f7bff);
}
.wheel-hole {
  position: absolute;
  inset: 18%;
  z-index: 3;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, rgba(61, 255, 154, 0.16), transparent 46%),
    radial-gradient(circle at 50% 40%, #1a2740, #070b12 72%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 30px rgba(61, 255, 154, 0.12);
}
.wheel-read {
  position: absolute;
  inset: 18%;
  z-index: 4;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}
.wheel-read strong {
  font-size: 54px;
  line-height: 0.95;
  color: #e9fff5;
  text-shadow: 0 0 18px #3dff9a;
}
.wheel-read em {
  font-style: normal;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9aabc4;
  font-size: 13px;
}
.wheel-key { margin: 0; color: #d5deea; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.wheel-key i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.key-win { background: #3dff9a; box-shadow: 0 0 10px #3dff9a; }
.key-lose { background: #ff4d6a; box-shadow: 0 0 10px #ff4d6a; margin-left: 8px; }
.upgrade-outcome { margin: 0; min-height: 24px; font-weight: 700; text-align: center; }
.upgrade-outcome.win { color: #3dff9a; text-shadow: 0 0 12px rgba(61, 255, 154, 0.65); }
.upgrade-outcome.lose { color: #ff8b98; text-shadow: 0 0 12px rgba(255, 77, 106, 0.45); }
.upgrade-side h2 { margin: 0 0 10px; }
.upgrade-preview { min-height: 92px; margin-bottom: 14px; }
.upgrade-preview .tile { width: 168px; }
.upgrade-preview .meta { margin: 0; }
.mults { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mult {
  border: 1px solid #2a3d5c;
  background: #121c2e;
  color: #fff;
  border-radius: 12px;
  padding: 10px 4px;
  cursor: pointer;
  font: inherit;
}
.mult b { display: block; font-size: 18px; }
.mult small { color: #9aabc4; }
.mult.on {
  border-color: #3dff9a;
  background: #10281c;
  box-shadow: 0 0 18px rgba(61, 255, 154, 0.45);
}
.mult.on small { color: #3dff9a; }
.upgrade-pay { margin: 12px 0; color: #e9fff5; }
.upgrade-side .btn { width: 100%; }
.upgrade-side .btn:disabled { opacity: 0.45; cursor: default; }
button.upgrade-pick {
  width: 100%;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.upgrade-pick img { height: 50%; }
.upgrade-pick span { min-height: 0; }
.upgrade-preview .tile small,
.upgrade-pick small {
  display: block;
  padding: 0 4px 6px;
  color: #9aabc4;
  font-size: 11px;
}
.upgrade-pick.on {
  box-shadow: 0 0 0 2px #3dff9a, 0 0 18px rgba(61, 255, 154, 0.55);
}
.upgrade-pick.busy { cursor: default; }
@media (max-width: 720px) {
  main:has(.home-board) { width: min(1200px, 92vw); }
  .case-detail, .home-layout, .trade-room, .trade-layout.with-chat, .offer-board, .upgrade-board { grid-template-columns: 1fr; }
  .trade-layout .chat { position: static; }
  .home-pair { grid-template-columns: 1fr; }
  .feed { position: static; }
  .wheel-read strong { font-size: 42px; }
}
.ok { color: var(--ok); }
footer { color: var(--muted); padding: 0 7vw 32px; }
