/* ============================================================
   buyer.gg — mystery-boxes.css
   ============================================================ */

/* ===== INTRO HERO ===== */
.mb-intro {
  background: linear-gradient(160deg, #F0F7FF 0%, #ffffff 60%);
  padding: 60px 0 52px;
  overflow: hidden;
  border-bottom: 1px solid #e2e8f0;
}

.mb-intro__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* LEFT: visual */
.mb-intro__visual {
  position: relative;
  flex: 0 0 460px;
  height: 300px;
}

.mb-intro__visual img {
  height: 115%;
  width: auto;
  object-fit: contain;
  display: block;
  position: absolute;
  bottom: 0;
  left: -16px;
  pointer-events: none;
  user-select: none;
}

/* Floating item badges */
.mb-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 14px 8px 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,.10);
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  animation: mb-badge-float 3.5s ease-in-out infinite;
}

.mb-badge__thumb {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
  background: #EFF6FF;
}

.mb-badge--1 { top: 20px;    right: 48px;  animation-delay: 0s;    z-index: 2; }
.mb-badge--2 { top: 50%;     right: 12px;  animation-delay: -1.2s; z-index: 2; }
.mb-badge--3 { bottom: 28px; right: 80px;  animation-delay: -2.4s; z-index: 2; }

@keyframes mb-badge-float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}
.mb-badge--2 { animation-name: mb-badge-float-mid; }
@keyframes mb-badge-float-mid {
  0%,100% { transform: translateY(-50%); }
  50%      { transform: translateY(calc(-50% - 7px)); }
}

/* RIGHT: copy */
.mb-intro__copy {
  flex: 0 0 auto;
  max-width: 400px;
}

.mb-intro__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #3B82F6;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 100px;
  padding: 4px 12px;
  margin-bottom: 16px;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.mb-intro__title {
  font-size: clamp(30px, 3.6vw, 50px);
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}

.mb-intro__title span {
  color: #3B82F6;
  display: block;
}

.mb-intro__sub {
  font-size: 15px;
  color: #64748b;
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 360px;
}

.mb-intro__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #3B82F6;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 13px 26px;
  border-radius: 100px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(59,130,246,.35);
  transition: background .2s, transform .15s, box-shadow .2s;
}
.mb-intro__cta:hover  { background: #2563EB; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(59,130,246,.45); }
.mb-intro__cta:active { transform: translateY(0); }

/* Responsive */
@media (max-width: 900px) {
  .mb-intro__inner    { flex-direction: column-reverse; gap: 32px; }
  .mb-intro__visual   { flex: none; width: 100%; height: 220px; }
  .mb-intro__visual img { left: 50%; transform: translateX(-50%); }
  .mb-intro__copy     { text-align: center; }
  .mb-intro__sub      { margin-left: auto; margin-right: auto; }
}

/* ===== AVAILABLE BOXES ===== */
.mb-boxes {
  padding: 56px 0 52px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.mb-boxes__header {
  text-align: center;
  margin-bottom: 36px;
}

.mb-boxes__title {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px;
  letter-spacing: -.4px;
}

.mb-boxes__sub {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.mb-boxes__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

.mb-boxes__loading,
.mb-boxes__empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px;
  color: #94a3b8;
  font-size: 14px;
}

/* Box card */
.mb-box-card {
  background: #F8FAFC;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 28px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: box-shadow .2s, transform .15s;
}

.mb-box-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,.10);
  transform: translateY(-2px);
}

.mb-box-card__img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  display: block;
}

.mb-box-card__img-placeholder {
  width: 120px;
  height: 120px;
  background: #e2e8f0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
}

.mb-box-card__name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
  line-height: 1.3;
}

.mb-box-card__price {
  font-size: 22px;
  font-weight: 800;
  color: #3b82f6;
}

.mb-box-card__open {
  width: 100%;
  padding: 11px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .1s;
}

.mb-box-card__open:hover  { background: #2563eb; }
.mb-box-card__open:active { transform: scale(.98); }
.mb-box-card__open:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ===== BOX RESULT MODAL ===== */
.mb-result-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.mb-result-modal {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 40px 32px 32px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  animation: mb-result-pop .25s cubic-bezier(.22,1,.36,1);
}

@keyframes mb-result-pop {
  from { opacity: 0; transform: scale(.92) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.mb-result__close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #f1f5f9;
  border: none;
  border-radius: 8px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
}

.mb-result__close:hover { background: #e2e8f0; }

.mb-result__eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #94a3b8;
  margin-bottom: 16px;
}

.mb-result__img-wrap {
  width: 160px;
  height: 160px;
  background: #F0F7FF;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.mb-result__img {
  width: 140px;
  height: 140px;
  object-fit: contain;
}

.mb-result__name {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}

.mb-result__rarity {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 12px;
}

.mb-result__value {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 4px;
}

.mb-result__balance {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 20px;
}

.mb-result__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mb-result__again {
  padding: 12px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.mb-result__again:hover { background: #2563eb; }

.mb-result__orders {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
}

.mb-result__orders:hover { color: #3b82f6; }

/* ===== LIVE OPENINGS ===== */
.mb-recent {
  background: #F8FAFC;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 28px 0 32px;
}

.mb-recent__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.mb-recent__header h2 {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -.2px;
}

/* Live pill */
.mb-recent__live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #DCFCE7;
  color: #15803D;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 100px;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.mb-recent__live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22C55E;
  position: relative;
  flex-shrink: 0;
}
.mb-recent__live-dot::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(34,197,94,.35);
  animation: mb-live-pulse 1.8s ease-out infinite;
}
@keyframes mb-live-pulse {
  0%   { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.mb-recent__header-arrow {
  color: #94a3b8;
  font-size: 18px;
}

/* Scrollable row */
.mb-recent__row {
  overflow: hidden;
  padding-bottom: 4px;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.mb-recent__row--ready { opacity: 1; }

.mb-recent__track {
  display: flex;
  gap: 12px;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.mb-recent__track--instant {
  transition: none !important;
}

/* Card */
.mb-recent-card {
  flex-shrink: 0;
  width: 172px;
  height: 172px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: box-shadow 0.2s;
  cursor: pointer;
}
.mb-recent-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.10);
}

/* Top: pfp + level + username */
.mb-recent-card__user {
  display: flex;
  align-items: center;
  gap: 7px;
}

.mb-recent-card__pfp-wrap {
  position: relative;
  flex-shrink: 0;
}

.mb-recent-card__pfp {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  object-fit: cover;
  display: block;
}

.mb-recent-card__level {
  position: absolute;
  bottom: -5px;
  left: -5px;
  background: #3B82F6;
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1.4;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.mb-recent-card__username {
  font-size: 11px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: .2px;
}

/* Middle: item image */
.mb-recent-card__item {
  width: 96px;
  height: 96px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  flex-shrink: 0;
}

/* Bottom: price */
.mb-recent-card__price {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  border-top: 1px solid #f1f5f9;
  padding-top: 6px;
  white-space: nowrap;
}

.mb-recent-card__price strong {
  color: #3B82F6;
  font-weight: 800;
  margin-left: 3px;
}

