.wrap {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 20px 80px;
  text-align: center;
}

.hero {
  margin-bottom: 48px;
}

.eyebrow {
  color: var(--accent);
  letter-spacing: 0.25em;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 44px);
  margin-bottom: 12px;
}

.hero-message {
  color: var(--text-dim);
  font-size: 16px;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.5;
  white-space: pre-line;
}

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.stage[hidden] {
  display: none;
}

/* --- Sandiqcha --- */
.crate {
  position: relative;
  width: min(65vw, 300px);
  cursor: pointer;
  filter: drop-shadow(0 0 26px rgba(242, 169, 60, 0.45));
  animation: crate-float 3.2s ease-in-out infinite;
}

@keyframes crate-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.crate:hover {
  filter: drop-shadow(0 0 36px rgba(242, 169, 60, 0.65));
}

.crate-svg {
  width: 100%;
  height: auto;
  display: block;
}

.crate .rivet {
  fill: #8b93a1;
}

#crate-lock,
#crate-lid {
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.55s ease;
  transform-box: fill-box;
  transform-origin: 50% 50%;
}

.crate.unlocking {
  animation: none;
  filter: drop-shadow(0 0 60px var(--accent));
}

.crate.unlocking #crate-lock {
  transform: translateY(-46px) rotate(35deg);
  opacity: 0;
}

.crate.unlocking #crate-lid {
  transform: translateY(-34px) rotate(-6deg);
  opacity: 0;
}

.open-btn {
  border: none;
  cursor: pointer;
  padding: 16px 44px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #24160a;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.08em;
  box-shadow: 0 10px 30px rgba(242, 169, 60, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.open-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(242, 169, 60, 0.55);
}

.open-btn:active {
  transform: translateY(0);
}

.open-btn:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

/* --- Ichidagi skinlar preview (foizsiz) --- */
.contents-preview {
  width: 100%;
  max-width: 640px;
  margin-top: 8px;
}

.contents-title {
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}

.contents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 12px;
}

.content-card {
  background: var(--panel);
  border: 2px solid var(--item-color, var(--border));
  border-radius: 10px;
  padding: 10px 8px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: inset 0 0 18px color-mix(in srgb, var(--item-color, var(--border)) 20%, transparent);
}

.content-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.content-card .content-name {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* --- Reel --- */
.reel-viewport {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 820px;
  height: 150px;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: 14px;
}

.reel-viewport::before,
.reel-viewport::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 90px;
  z-index: 2;
  pointer-events: none;
}

.reel-viewport::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-2), transparent);
}

.reel-viewport::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg-2), transparent);
}

.reel-marker {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: translateX(-50%);
  z-index: 3;
  box-shadow: 0 0 14px var(--accent);
}

.reel-marker::before,
.reel-marker::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 9px solid transparent;
}

.reel-marker::before {
  top: -2px;
  border-top: none;
  border-bottom-color: var(--accent);
}

.reel-marker::after {
  bottom: -2px;
  border-bottom: none;
  border-top-color: var(--accent);
}

.reel-track {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  will-change: transform;
}

.reel-item {
  flex: 0 0 118px;
  height: 118px;
  border-radius: 10px;
  background: var(--panel-2);
  border: 2px solid var(--item-color, var(--border));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-shadow: inset 0 0 24px color-mix(in srgb, var(--item-color, var(--border)) 25%, transparent);
}

.reel-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* --- Natija kartasi --- */
.result-card {
  position: relative;
  padding: 40px 32px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  max-width: 380px;
  overflow: hidden;
}

.result-glow {
  position: absolute;
  inset: -2px;
  background: radial-gradient(circle at 50% 30%, var(--item-color, var(--accent)), transparent 65%);
  opacity: 0.35;
  z-index: 0;
  filter: blur(10px);
}

.result-card > * {
  position: relative;
  z-index: 1;
}

.result-image {
  width: 180px;
  height: 180px;
  object-fit: contain;
  filter: drop-shadow(0 0 22px var(--item-color, var(--accent)));
  margin-bottom: 18px;
}

.result-rarity {
  color: var(--item-color, var(--accent));
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.result-name {
  font-size: 26px;
  margin-bottom: 14px;
}

.result-caption {
  color: var(--text-dim);
  font-size: 14px;
}

.particle-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.particle {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--item-color, var(--accent));
  animation: particle-burst 1.1s ease-out forwards;
}

@keyframes particle-burst {
  from {
    transform: translate(-50%, -50%) rotate(var(--angle)) translateX(0) scale(1);
    opacity: 1;
  }
  to {
    transform: translate(-50%, -50%) rotate(var(--angle)) translateX(var(--dist)) scale(0.3);
    opacity: 0;
  }
}

.empty-text {
  color: var(--text-dim);
  font-size: 15px;
  max-width: 400px;
}

@media (max-width: 520px) {
  .reel-item {
    flex-basis: 92px;
    height: 92px;
  }
  .reel-viewport {
    height: 120px;
  }
}
