/* ============================================================
   SCREEN 1 — Case Main Screen
   ============================================================ */

/* Background */
.case-screen .case-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Light column */
.case-screen .light-column {
  position: absolute;
  left: 612px;
  top: -3px;
  width: 549px;
  height: 527px;
  z-index: 1;
  pointer-events: none;
}

/* --- Header --- */
.case-header {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  height: 90px;
}

.case-header .btn-back {
  position: absolute;
  left: 112px;
  top: 35px;
  padding: 14px 20px;
}
.case-header .btn-back img { width: 31px; }

.case-header .btn-info-top {
  position: absolute;
  left: 657px;
  top: 30px;
}
.case-header .btn-info-top img { width: 39px; height: 39px; }

/* Dust bar */
.dust-bar {
  position: absolute;
  left: 717px;
  top: 15px;
  width: 400px;
  height: 70px;
}
.dust-bar .dust-bar-bg   { position: absolute; left: 0; top: 21px; width: 349px; height: 28px; }
.dust-bar .dust-segments  { position: absolute; left: 27px; top: 24px; width: 294px; height: 23px; }
.dust-bar .dust-fill {
  position: absolute;
  left: 2px;
  top: 23px;
  width: 341px;
  height: 24px;
  background-image:
    repeating-linear-gradient(115deg, rgba(255,255,255,0.22) 0 10px, transparent 10px 22px),
    linear-gradient(180deg, #FFC54A 0%, #F5A01C 100%);
  background-blend-mode: overlay, normal;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.3s ease;
  z-index: 2;
  pointer-events: none;
}
.dust-bar .dust-icon      { position: absolute; left: 117px; top: 23px; width: 24px; height: 24px; z-index: 3; }
.dust-bar .dust-text      { position: absolute; left: 153px; top: 25px; font: var(--font-dust); z-index: 3; }
.dust-bar .dust-glow      { position: absolute; left: 337px; top: 7px; width: 57px; height: 57px; }
.dust-bar .dust-reward    { position: absolute; left: 330px; top: 0; width: 70px; height: 70px; }

/* Balance */
.balance-bc {
  position: absolute;
  left: 1238px;
  top: 21px;
  width: 238px;
  height: 58px;
  z-index: 10;
}
.balance-bc .balance-bg  { position: absolute; inset: 0; width: 238px; height: 58px; }
.balance-bc .btn-plus-link { display: block; position: absolute; left: 49px; top: 9px; width: 40px; height: 40px; z-index: 3; cursor: pointer; }
.balance-bc .btn-plus    { position: absolute; left: 0; top: 0; width: 40px; height: 40px; z-index: 2; pointer-events: none; }
.balance-bc .icon-plus   { position: absolute; left: 8px; top: 8px; width: 23px; height: 24px; z-index: 3; pointer-events: none; }
.balance-bc .bc-amount   { position: absolute; left: 105px; top: 17px; font: var(--font-balance); z-index: 2; }

/* Prizes button */
.case-header .btn-prizes {
  position: absolute;
  left: 1661px;
  top: 23px;
}
.case-header .btn-prizes img { width: 52px; height: 52px; }

/* --- Title --- */
.case-title {
  position: absolute;
  left: 0;
  right: 0;
  top: 90px;
  text-align: center;
  font: var(--font-title);
  z-index: 10;
  pointer-events: none;
}

/* --- Prize display (center) --- */
.prize-display {
  position: absolute;
  left: 709px;
  top: 222px;
  width: 354px;
  height: 354px;
  z-index: 5;
}
.prize-display img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* --- Case selector (left) --- */
.case-selector {
  position: absolute;
  left: 82px;
  top: 228px;
  width: 120px;
  z-index: 10;
}

.case-selector .arrow-up {
  position: absolute;
  left: 41px;
  top: 0;
  width: 40px;
  height: 23px;
  transform: translateX(-50%) rotate(180deg);
  cursor: pointer;
  pointer-events: auto;
}
.case-selector .arrow-up.disabled,
.case-selector .arrow-down.disabled { opacity: 0.35; pointer-events: none; }

.case-selector .arrow-down {
  position: absolute;
  left: 41px;
  top: 386px;
  transform: translateX(-50%);
  width: 40px;
  height: 23px;
  cursor: pointer;
  pointer-events: auto;
}

.case-list {
  position: absolute;
  top: 37px;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.case-slot {
  position: relative;
  width: 74px;
  height: 74px;
  cursor: pointer;
}
.case-slot.active {
  width: 83px;
  height: 83px;
}
.case-slot .slot-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.case-slot .slot-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  object-fit: contain;
}
.case-slot .slot-count {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  width: 25px;
  height: 30px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.case-slot .slot-count img { width: 25px; height: 30px; }
.case-slot .slot-count span {
  position: absolute;
  font: var(--font-counter);
  z-index: 4;
}

/* --- Action buttons --- */
.case-actions {
  position: absolute;
  top: 725px;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-open {
  position: relative;
  width: 383px;
  height: 74px;
  display: flex;
  align-items: center;
  border: none;
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
}
.btn-open .btn-accent-bar {
  width: 10px;
  height: 100%;
  background: #fff;
  flex-shrink: 0;
  border-radius: 4px 0 0 4px;
}
.btn-open .btn-label {
  font: var(--font-btn);
  color: #fff;
  margin-left: 20px;
  z-index: 2;
}
.btn-open .btn-price {
  font: var(--font-btn);
  color: #fff;
  margin-left: auto;
  margin-right: 24px;
  z-index: 2;
}

/* x1 — blue-gray */
.btn-open-x1 {
  background: #7685AB;
  border-radius: 0 4px 4px 0;
}
.btn-open-x1 .btn-accent-bar {
  border-radius: 4px 0 0 4px;
}

/* x10 — red */
.btn-open-x10 {
  background: #FE1800;
  border-radius: 0 4px 4px 0;
}
.btn-open-x10 .btn-accent-bar {
  border-radius: 4px 0 0 4px;
}

.prize-label {
  position: relative;
  width: 355px;
  height: 93px;
  margin: 0 16px;
}
.prize-label .prize-bg {
  position: absolute;
  inset: 0;
  width: 355px;
  height: 93px;
}
.prize-label .prize-name {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font: var(--font-prize);
  z-index: 2;
  padding: 0 12px;
}

/* --- Prize grid (bottom) --- */
.prize-grid {
  position: absolute;
  left: 0;
  top: 822px;
  width: 1772px;
  height: 175px;
  z-index: 10;
}
.prize-grid .grid-bg      { position: absolute; left: 0; top: 11px; width: 1772px; height: 119px; }
.prize-grid .grid-overlay  { position: absolute; left: 0; top: 11px; width: 1772px; height: 119px; z-index: 4; pointer-events: none; }

.grid-selected {
  position: absolute;
  top: 20px;
  width: 100px;
  height: 100px;
  z-index: 5;
}
.grid-selected .sel-bg   { width: 100px; height: 100px; }
.grid-selected .sel-icon  { position: absolute; left: 7px; top: 7px; width: 86px; height: 86px; object-fit: contain; }
.grid-selected .ptr-up    { position: absolute; left: 50%; top: -9px; transform: translateX(-50%); width: 39px; height: 31px; z-index: 3; }
.grid-selected .ptr-down  { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); width: 39px; height: 31px; z-index: 3; }

.grid-item {
  position: absolute;
  top: 32px;
  width: 76px;
  height: 76px;
  z-index: 3;
  cursor: pointer;
}
.grid-item .item-bg   { width: 76px; height: 76px; }
.grid-item .item-icon  { position: absolute; left: 4px; top: 4px; width: 68px; height: 68px; object-fit: contain; z-index: 2; }

/* Rarity plates: replace default bg with a colored plate for rarity >= 2 */
.grid-item[data-rarity="2"] .item-bg,
.grid-item[data-rarity="3"] .item-bg,
.grid-item[data-rarity="4"] .item-bg,
.grid-item[data-rarity="5"] .item-bg,
.grid-selected[data-rarity="2"] .sel-bg,
.grid-selected[data-rarity="3"] .sel-bg,
.grid-selected[data-rarity="4"] .sel-bg,
.grid-selected[data-rarity="5"] .sel-bg { visibility: hidden; }

.grid-item .rarity-plate {
  position: absolute;
  left: 0;
  top: 0;
  width: 76px;
  height: 76px;
  z-index: 1;
  pointer-events: none;
  border-radius: 8px;
  display: none;
}
.grid-item[data-rarity="2"] .rarity-plate,
.grid-item[data-rarity="3"] .rarity-plate,
.grid-item[data-rarity="4"] .rarity-plate,
.grid-item[data-rarity="5"] .rarity-plate { display: block; }

.grid-item[data-rarity="2"] .rarity-plate { background: linear-gradient(to top, #2EAC58 0%, #0D0E11 100%); }
.grid-item[data-rarity="3"] .rarity-plate { background: linear-gradient(to top, #1B98FF 0%, #0D0E11 100%); }
.grid-item[data-rarity="4"] .rarity-plate { background: linear-gradient(to top, #9666EF 0%, #0D0E11 100%); }
.grid-item[data-rarity="5"] .rarity-plate { background: linear-gradient(to top, #FFC700 0%, #0D0E11 100%); }

.grid-selected .rarity-plate {
  position: absolute;
  left: 0;
  top: 0;
  width: 100px;
  height: 100px;
  z-index: 1;
  pointer-events: none;
  border-radius: 10px;
  display: none;
}
.grid-selected[data-rarity="2"] .rarity-plate,
.grid-selected[data-rarity="3"] .rarity-plate,
.grid-selected[data-rarity="4"] .rarity-plate,
.grid-selected[data-rarity="5"] .rarity-plate { display: block; }

.grid-selected[data-rarity="2"] .rarity-plate { background: linear-gradient(to top, #2EAC58 0%, #0D0E11 100%); }
.grid-selected[data-rarity="3"] .rarity-plate { background: linear-gradient(to top, #1B98FF 0%, #0D0E11 100%); }
.grid-selected[data-rarity="4"] .rarity-plate { background: linear-gradient(to top, #9666EF 0%, #0D0E11 100%); }
.grid-selected[data-rarity="5"] .rarity-plate { background: linear-gradient(to top, #FFC700 0%, #0D0E11 100%); }
.grid-selected .sel-icon { z-index: 2; }

/* --- Bonus panel (right) --- */
.bonus-panel {
  position: absolute;
  left: 1528px;
  top: 205px;
  z-index: 10;
}

.bonus-header {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 41px;
}
.bonus-header .bonus-label {
  position: relative;
  width: 135px;
  height: 41px;
}

.bonus-header .bonus-label svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.bonus-header .bonus-label svg { width: 135px; height: 41px; }
.bonus-header .bonus-label span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font: var(--font-small);
  z-index: 2;
  text-transform: uppercase;
}
.bonus-header .bonus-info { cursor: pointer; }
.bonus-header .bonus-info img { width: 41px; height: 41px; }

.bonus-track {
  position: relative;
  width: 184px;
  height: 422px;
  margin-top: 8px;
}
.bonus-track .track-bg      { position: absolute; left: 1px; top: 0; width: 177px; height: 422px; }
.bonus-track .track-line {
  position: absolute;
  left: 44px;
  top: 18px;
  width: 5px;
  height: 388px;
  background: #3A3F4A;
  border-radius: 3px;
  z-index: 2;
  overflow: hidden;
}
.bonus-track .track-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0%;
  background: linear-gradient(to top, #FFC700 0%, #FFB300 100%);
  border-radius: 3px;
  transition: height 0.4s ease;
}

.bonus-stage {
  position: absolute;
  left: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 3;
  padding-left: 21px;
}
.bonus-stage .badge {
  position: relative;
  width: 48px;
  height: 36px;
}
.bonus-stage .badge img { width: 48px; height: 36px; }
.bonus-stage .badge span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font: var(--font-badge);
  z-index: 2;
}
.stage-reward {
  position: relative;
  width: 66px;
  height: 67px;
  margin-left: 4px;
}
.stage-reward .rew-bg   { position: absolute; inset: 0; width: 66px; height: 67px; }
.stage-reward .rew-img   { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); max-width: 60px; max-height: 60px; z-index: 2; object-fit: contain; }
.stage-reward .rew-lock  { position: absolute; right: -2px; bottom: -2px; width: 18px; height: 18px; z-index: 3; }

.stage-reward .rarity-plate {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: linear-gradient(to top, rgba(158, 158, 158, 0.4) 0%, rgba(40, 40, 49, 0.4) 100%);
  z-index: 1;
}
.bonus-stage[data-rarity="2"] .stage-reward .rarity-plate { background: linear-gradient(to top, #2EAC58 0%, #0D0E11 100%); }
.bonus-stage[data-rarity="3"] .stage-reward .rarity-plate { background: linear-gradient(to top, #1B98FF 0%, #0D0E11 100%); }
.bonus-stage[data-rarity="4"] .stage-reward .rarity-plate { background: linear-gradient(to top, #9666EF 0%, #0D0E11 100%); }
.bonus-stage[data-rarity="5"] .stage-reward .rarity-plate { background: linear-gradient(to top, #FFC700 0%, #0D0E11 100%); }

.bonus-stage.unlocked .badge { outline: 2px solid #FFC700; border-radius: 4px; }
.bonus-stage.unlocked .badge span { color: #8A8F99; }

.stage-reward .rew-check {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font: 700 32px/1 var(--font-family);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  border-radius: 6px;
}

/* ============================================================
   SCREEN 3 — Single Reward
   ============================================================ */
.reward-screen {
  background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
}

.reward-header {
  position: absolute;
  left: 0;
  top: 34px;
  z-index: 10;
}
.reward-header .header-bg {
  width: 544px;
  height: 105px;
}
.reward-header .header-title {
  position: absolute;
  left: 40px;
  top: 50%;
  transform: translateY(-50%);
  font: var(--font-heading);
  font-style: normal;
  font-size: 44px;
  z-index: 2;
}

/* Reward dust bar (top right) */
.reward-dust-bar {
  position: absolute;
  right: 100px;
  top: 50px;
  z-index: 10;
}

/* Reward card */
.reward-card {
  position: absolute;
  left: 150px;
  top: 283px;
  display: flex;
  gap: 0;
  z-index: 5;
}

.reward-item-frame {
  position: relative;
  width: 477px;
  height: 457px;
}
.reward-item-frame .frame-bg { position: absolute; inset: 0; width: 477px; height: 457px; }
.reward-item-frame .frame-img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: 400px;
  max-height: 400px;
  z-index: 2;
  object-fit: contain;
}
.reward-item-frame[data-rarity="2"] .frame-bg,
.reward-item-frame[data-rarity="3"] .frame-bg,
.reward-item-frame[data-rarity="4"] .frame-bg,
.reward-item-frame[data-rarity="5"] .frame-bg { visibility: hidden; }
.reward-item-frame .rarity-plate {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: 24px;
  display: none;
}
.reward-item-frame[data-rarity="2"] .rarity-plate,
.reward-item-frame[data-rarity="3"] .rarity-plate,
.reward-item-frame[data-rarity="4"] .rarity-plate,
.reward-item-frame[data-rarity="5"] .rarity-plate { display: block; }
.reward-item-frame[data-rarity="2"] .rarity-plate { background: linear-gradient(to top, #2EAC58 0%, #0D0E11 100%); }
.reward-item-frame[data-rarity="3"] .rarity-plate { background: linear-gradient(to top, #1B98FF 0%, #0D0E11 100%); }
.reward-item-frame[data-rarity="4"] .rarity-plate { background: linear-gradient(to top, #9666EF 0%, #0D0E11 100%); }
.reward-item-frame[data-rarity="5"] .rarity-plate { background: linear-gradient(to top, #FFC700 0%, #0D0E11 100%); }

.reward-info {
  position: relative;
  width: 999px;
  height: 407px;
  margin-top: 25px;
}
.reward-info .info-bg { position: absolute; inset: 0; width: 999px; height: 407px; }
.reward-info .info-name-area {
  position: absolute;
  left: 167px;
  top: 102px;
  width: 665px;
  height: 176px;
  z-index: 2;
  display: flex;
}
.reward-info .bar-l   { width: 21px; height: 176px; }
.reward-info .name-bg  { flex: 1; height: 176px; position: relative; }
.reward-info .name-bg img { width: 100%; height: 100%; }
.reward-info .name-bg span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 40px/1 var(--font-family);
  color: var(--color-text);
  z-index: 2;
  text-align: center;
  padding: 0 16px;
}
.reward-info .bar-r { width: 21px; height: 176px; }

/* Reward buttons */
.reward-buttons {
  position: absolute;
  left: 0;
  top: 779px;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.btn-reward {
  position: relative;
  display: flex;
  align-items: center;
  height: 75px;
}
.btn-reward .btn-accent { width: 10px; height: 75px; }
.btn-reward .btn-bg     { width: 375px; height: 75px; }
.btn-reward .btn-label {
  position: absolute;
  left: 10px;
  top: 0;
  width: 375px;
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: var(--font-btn);
  color: var(--color-text);
  z-index: 2;
}
.btn-reward .spray-amount { color: var(--color-text); }
.btn-reward .dust-mini { width: 20px; height: 20px; }

.spray-ext {
  display: flex;
  align-items: center;
  gap: 10px;
  font: var(--font-btn);
  color: var(--color-text);
  margin-left: 14px;
}
.spray-ext .dust-mini { width: 32px; height: 32px; }

/* ============================================================
   SCREEN 4 — Prize in x10 (one by one)
   ============================================================ */
.x10-single-screen {
  background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
}

.x10-skip {
  position: absolute;
  right: 60px;
  top: 50px;
  font: var(--font-btn);
  color: var(--color-text-muted);
  z-index: 10;
  cursor: pointer;
}

.x10-counter {
  position: absolute;
  left: 50%;
  top: 620px;
  transform: translateX(-50%);
  font: var(--font-badge);
  color: var(--color-text-muted);
  z-index: 10;
  background: rgba(40,40,40,0.8);
  padding: 6px 16px;
  border-radius: 4px;
}

.x10-tap-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 80px;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 49px;
  color: #9797A0;
  z-index: 10;
}

/* ============================================================
   SCREEN 5 — Received x10 prizes (grid)
   ============================================================ */
.x10-grid-screen {
  background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
}

.rewards-grid-wrap {
  position: absolute;
  left: 113px;
  top: 253px;
  width: 1546px;
  height: 501px;
  z-index: 5;
}
.rewards-grid-wrap .grid-wrap-bg {
  position: absolute;
  inset: 0;
  width: 1546px;
  height: 501px;
}

.rewards-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(5, 229px);
  gap: 25px 41px;
  padding: 24px 119px;
  height: 100%;
  box-sizing: border-box;
}

.reward-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  overflow: hidden;
  border-radius: 5px;
}

.reward-cell .cell-name-plate {
  width: 100%;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  border-radius: 0 0 5px 5px;
  position: relative;
  z-index: 2;
}

.reward-cell .cell-name {
  font: 700 21px/1.15 'Montserrat', sans-serif;
  color: #fff;
  text-align: center;
}

.reward-cell .cell-img-bg {
  position: relative;
  flex: 1;
  background: linear-gradient(180deg, rgba(0,54,0,1) 0%, rgba(0,156,0,1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.reward-cell .cell-img {
  width: 152px;
  height: 152px;
  object-fit: contain;
}

.reward-cell .cell-spray {
  position: absolute;
  bottom: 36px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: 700 40px/1 'Montserrat', sans-serif;
  color: #fff;
}
.reward-cell .cell-spray .dust-mini { width: 40px; height: 40px; }

.reward-cell .cell-check {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 42px;
  height: 44px;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 4px;
  background: transparent;
  z-index: 3;
}
.reward-cell .cell-check.checked {
  background: #FF9A00;
  border-color: #FF9A00;
}

/* ============================================================
   SCREEN 7 — Spray result x10
   ============================================================ */
.spray-result-screen {
  background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
}

.spray-cell {
  position: relative;
  background: rgba(30, 30, 50, 0.6);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.spray-cell .spray-label {
  font: 500 18px/1 var(--font-family);
  color: var(--color-text-muted);
  margin-bottom: 12px;
}
.spray-cell .spray-value {
  font: 700 28px/1 var(--font-family);
  display: flex;
  align-items: center;
  gap: 8px;
}
.spray-cell .spray-value .dust-mini { width: 24px; height: 24px; }
