:root {
  --bg: #121418;
  --panel: rgba(30, 33, 40, .94);
  --panel-2: #262a32;
  --panel-3: #30353f;
  --line: #343a45;
  --text: #f2f4f7;
  --muted: #9aa4b1;
  --accent: #c6ff3d;
  --green: #c6ff3d;
  --green-hi: #d8ff74;
  --orange: #c6ff3d;
  --red: #e5534b;
  --font: Manrope, system-ui, sans-serif;
  --radius: 10px;
  --cond: 'Exo 2', Manrope, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font); font-size: 14px; color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(900px 520px at 85% -10%, #1f2a14 0%, rgba(18,20,24,0) 60%), radial-gradient(1200px 700px at 10% 110%, #1a1f2b 0%, #121418 60%);
  background-attachment: fixed;
  min-height: 100vh;
}
a { color: var(--accent); }
button { font-family: inherit; cursor: pointer; color: inherit; }
button:disabled { cursor: not-allowed; opacity: .45; }
input, textarea, select { font-family: inherit; font-size: 14px; }
img { display: block; }
.mono { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* header */
.top { position: sticky; top: 0; z-index: 30; background: rgba(34, 38, 44, .97); border-bottom: 1px solid var(--line); }
.top-in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding: 6px 16px; }
.logo { display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; min-height: 44px; }
.logo span { font-family: var(--cond); font-weight: 800; font-size: 24px; letter-spacing: 2px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 6px; flex: 1 1 auto; justify-content: center; }
.nav button { background: none; border: 0; font-family: var(--cond); font-weight: 700; font-size: 16px; letter-spacing: .5px; text-transform: uppercase; padding: 8px 16px; min-height: 40px; border-radius: 999px; position: relative; }
.nav button:hover { background: #232832; }
.nav button.on { background: var(--accent); color: #11140a; }
.user-box { display: flex; align-items: center; gap: 8px; }
.bal { border-radius: var(--radius); display: flex; align-items: center; gap: 6px; background: #1d2126; border: 1px solid var(--line); padding: 0 12px; height: 40px; font-weight: 700; }
.coin { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); display: inline-block; box-shadow: inset 0 0 0 3px #7a9a1f; }
.avatar { border-radius: 50%; width: 40px; height: 40px; background: #1d2126; border: 1px solid var(--line); object-fit: cover; }
.btn { border-radius: var(--radius); text-decoration: none; border: 0; padding: 0 18px; min-height: 40px; font-weight: 700; font-family: var(--cond); text-transform: uppercase; font-size: 14px; letter-spacing: .6px; transition: filter .15s, transform .15s; }
.btn:hover:not(:disabled) { filter: brightness(1.12); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn-green { background: var(--green); color: #11140a; }
.btn-grey { background: #4a515b; color: #fff; }
.btn-dark { background: #23272d; color: #fff; border: 1px solid var(--line); }
.btn-orange { background: var(--orange); color: #11140a; }
.btn-red { background: #7d2a26; color: #fff; }
.btn-steam { background: #1b2838; color: #fff; display: inline-flex; align-items: center; gap: 8px; box-shadow: inset 0 0 0 1px #66c0f4; }
.icon-btn { border-radius: var(--radius); width: 40px; height: 40px; display: grid; place-items: center; background: #1d2126; border: 1px solid var(--line); }

/* layout */
.layout { display: flex; flex-wrap: wrap; align-items: flex-start; }
.side { flex: 0 0 216px; background: rgba(28, 31, 36, .96); border-right: 1px solid var(--line); min-height: calc(100vh - 57px); position: sticky; top: 57px; max-height: calc(100vh - 57px); display: flex; flex-direction: column; }
.side-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; font-weight: 700; }
.side-head small { color: var(--muted); font-weight: 500; text-transform: uppercase; }
.side-tabs { display: grid; grid-template-columns: 1fr 1fr; }
.side-tabs button { background: #2a2f36; border: 0; min-height: 40px; display: grid; place-items: center; }
.side-tabs button.on { background: #2b331c; color: var(--accent); }
.feed { overflow-y: auto; flex: 1; padding: 6px 0; }
.feed-item { display: flex; gap: 10px; padding: 6px 10px; align-items: center; }
.feed-item:first-child { animation: vcIn .45s ease both; }
.feed-img { width: 74px; flex: none; }
.feed-img .pic { border-radius: 8px 8px 0 0; height: 50px; background: linear-gradient(180deg, #4a515b, #2c3138); display: grid; place-items: center; }
.feed-img .pic img { max-width: 70px; max-height: 46px; }
.feed-img .bar { height: 3px; }
.feed-txt { min-width: 0; }
.feed-txt b { display: block; font-family: var(--cond); font-size: 13px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-txt span { display: block; color: #c9d0d8; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-empty { padding: 14px; color: var(--muted); font-size: 13px; }
.main { flex: 999 1 560px; min-width: 0; padding: 28px 24px 60px; }
.wrap { max-width: 1200px; margin: 0 auto; }
@media (max-width: 760px) {
  .side { position: static; flex-basis: 100%; min-height: 0; max-height: 220px; border-right: 0; border-bottom: 1px solid var(--line); }
  .main { padding: 20px 14px 60px; }
  .nav { gap: 4px 16px; }
  .nav button { font-size: 17px; }
}

/* common */
.h1 { font-family: var(--cond); font-weight: 800; font-size: 26px; letter-spacing: .5px; text-transform: uppercase; margin: 0 0 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: #1a1d24; min-height: 52px; }
.panel-head h2, .panel-head h3 { margin: 0; font-family: var(--cond); font-size: 18px; text-transform: uppercase; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border-radius: 999px; background: #232832; border: 0; min-height: 34px; padding: 0 12px; font-family: var(--cond); font-weight: 700; text-transform: uppercase; font-size: 14px; }
.chip.on { background: var(--accent); color: #11140a; }
.input { border-radius: var(--radius); background: #171a20; border: 1px solid var(--line); color: var(--text); padding: 9px 10px; min-height: 40px; }
.input:focus, .btn:focus-visible, .chip:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin-bottom: 26px; }
.empty { text-align: center; padding: 60px 16px; }
.empty h3 { font-family: var(--cond); font-size: 24px; text-transform: uppercase; margin: 0 0 6px; }

/* cases */
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 36px; }
.case-card { position: relative; overflow: hidden; border-radius: 16px; background: #1c2027; border: 1px solid var(--line); padding: 0; text-align: left; transition: transform .2s, box-shadow .2s; }
.case-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0, 0, 0, .5); }
.case-card:hover .crate { transform: scale(1.06); }
.case-art { height: 150px; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #2c323c, #1c2027 70%); position: relative; overflow: hidden; }
.crate { position: relative; width: 170px; height: 110px; transition: transform .3s; }
.crate svg { position: absolute; inset: 0; }
.crate img { position: absolute; left: 50%; top: 46%; width: 110px; transform: translate(-50%, -50%) rotate(-12deg); filter: drop-shadow(0 6px 10px rgba(0,0,0,.6)); }
.case-info { padding: 10px 14px 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.case-info b { display: block; font-size: 14px; }
.case-info span { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; background: #262b33; padding: 5px 9px; border-radius: 999px; }
.tag { position: absolute; left: 10px; top: 10px; z-index: 2; border-radius: 6px; background: var(--accent); color: #11140a; font-family: var(--cond); font-weight: 700; font-size: 13px; padding: 3px 7px; }

/* case page */
.case-hero { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: center; text-align: center; margin-bottom: 22px; }
.case-hero .crate { width: 260px; height: 170px; }
.case-hero .crate img { width: 170px; }
.roulette { border-radius: 16px; position: relative; height: 196px; overflow: hidden; background: rgba(20, 23, 27, .9); border: 1px solid var(--line); margin: 14px 0 26px; }
.roulette-strip { position: absolute; left: 50%; top: 14px; display: flex; gap: 6px; will-change: transform; }
.r-card { border-radius: 10px; overflow: hidden; flex: none; width: 150px; height: 166px; background: linear-gradient(180deg, #4a515b, #2c3138); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px; position: relative; }
.r-card img { width: 124px; height: 84px; object-fit: contain; }
.r-card .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; }
.r-card b { font-size: 11px; color: #c9d0d8; text-align: center; max-width: 136px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-card span { font-size: 12px; font-weight: 700; text-align: center; max-width: 136px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marker { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--accent); z-index: 3; }
.fade-l, .fade-r { position: absolute; top: 0; bottom: 0; width: 16%; z-index: 2; pointer-events: none; }
.fade-l { left: 0; background: linear-gradient(90deg, #14171b, rgba(20, 23, 27, 0)); }
.fade-r { right: 0; background: linear-gradient(270deg, #14171b, rgba(20, 23, 27, 0)); }

/* item tiles */
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.item { position: relative; overflow: hidden; border-radius: 12px; background: linear-gradient(180deg, #2a2f38, #1d2128); border: 0; padding: 0; text-align: left; display: flex; flex-direction: column; transition: transform .15s, filter .15s; }
button.item:hover { transform: translateY(-3px); filter: brightness(1.12); }
.item.sel { outline: 2px solid var(--accent); outline-offset: -2px; }
.item .pic { height: 96px; display: grid; place-items: center; }
.item .pic img { max-width: 88%; max-height: 84px; }
.item .bar { height: 3px; }
.item .txt { background: #1a1d23; padding: 7px 9px 9px; }
.item .txt b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .txt span { display: block; font-size: 12px; color: #c9d0d8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .price { position: absolute; right: 6px; top: 5px; font-weight: 700; font-size: 12px; display: flex; gap: 4px; align-items: center; }
.item .wear { position: absolute; right: 6px; top: 22px; font-size: 11px; color: #c9d0d8; }
.item .chance { position: absolute; left: 6px; top: 5px; font-size: 11px; color: #c9d0d8; }
.item-actions { display: grid; grid-template-columns: 1fr 1fr; }
.item-actions button { border: 0; min-height: 34px; font-family: var(--cond); font-weight: 700; text-transform: uppercase; font-size: 13px; }

/* upgrade */
.up-top { display: grid; grid-template-columns: minmax(0, 1fr) 320px minmax(0, 1fr); gap: 14px; }
.up-slot { min-height: 330px; display: flex; flex-direction: column; }
.up-slot .body { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; padding: 14px; }
.up-slot .big img { width: 260px; max-width: 100%; height: 180px; object-fit: contain; }
.mini { width: 92px; text-align: center; }
.mini .pic { border-radius: 8px 8px 0 0; height: 62px; background: linear-gradient(180deg, #4a515b, #2c3138); display: grid; place-items: center; }
.mini .pic img { max-width: 84px; max-height: 56px; }
.mini .bar { height: 3px; }
.mini small { font-size: 11px; }
.dial-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 14px 0; }
.dial { position: relative; width: 290px; height: 290px; border-radius: 50%; }
.dial .ticks { position: absolute; inset: -14px; border-radius: 50%; background: repeating-conic-gradient(rgba(255,255,255,.22) 0 .8deg, transparent .8deg 6deg); -webkit-mask: radial-gradient(circle, transparent 66%, #000 67%); mask: radial-gradient(circle, transparent 66%, #000 67%); }
.dial .ring { position: absolute; inset: 0; border-radius: 50%; transition: background .25s; }
.dial .face { position: absolute; inset: 30px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #3a3f47, #202429); display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: inset 0 0 30px rgba(0,0,0,.7); }
.dial .face b { font-family: var(--cond); font-size: 40px; font-weight: 800; }
.dial .face small { font-family: var(--cond); text-transform: uppercase; font-size: 12px; color: #c9d0d8; }
.dial .needle { position: absolute; inset: 0; }
.dial .needle::before { content: ""; position: absolute; left: 50%; top: -10px; margin-left: -12px; border-left: 12px solid transparent; border-right: 12px solid transparent; border-top: 26px solid #fff; }
.dial.win { animation: vcWin 1s ease-out 2; }
.dial.lose { animation: vcShake .6s ease; }
.up-controls { display: grid; grid-template-columns: minmax(0, 1fr) 320px minmax(0, 1fr); gap: 14px; margin: 14px 0; }
.coins-box { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.coins-box label { font-family: var(--cond); text-transform: uppercase; font-size: 13px; line-height: 1.1; }
.coins-box input[type=range] { flex: 1; accent-color: #fff; }
.up-btn { width: 100%; min-height: 54px; font-size: 24px; }
.mults { border-radius: 14px; overflow: hidden; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.mults button { background: #1c2027; border: 0; border-right: 1px solid #1f2328; min-height: 54px; font-family: var(--cond); font-weight: 700; }
.mults button:hover:not(:disabled) { background: #343a42; }
.up-bottom { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.up-bottom .scroll { max-height: 470px; overflow-y: auto; padding: 12px; }
@media (max-width: 980px) { .up-top, .up-controls { grid-template-columns: 1fr; } .mults { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* rewards */
.rw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-bottom: 18px; }
.rw-card { border-radius: 16px; padding: 20px 22px; min-height: 230px; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; }
.rw-card h3 { margin: 0; font-family: var(--cond); font-size: 22px; text-transform: uppercase; }
.rw-card > * { position: relative; z-index: 1; max-width: 62%; }
.rw-card > .timer, .rw-card > .btn { max-width: none; }
.rw-card img.art { z-index: 0; max-width: none; opacity: .9; position: absolute; right: -10px; bottom: 14px; top: auto; width: 170px; transform: rotate(-12deg); filter: drop-shadow(0 10px 18px rgba(0,0,0,.5)); }
.timer { display: flex; gap: 6px; margin-top: auto; }
.timer div { background: rgba(20, 23, 27, .85); min-width: 46px; padding: 6px 4px; text-align: center; }
.timer b { display: block; font-size: 20px; }
.timer small { font-size: 10px; text-transform: uppercase; color: #c9d0d8; }
.top-drops { display: flex; align-items: stretch; background: #1c2027; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.top-drops > h3 { flex: none; display: grid; place-items: center; padding: 0 22px; margin: 0; font-family: var(--cond); font-size: 22px; text-transform: uppercase; color: #11140a; background: var(--accent); }
.top-drops .row { overflow: hidden; padding: 8px 0; flex: 1; min-width: 0; }
.top-drops .track { display: flex; gap: 8px; width: max-content; padding-right: 8px; animation: vcMarquee 40s linear infinite; }
.top-drops .track:hover { animation-play-state: paused; }
.top-drops .track-copy { display: contents; }
@keyframes vcMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .top-drops .row { overflow-x: auto; } .top-drops .track { animation: none; } .top-drops .track-copy { display: none; } }
.top-drops .item { width: 140px; flex: none; }

/* modal & toast */
.overlay { position: fixed; inset: 0; background: rgba(8, 9, 11, .82); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 60; }
.modal { border-radius: 18px; position: relative; width: 100%; max-width: 460px; background: #2a2e35; border: 1px solid var(--line); padding: 24px; text-align: center; overflow: hidden; animation: vcPop .55s cubic-bezier(.2, 1.4, .4, 1) both; }
.modal .rays { position: absolute; left: 50%; top: 150px; width: 720px; height: 720px; margin: -360px 0 0 -360px; border-radius: 50%; animation: vcSpin 16s linear infinite; pointer-events: none; }
.modal > * { position: relative; }
.modal .drop-img { width: 300px; max-width: 90%; height: 200px; object-fit: contain; margin: 4px auto; filter: drop-shadow(0 16px 30px rgba(0,0,0,.6)); }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.toast { border-radius: var(--radius); position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #2a2e35; border: 1px solid var(--accent); padding: 12px 18px; z-index: 80; max-width: calc(100% - 32px); animation: vcUp .3s ease both; }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 70; }
.confetti i { position: absolute; top: 0; width: 10px; height: 16px; border-radius: 2px; animation: vcConfetti 2.6s ease-in forwards; }

/* support */
.support-fab { position: fixed; right: 20px; bottom: 20px; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); border: 0; display: grid; place-items: center; z-index: 40; box-shadow: 0 8px 20px rgba(0,0,0,.4); }
.support { border-radius: 16px; overflow: hidden; position: fixed; right: 20px; bottom: 88px; width: 340px; max-width: calc(100% - 40px); height: 440px; background: #2a2e35; border: 1px solid var(--line); z-index: 40; display: flex; flex-direction: column; animation: vcUp .25s ease both; }
.support .msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.msg { border-radius: 12px; max-width: 82%; padding: 8px 10px; font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.msg.me { align-self: flex-end; background: #3b4a17; }
.msg.them { align-self: flex-start; background: #3a4049; }
.support form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }
.support form input { flex: 1; }

/* footer */
.foot { border-top: 1px solid var(--line); margin-top: 40px; padding: 26px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; color: var(--muted); font-size: 13px; }
.foot h4 { margin: 0 0 8px; color: var(--text); font-family: var(--cond); text-transform: uppercase; }
.foot button { background: none; border: 0; padding: 0; display: block; color: var(--muted); min-height: 28px; text-align: left; }
.foot button:hover { color: var(--text); }
.legal { max-width: 860px; line-height: 1.6; }
.legal section { border-radius: 14px; background: var(--panel); border: 1px solid var(--line); padding: 18px 20px; margin-bottom: 12px; }
.legal h2 { margin: 0 0 6px; font-family: var(--cond); text-transform: uppercase; font-size: 18px; }
.legal p { margin: 0 0 6px; color: #c9d0d8; }

@keyframes vcSpin { to { transform: rotate(360deg); } }
@keyframes vcPop { 0% { transform: scale(.2); opacity: 0; } 60% { transform: scale(1.06); opacity: 1; } 100% { transform: none; } }
@keyframes vcUp { from { transform: translate(-50%, 14px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.support { animation-name: vcUpPlain; }
@keyframes vcUpPlain { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes vcIn { from { transform: translateY(-20px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes vcShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-10px); } 40% { transform: translateX(9px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }
@keyframes vcWin { 0% { box-shadow: 0 0 0 0 rgba(38, 184, 90, .8); } 100% { box-shadow: 0 0 0 44px rgba(38, 184, 90, 0); } }
@keyframes vcConfetti { 0% { transform: translateY(-40px) rotate(0); opacity: 1; } 100% { transform: translateY(105vh) rotate(720deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
