/* cs2-case-open CACHE 20261205i2 — CS2-like immersive case reveal */

.cs2co {
  --cs2-blue: #4b69ff;
  --cs2-purple: #8847ff;
  --cs2-pink: #d32ce6;
  --cs2-red: #eb4b4b;
  --cs2-gold: #ffd700;
  --cs2-tile-w: 148px;
  --cs2-tile-h: 148px;
  --cs2-gap: 10px;
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: max(14px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  color: #e8eef7;
  background:
    radial-gradient(70% 45% at 50% -10%, rgba(75, 105, 255, 0.28), transparent 60%),
    radial-gradient(50% 40% at 80% 110%, rgba(235, 75, 75, 0.12), transparent 55%),
    radial-gradient(40% 30% at 15% 90%, rgba(136, 71, 255, 0.1), transparent 50%),
    #07090f;
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
  overflow: hidden;
}

.cs2co__fx {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(70% 60% at 50% 40%, #000 20%, transparent 75%);
  opacity: 0.7;
}

.cs2co * { box-sizing: border-box; }

.cs2co__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.cs2co__brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  text-align: center;
  flex: 1;
}
.cs2co__kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #7aa2ff;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  font-weight: 800;
}
.cs2co__kicker-ico {
  width: 14px;
  height: 14px;
  object-fit: contain;
  display: block;
}
.cs2co__title {
  margin: 0;
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.02;
  letter-spacing: 0.04em;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 0 0 40px rgba(75, 105, 255, 0.35);
}
.cs2co__status {
  margin: 0;
  color: #8b95a8;
  font-size: 14px;
}

.cs2co__iconbtn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #d7deea;
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
  flex: 0 0 auto;
}
.cs2co__iconbtn--ghost {
  visibility: hidden;
}
.cs2co__iconbtn:disabled {
  opacity: 0.45;
  cursor: default;
}

.cs2co__stage {
  min-height: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 22px;
  width: min(1180px, 100%);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.cs2co__case {
  width: min(280px, 52vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  position: relative;
  filter: drop-shadow(0 22px 48px rgba(0, 0, 0, 0.6));
  transition: transform 0.45s ease, opacity 0.35s ease;
  animation: cs2co-case-in 0.55s cubic-bezier(0.16, 0.84, 0.22, 1) both;
}
@keyframes cs2co-case-in {
  from { opacity: 0; transform: translateY(18px) scale(0.92); }
  to { opacity: 1; transform: none; }
}
.cs2co__case-glow {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(75, 105, 255, 0.45), transparent 70%);
  filter: blur(18px);
  animation: cs2co-glow 2.4s ease-in-out infinite;
}
@keyframes cs2co-glow {
  0%, 100% { opacity: 0.55; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.08); }
}
.cs2co__case img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  position: relative;
  z-index: 1;
}
.cs2co.is-spinning .cs2co__case {
  transform: translateY(-10px) scale(0.88);
  opacity: 0.4;
}
.cs2co.is-reveal .cs2co__case {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  height: 0;
  overflow: hidden;
}

.cs2co__reel-shell {
  width: 100%;
  position: relative;
  border-radius: 6px;
  padding: 18px 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)),
    linear-gradient(90deg, rgba(11, 14, 20, 0.2), rgba(20, 28, 44, 0.55), rgba(11, 14, 20, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.45),
    inset 0 20px 40px rgba(0, 0, 0, 0.25),
    0 24px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.cs2co.is-spinning .cs2co__reel-shell {
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 215, 0, 0.12),
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 0 40px rgba(75, 105, 255, 0.12);
}

.cs2co__reel-shell:before,
.cs2co__reel-shell:after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(140px, 20%);
  z-index: 3;
  pointer-events: none;
}
.cs2co__reel-shell:before {
  left: 0;
  background: linear-gradient(90deg, #07090f 10%, transparent);
}
.cs2co__reel-shell:after {
  right: 0;
  background: linear-gradient(270deg, #07090f 10%, transparent);
}

.cs2co__marker {
  position: absolute;
  left: 50%;
  top: 6px;
  bottom: 6px;
  width: 2px;
  transform: translateX(-50%);
  z-index: 5;
  background: linear-gradient(180deg, transparent, #ffd700 10%, #fff3a0 50%, #ffd700 90%, transparent);
  box-shadow: 0 0 22px rgba(255, 215, 0, 0.85), 0 0 4px rgba(255, 255, 255, 0.8);
  pointer-events: none;
}
.cs2co__marker:before,
.cs2co__marker:after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.8));
}
.cs2co__marker:before {
  top: 0;
  border-top: 10px solid #ffd700;
}
.cs2co__marker:after {
  bottom: 0;
  border-bottom: 10px solid #ffd700;
}

