/* Крутилка — entertainment shell (fake balance, case open, upgrade) */

:root {
  --play-bg: #0d1118;
  --play-panel: #151b26;
  --play-panel-2: #1b2330;
  --play-line: rgba(255,255,255,.08);
  --play-text: #eef2f7;
  --play-muted: #93a0b4;
  --play-accent: #ff7a18;
  --play-accent-2: #36d6ff;
  --play-blue: #4b69ff;
  --play-purple: #8847ff;
  --play-pink: #d32ce6;
  --play-red: #eb4b4b;
  --play-gold: #e4ae39;
  --play-font: "IBM Plex Sans", system-ui, sans-serif;
  --play-display: "Barlow Condensed", "IBM Plex Sans", sans-serif;
}

* { box-sizing: border-box; }
[x-cloak] { display: none !important; }

.play-body {
  margin: 0;
  min-height: 100vh;
  color: var(--play-text);
  font-family: var(--play-font);
  background: var(--play-bg);
  position: relative;
}

.play-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(255,122,24,.12), transparent 60%),
    radial-gradient(700px 400px at 90% 0%, rgba(54,214,255,.10), transparent 55%),
    repeating-linear-gradient(0deg, transparent, transparent 22px, rgba(255,255,255,.015) 23px),
    repeating-linear-gradient(90deg, transparent, transparent 22px, rgba(255,255,255,.015) 23px);
  z-index: 0;
}

.play-top, .play-main, .play-toast { position: relative; z-index: 1; }

.play-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 22px;
  border-bottom: 1px solid var(--play-line);
  background: rgba(10,14,20,.72);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.play-top__left, .play-top__right, .play-user {
  display: flex;
  align-items: center;
  gap: 14px;
}

.play-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--play-text);
  font-family: var(--play-display);
  letter-spacing: .04em;
  font-weight: 700;
  font-size: 22px;
}
.play-brand__mark {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--play-accent), #ffb347);
  color: #1a1008; font-size: 16px;
}

.play-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.play-nav__link {
  color: var(--play-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 8px 12px;
  border-radius: 8px;
}
.play-nav__link.is-active,
.play-nav__link:hover { color: var(--play-text); background: rgba(255,255,255,.05); }
.play-nav__link.is-disabled { opacity: .35; pointer-events: none; }

.play-back {
  color: var(--play-muted);
  text-decoration: none;
  font-size: 13px;
}
.play-back:hover { color: var(--play-text); }

.play-user__avatar {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--play-line);
}
.play-user__avatar--fallback {
  display: grid; place-items: center; background: #243041; font-size: 12px; font-weight: 700;
}
.play-user__hello { font-size: 13px; color: var(--play-muted); }
.play-user__bal strong { color: var(--play-accent); font-weight: 700; }

.play-btn {
  appearance: none; border: 1px solid var(--play-accent); background: var(--play-accent);
  color: #1a1008; font-weight: 800; letter-spacing: .04em; border-radius: 10px;
  padding: 10px 16px; cursor: pointer; font-family: inherit;
}
.play-btn:disabled { opacity: .5; cursor: not-allowed; }
.play-btn--ghost { background: transparent; color: var(--play-accent); }
.play-btn--lg { padding: 14px 28px; font-size: 15px; min-width: 220px; }
.play-chip {
  appearance: none; border: 1px solid var(--play-line); background: var(--play-panel-2);
  color: var(--play-text); border-radius: 8px; padding: 6px 10px; cursor: pointer;
}
.play-chip:hover { border-color: var(--play-accent); color: var(--play-accent); }

.play-shell-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 22px 40px;
  align-items: start;
}
.play-main { padding: 18px 0 0; max-width: none; margin: 0; }

