/* Customer case-opening screen. Phone-first: everything fits a portrait view. */

.shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 22px 18px 56px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}

.topbar__case {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.stage { flex: 1; display: flex; flex-direction: column; justify-content: center; }

.screen { animation: rise 0.35s ease both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.headline {
  font-size: clamp(28px, 8vw, 42px);
  font-weight: 800;
  margin-bottom: 10px;
}

.headline em {
  font-style: normal;
  background: linear-gradient(180deg, #ffe08a, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sub { color: var(--muted); font-size: 16px; max-width: 44ch; margin: 0 auto; }

/* ------------------------------------------------------------- the case */

.case {
  width: min(300px, 74vw);
  aspect-ratio: 1 / 1;
  margin: 30px auto 26px;
  position: relative;
  display: grid;
  place-items: center;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

.case__glow {
  position: absolute;
  inset: -12%;
  background: radial-gradient(circle at 50% 50%, rgba(245, 197, 66, 0.30), transparent 62%);
  filter: blur(6px);
  animation: pulse 3.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: scale(0.97); }
  50% { opacity: 1; transform: scale(1.04); }
}

.case__body {
  position: relative;
  width: 74%;
  height: 74%;
  border-radius: 50%;
  background: linear-gradient(180deg, #ff6a5e 0 46%, #12161f 46% 54%, #f2f5fa 54% 100%);
  border: 4px solid #0b0e14;
  box-shadow:
    inset 0 -14px 34px rgba(0, 0, 0, 0.4),
    inset 0 14px 24px rgba(255, 255, 255, 0.22),
    0 24px 50px rgba(0, 0, 0, 0.55);
  transition: transform 0.2s ease;
}

.case:hover .case__body { transform: scale(1.04) rotate(-3deg); }
.case:active .case__body { transform: scale(0.97); }

.case__button {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 25%;
  height: 25%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #cfd7e4);
  border: 4px solid #0b0e14;
  box-shadow: 0 0 0 4px rgba(245, 197, 66, 0.5), 0 0 26px rgba(245, 197, 66, 0.55);
}

.case__hint {
  position: absolute;
  bottom: -2px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------------------------------------------------------------- reel */

.reel {
  position: relative;
  margin: 34px 0 26px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #10151f, #0a0d14);
  overflow: hidden;
  box-shadow: var(--shadow);
  height: 186px;
}

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

.reel::before { left: 0; background: linear-gradient(90deg, #0a0d14, transparent); }
.reel::after { right: 0; background: linear-gradient(270deg, #0a0d14, transparent); }

.reel__marker {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--gold);
  box-shadow: 0 0 16px 2px rgba(245, 197, 66, 0.75);
  z-index: 4;
}

.reel__marker::before,
.reel__marker::after {
  content: '';
  position: absolute;
  left: 50%;
  border: 7px solid transparent;
  margin-left: -7px;
}

.reel__marker::before { top: -1px; border-top-color: var(--gold); }
.reel__marker::after { bottom: -1px; border-bottom-color: var(--gold); }

.reel__track {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  height: 100%;
  will-change: transform;
}

.item {
  flex: 0 0 132px;
  width: 132px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-bottom: 3px solid var(--item-color, var(--common));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.item__art {
  flex: 1;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--item-color, #888) 30%, transparent), transparent 68%);
  overflow: hidden;
}

.item__art img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }

.item__art--blank {
  font-size: 26px;
  font-weight: 800;
  color: var(--item-color, var(--muted));
  opacity: 0.55;
}

.item__name {
  font-size: 11px;
  padding: 6px 8px;
  text-align: center;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* -------------------------------------------------------------- result */

.result { text-align: center; }

.result__card {
  position: relative;
  margin: 0 auto 22px;
  max-width: 340px;
  padding: 26px 22px 24px;
  border-radius: 20px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--win-color, var(--gold));
  box-shadow: 0 0 46px -6px var(--win-color, var(--gold)), var(--shadow);
  animation: reveal 0.5s cubic-bezier(0.2, 1.2, 0.3, 1) both;
}

@keyframes reveal {
  from { opacity: 0; transform: scale(0.86) translateY(14px); }
  to { opacity: 1; transform: none; }
}

.result__art {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 16px;
}

.result__art img { width: 100%; height: 100%; object-fit: contain; }
.result__art span { font-size: 52px; font-weight: 800; color: var(--win-color); opacity: 0.5; }

.result__name { font-size: 24px; font-weight: 800; margin: 10px 0 6px; }

.claim {
  margin: 0 auto;
  max-width: 340px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px dashed var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
}

.claim__code {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--gold);
  margin: 6px 0 8px;
  text-indent: 0.22em;
}

/* ------------------------------------------------------------ showcase */

.showcase { margin-top: 34px; }

.showcase__title {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin-bottom: 14px;
}

.showcase__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
}

.showcase .item { flex: initial; width: auto; height: 148px; }

.odds {
  font-size: 11px;
  text-align: center;
  padding-bottom: 6px;
  color: var(--item-color, var(--muted));
  font-weight: 700;
}

/* ------------------------------------------------------------- ticket */

.ticket-form { max-width: 330px; margin: 26px auto 0; }

.ticket-form .input {
  text-align: center;
  font-size: 26px;
  letter-spacing: 0.16em;
  font-weight: 700;
  text-transform: uppercase;
  padding: 14px;
}

.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
}

.footer {
  margin-top: 40px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.7;
}