.cs2co__viewport {
  height: calc(var(--cs2-tile-h) + 32px);
  overflow: hidden;
  position: relative;
}

.cs2co__track {
  display: flex;
  align-items: center;
  gap: var(--cs2-gap);
  height: 100%;
  width: max-content;
  padding: 0 12px;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  opacity: 1;
  visibility: visible;
}

.cs2co__tile {
  flex: 0 0 var(--cs2-tile-w);
  width: var(--cs2-tile-w);
  min-width: var(--cs2-tile-w);
  max-width: var(--cs2-tile-w);
  height: var(--cs2-tile-h);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.35)),
    #121821;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 -4px 0 var(--cs2-rarity, var(--cs2-blue));
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: stretch;
}
.cs2co__tile-glow {
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--cs2-rarity, #4b69ff) 28%, transparent));
  pointer-events: none;
}
.cs2co__tile.is-top {
  box-shadow:
    inset 0 -4px 0 var(--cs2-gold),
    0 0 0 1px rgba(255, 215, 0, 0.4),
    0 0 28px rgba(255, 215, 0, 0.22);
}
.cs2co__tile.is-top:after {
  content: "TOP";
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #1a1400;
  background: linear-gradient(180deg, #ffe566, #ffd700);
  padding: 3px 6px;
  border-radius: 2px;
}

.cs2co__tile-art {
  display: grid;
  place-items: center;
  padding: 14px 10px 4px;
  position: relative;
  z-index: 1;
}
.cs2co__tile-art img {
  width: 78%;
  height: 78%;
  max-width: 96px;
  max-height: 96px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.5));
}
.cs2co__tile-art img.is-slot {
  width: 70%;
  height: 70%;
  border-radius: 10px;
}
.cs2co__tile-label {
  padding: 0 6px 10px;
  font-size: 13px;
  line-height: 1.15;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #f2f5fa;
  position: relative;
  z-index: 1;
}

.cs2co__idle {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  z-index: 2;
  background: linear-gradient(180deg, rgba(7, 9, 15, 0.25), rgba(7, 9, 15, 0.7));
  color: #c5d0e2;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}
.cs2co__idle-ring {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(75, 105, 255, 0.25);
  border-top-color: #4b69ff;
  animation: cs2co-spin 0.8s linear infinite;
}
@keyframes cs2co-spin {
  to { transform: rotate(360deg); }
}

.cs2co__reveal {
  width: min(480px, 94%);
  margin: 0 auto;
  text-align: center;
  padding: 26px 22px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.28)),
    #10161f;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 28px 70px rgba(0, 0, 0, 0.5),
    0 0 50px color-mix(in srgb, var(--cs2-win, #4b69ff) 25%, transparent),
    inset 0 -5px 0 var(--cs2-win, var(--cs2-blue));
  animation: cs2co-pop 0.5s cubic-bezier(0.16, 0.84, 0.22, 1) both;
}
@keyframes cs2co-pop {
  from { opacity: 0; transform: translateY(18px) scale(0.92); }
  to { opacity: 1; transform: none; }
}
.cs2co__reveal small {
  display: block;
  color: #8b95a8;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 12px;
}
.cs2co__reveal img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  object-position: center;
  margin: 0 auto 12px;
  display: block;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.5));
}
.cs2co__reveal img.is-slot {
  border-radius: 14px;
}
.cs2co__reveal strong {
  display: block;
  font-size: clamp(22px, 3.2vw, 30px);
  color: #fff;
  margin-bottom: 8px;
}
.cs2co__reveal p {
  margin: 0;
  color: #9aa6bb;
  font-size: 14px;
}

.cs2co__footer {
  display: grid;
  place-items: center;
  gap: 10px;
  width: min(1180px, 100%);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.cs2co__btn {
  width: min(440px, 100%);
  min-height: 54px;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(180deg, #5b7cff, #2f49d8);
  box-shadow: 0 12px 32px rgba(47, 73, 216, 0.4);
}
.cs2co__btn:disabled {
  cursor: default;
  opacity: 0.72;
}
.cs2co__btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.cs2co__err {
  color: #ff8f9d;
  font-size: 13px;
  text-align: center;
}

@media (max-width: 900px) {
  .cs2co {
    --cs2-tile-w: 122px;
    --cs2-tile-h: 122px;
    --cs2-gap: 8px;
  }
}
@media (max-width: 560px) {
  .cs2co {
    --cs2-tile-w: 104px;
    --cs2-tile-h: 108px;
    --cs2-gap: 7px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .cs2co__title { font-size: 26px; letter-spacing: 0.03em; }
  .cs2co__case { width: min(170px, 48vw); }
  .cs2co__reel-shell { padding: 14px 0; }
}