.play-promo {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px;
}
.play-promo__card {
  background: linear-gradient(180deg, #1c2433, #141a24);
  border: 1px solid var(--play-line);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: center;
  font-weight: 700;
  letter-spacing: .04em;
}
.play-promo__card span { display: block; color: var(--play-muted); font-weight: 500; font-size: 12px; margin-top: 4px; }
.play-promo__card--timer { color: var(--play-accent-2); }

.play-live {
  background: rgba(0,0,0,.35);
  border: 1px solid var(--play-line);
  border-radius: 14px;
  padding: 10px;
  position: sticky;
  top: 78px;
  max-height: calc(100vh - 110px);
  overflow-x: hidden;
  overflow-y: auto;
  /* Keep scroll, hide the scrollbar chrome. */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.play-live::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.play-live__title {
  font-family: var(--play-display);
  letter-spacing: .14em;
  font-size: 14px;
  color: var(--play-text);
  padding: 6px 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10,14,20,.98), rgba(10,14,20,.92) 70%, transparent);
}
.play-live__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ff3b3b;
  box-shadow: 0 0 10px #ff3b3b;
  animation: play-live-pulse 1.2s ease-in-out infinite;
}
@keyframes play-live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(.85); }
}
.play-live__item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
  margin-bottom: 6px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.04);
  border-left: 3px solid var(--play-blue);
  border-bottom: 2px solid transparent;
}
.play-live__item.rarity-blue { border-bottom-color: var(--play-blue); }
.play-live__item.rarity-purple { border-left-color: var(--play-purple); border-bottom-color: var(--play-purple); }
.play-live__item.rarity-pink { border-left-color: var(--play-pink); border-bottom-color: var(--play-pink); }
.play-live__item.rarity-red { border-left-color: var(--play-red); border-bottom-color: var(--play-red); }
.play-live__item.rarity-gold { border-left-color: var(--play-gold); border-bottom-color: var(--play-gold); }
.play-live__item img { width: 42px; height: 32px; object-fit: contain; }
.play-live__name { font-size: 12px; font-weight: 600; }
.play-live__finish { font-size: 11px; color: var(--play-muted); }
.play-live__empty { color: var(--play-muted); font-size: 12px; padding: 12px; }

.play-cases__head h1 {
  margin: 0;
  font-family: var(--play-display);
  font-size: 34px;
  letter-spacing: .04em;
}
.play-cases__head p { margin: 6px 0 18px; color: var(--play-muted); }

.play-case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.play-case-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, #1a2230, #10151d);
  border: 1px solid var(--play-line);
  border-radius: 16px;
  overflow: hidden;
  min-height: 280px;
  transition: transform .18s ease, border-color .18s ease;
}
.play-case-card:hover { transform: translateY(-3px); border-color: rgba(255,122,24,.45); }
.play-case-card__meta { text-align: center; padding: 16px 12px 0; }
.play-case-card__title {
  font-family: var(--play-display);
  font-size: 28px;
  letter-spacing: .06em;
}
.play-case-card__count { color: var(--play-muted); font-size: 13px; }
.play-case-card__art {
  position: relative;
  height: 180px;
  display: grid;
  place-items: center;
}
.play-case-card__box {
  position: absolute;
  width: 150px; height: 110px;
  border-radius: 14px;
  background: linear-gradient(145deg, #2a3548, #121820);
  box-shadow: 0 0 40px rgba(54,214,255,.2);
}
.theme-summer .play-case-card__box,
.theme-summer.play-case-visual__box,
.theme-summer .play-case-visual__box { background: linear-gradient(145deg, #1f6f57, #123528); box-shadow: 0 0 40px rgba(46,204,113,.25); }
.theme-gold .play-case-card__box,
.theme-gold .play-case-visual__box { background: linear-gradient(145deg, #8a6a1d, #3a2b0c); box-shadow: 0 0 40px rgba(228,174,57,.28); }
.theme-crimson .play-case-card__box,
.theme-crimson .play-case-visual__box { background: linear-gradient(145deg, #7a2030, #2b0d14); box-shadow: 0 0 40px rgba(235,75,75,.28); }
.play-case-card__art img {
  position: relative;
  width: 160px;
  height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.45));
}
.play-case-card__price {
  position: absolute;
  right: 12px; bottom: 12px;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,122,24,.4);
  color: var(--play-accent);
  font-weight: 800;
  border-radius: 10px;
  padding: 6px 10px;
}

/* Case page */
.play-case-hero { text-align: center; margin-bottom: 28px; }
.play-case-hero__eyebrow { color: var(--play-muted); letter-spacing: .14em; font-size: 12px; font-weight: 700; }
.play-case-hero h1 {
  margin: 8px 0 18px;
  font-family: var(--play-display);
  font-size: 42px;
  letter-spacing: .04em;
}
.play-case-stage {
  position: relative;
  min-height: 220px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  max-width: 980px;
}
.play-case-glow {
  position: absolute;
  width: 260px; height: 260px; border-radius: 50%;
  border: 2px dashed rgba(54,214,255,.35);
  box-shadow: 0 0 60px rgba(54,214,255,.15);
}
.play-case-visual { position: relative; width: 220px; height: 180px; display: grid; place-items: center; }
.play-case-visual__box {
  position: absolute; inset: 28px 20px; border-radius: 16px;
  background: linear-gradient(145deg, #2a3548, #121820);
}
.play-case-visual img { position: relative; width: 180px; height: 120px; object-fit: contain; }

.play-reel {
  position: relative;
  width: min(920px, 100%);
  height: 156px;
  overflow: hidden;
  border: 1px solid rgba(255,122,24,.28);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,122,24,.08), transparent 40%),
    #0a0e14;
  box-shadow: inset 0 0 40px rgba(0,0,0,.45);
}
.play-reel::before,
.play-reel::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 72px;
  z-index: 3;
  pointer-events: none;
}
.play-reel::before {
  left: 0;
  background: linear-gradient(90deg, #0a0e14, transparent);
}
.play-reel::after {
  right: 0;
  background: linear-gradient(270deg, #0a0e14, transparent);
}
.play-reel__pointer {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(180deg, #ffd24a, var(--play-accent));
  z-index: 4; transform: translateX(-1px);
  box-shadow: 0 0 16px rgba(255,122,24,.85);
}
.play-reel__pointer::before,
.play-reel__pointer::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
}
.play-reel__pointer::before {
  top: 0;
  border-top: 10px solid #ffd24a;
}
.play-reel__pointer::after {
  bottom: 0;
  border-bottom: 10px solid #ffd24a;
}
.play-reel__track {
  display: flex; gap: 10px; padding: 12px; will-change: transform;
}
.play-reel__item {
  flex: 0 0 130px;
  height: 132px;
  border-radius: 12px;
  background: linear-gradient(180deg, #1a2230, #10151d);
  border: 1px solid var(--play-line);
  border-bottom: 3px solid var(--play-blue);
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 6px;
}
.play-reel__item img { width: 100px; height: 70px; object-fit: contain; }
.play-reel__weapon { font-size: 11px; font-weight: 700; }
.play-reel__finish { font-size: 10px; color: var(--play-muted); }

.play-case-actions { display: grid; gap: 12px; justify-items: center; }
.play-need-funds {
  display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap;
  background: rgba(0,0,0,.35); border: 1px solid var(--play-line); border-radius: 12px;
  padding: 14px 16px; max-width: 640px;
}
.play-win {
  display: flex; gap: 12px; align-items: center; background: rgba(255,122,24,.08);
  border: 1px solid rgba(255,122,24,.35); border-radius: 14px; padding: 12px 14px;
}
.play-win img { width: 90px; height: 60px; object-fit: contain; }
.play-win__label { color: var(--play-muted); font-size: 12px; }
.play-win__name { font-weight: 700; }
.play-win__price { color: var(--play-accent); font-weight: 800; }

.play-contents__head {
  display: flex; justify-content: space-between; align-items: end; gap: 12px; margin: 10px 0 14px;
}
.play-contents__head h2 {
  margin: 0; font-family: var(--play-display); letter-spacing: .06em; font-size: 28px;
}
.play-contents__head span { color: var(--play-muted); font-size: 13px; }
.play-item-grid, .play-panel__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.play-panel__grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.play-panel__tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.play-pager {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--play-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.play-pager__btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--play-line);
  background: #151b26;
  color: var(--play-text);
  cursor: pointer;
}
.play-pager__btn:disabled {
  opacity: .35;
  cursor: default;
}
.play-item, .play-inv-card {
  position: relative;
  background: linear-gradient(180deg, #1a2230, #10151d);
  border: 1px solid var(--play-line);
  border-radius: 12px;
  padding: 12px 10px 14px;
  text-align: center;
  overflow: hidden;
}
.play-inv-card { cursor: pointer; width: 100%; color: inherit; font: inherit; }
.play-inv-card.is-on { outline: 2px solid var(--play-accent); }
.play-item img, .play-inv-card img { width: 120px; height: 80px; object-fit: contain; margin: 8px auto; display: block; }
.play-item__price { position: absolute; left: 10px; top: 8px; color: var(--play-accent); font-weight: 800; font-size: 12px; }
.play-item__weapon { font-size: 13px; font-weight: 700; }
.play-item__finish { font-size: 12px; color: var(--play-muted); }

.rarity-blue { border-bottom: 3px solid var(--play-blue); }
.rarity-purple { border-bottom: 3px solid var(--play-purple); }
.rarity-pink { border-bottom: 3px solid var(--play-pink); }
.rarity-red { border-bottom: 3px solid var(--play-red); }
.rarity-gold { border-bottom: 3px solid var(--play-gold); }
.play-live__item.rarity-purple { border-left-color: var(--play-purple); }
.play-live__item.rarity-pink { border-left-color: var(--play-pink); }
.play-live__item.rarity-red { border-left-color: var(--play-red); }
.play-live__item.rarity-gold { border-left-color: var(--play-gold); }

/* Upgrade */
.play-upgrade__title {
  text-align: center;
  font-family: var(--play-display);
  letter-spacing: .08em;
  font-size: 34px;
  margin: 8px 0 22px;
}
.play-upgrade__stage {
  display: grid;
  grid-template-columns: 1fr 220px 1fr;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 20px;
}
.play-upgrade__slot, .play-panel {
  background: rgba(0,0,0,.28);
  border: 1px solid var(--play-line);
  border-radius: 14px;
  padding: 14px;
}
.play-upgrade__slot-label { color: var(--play-muted); font-size: 13px; margin-bottom: 10px; }
.play-upgrade__slot-body {
  min-height: 140px;
  display: grid;
  place-items: center;
  background: #0f141c;
  border-radius: 12px;
  border: 1px dashed var(--play-line);
}
.play-upgrade__placeholder { color: var(--play-muted); }
.play-upgrade__selected { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 10px; }
.play-upgrade__chip {
  width: 72px; height: 64px; border-radius: 10px; border: 1px solid var(--play-line);
  background: #151b26; padding: 4px; cursor: pointer;
}
.play-upgrade__chip img { width: 100%; height: 100%; object-fit: contain; }
.play-upgrade__balance-add {
  display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--play-muted); font-size: 13px;
}
.play-upgrade__balance-add input { flex: 1; }
.play-chip.is-on {
  border-color: var(--play-accent);
  color: var(--play-accent);
  background: rgba(255,122,24,.1);
}
.play-item__chance {
  position: absolute;
  right: 10px;
  top: 8px;
  color: #9ad0ff;
  font-size: 11px;
  font-weight: 700;
}
.play-upgrade__stake {
  margin-top: 8px;
  color: var(--play-muted);
  font-size: 13px;
}
.play-upgrade__stake strong { color: var(--play-text); }

.play-wheel {
  position: relative;
  width: 248px;
  height: 248px;
  margin: 0 auto 10px;
  overflow: hidden;
}
.play-wheel__svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: hidden;
  filter: drop-shadow(0 0 18px rgba(255,110,20,.18));
}
.play-wheel__track {
  fill: #121821;
  stroke: #1c2433;
  stroke-width: 18;
}
.play-wheel__win-arc {
  fill: none;
  stroke-width: 18;
  stroke-linecap: butt;
  filter: drop-shadow(0 0 10px rgba(255,140,30,.55));
}
.play-wheel__needle-g line {
  stroke: #ffd24a;
  stroke-width: 3;
  stroke-linecap: round;
}
.play-wheel__needle-g circle {
  fill: #ffd24a;
  stroke: #1a1008;
  stroke-width: 2;
  filter: drop-shadow(0 0 8px rgba(255,210,74,.95));
}
.play-wheel__center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
  z-index: 2;
}
.play-wheel__center strong {
  font-size: 30px;
  font-family: var(--play-display);
  letter-spacing: .02em;
  line-height: 1;
  text-shadow: 0 2px 12px rgba(0,0,0,.45);
}
.play-wheel__center small {
  color: var(--play-muted);
  font-size: 12px;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.play-wheel__labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  font-size: 10px;
  color: rgba(170,184,206,.85);
  font-weight: 600;
  z-index: 2;
}
.play-wheel__labels .at-0 { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); }
.play-wheel__labels .at-25 { position: absolute; left: 2px; top: 50%; transform: translateY(-50%); }
.play-wheel__labels .at-50 { position: absolute; top: 0; left: 50%; transform: translateX(-50%); }
.play-wheel__labels .at-75 { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); }
.play-wheel.is-spinning .play-wheel__center strong { color: var(--play-accent); }
.play-wheel.is-win .play-wheel__center strong { color: #7dff9a; }
.play-wheel.is-lose .play-wheel__center strong { color: #ff7d7d; }

.play-upgrade__result.is-win { color: #7dff9a; }
.play-upgrade__result.is-lose { color: #ff9a7d; }

.play-upgrade__gauge { display: grid; justify-items: center; gap: 12px; align-content: center; }
.play-upgrade__presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.play-upgrade__target { display: flex; gap: 10px; align-items: center; padding: 10px; width: 100%; }
.play-upgrade__target img { width: 90px; height: 60px; object-fit: contain; }
.play-upgrade__target .muted { color: var(--play-muted); font-size: 12px; }
.play-upgrade__target .price { color: var(--play-accent); font-weight: 800; }
.play-upgrade__target .chance { color: #9ad0ff; font-size: 12px; font-weight: 700; margin-top: 2px; }
.play-upgrade__result { font-weight: 700; min-height: 20px; }
.play-upgrade__panels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.play-panel__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.play-panel__head h2 { margin: 0; font-size: 16px; }
.play-panel__empty { text-align: center; padding: 30px 10px; color: var(--play-muted); display: grid; gap: 12px; justify-items: center; }
.play-search {
  background: #0f141c; border: 1px solid var(--play-line); color: var(--play-text);
  border-radius: 8px; padding: 8px 10px; min-width: 140px;
}

.play-hint {
  color: #ffb347;
  font-size: 13px;
  margin: 0;
}
.play-case-actions .play-btn--lg { margin-top: 4px; }

.play-toast {
  position: fixed; right: 18px; bottom: 18px; z-index: 50;
  background: #1b2330; border: 1px solid var(--play-line); border-radius: 12px;
  padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.35);
  max-width: min(360px, calc(100vw - 24px));
}

@media (max-width: 980px) {
  .play-shell-grid, .play-upgrade__stage, .play-upgrade__panels, .play-promo, .play-case-grid {
    grid-template-columns: 1fr;
  }
  .play-panel__grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .play-live {
    position: static;
    max-height: 160px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    align-items: stretch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .play-live::-webkit-scrollbar { display: none; }
  .play-live__title { flex: 0 0 auto; writing-mode: horizontal-tb; position: static; background: none; }
  .play-live__item { min-width: 160px; }
  .play-top { flex-direction: column; align-items: stretch; }
  .play-top__right { justify-content: space-between; }
  .play-shell-grid { padding: 0 14px 28px; }
}
