/* ==========================================================================
   BULLDROP — Main page styles
   Ticker · Hero · Features · Sidebar+Grid layout · Case card ·
   How it works · Live drops · Top players · Stats
   Depends on shared.css tokens.
   ========================================================================== */

/* ---------- Live ticker (top strip) ---------- */
.ticker {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg-surface);
}

.ticker__list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.ticker__list::-webkit-scrollbar { display: none; }

.ticker__list > li { flex: 0 0 auto; }

/* Each drop is a button that opens the auth modal */
.ticker__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 150px;
  padding: 8px 10px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--bg-surface-2);
  text-align: left;
  cursor: pointer;
  transition: transform var(--t) var(--ease), border-color var(--t) var(--ease),
    background-color var(--t) var(--ease);
}
.ticker__item:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--bg-elevated);
}

/* Rarity tint on the border */
.ticker__item--rare { border-color: rgba(255, 176, 46, 0.4); }
.ticker__item--legend { border-color: rgba(255, 89, 95, 0.45); }

/* New drops slide in from the left of the feed */
.ticker__item--enter {
  animation: ticker-in 0.42s var(--ease-out) both;
}
@keyframes ticker-in {
  from {
    opacity: 0;
    transform: translateX(-14px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.ticker__item img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.ticker__meta { display: grid; gap: 2px; min-width: 0; }
.ticker__name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ticker__name--rare { color: var(--gold); }
.ticker__name--legend { color: var(--brand); }
.ticker__price {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 18px;
  padding-top: 22px;
}

.hero__banner {
  position: relative;
  min-height: 320px;
  border-radius: var(--r-2xl);
  border: 1px solid var(--line);
  background: var(--bg-inset);
  overflow: hidden;
  isolation: isolate;
}

/* Two-layer composite: painted bg + cut-out character */
.hero__bg,
.hero__char {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
/* Pushed right so the figure clears the copy column */
.hero__char {
  z-index: -1;
  object-fit: contain;
  object-position: right bottom;
  transform: translateX(12%);
}

/* Left-side scrim keeps the headline legible over the art */
.hero__banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    100deg,
    rgba(10, 11, 16, 0.97) 0%,
    rgba(10, 11, 16, 0.93) 40%,
    rgba(10, 11, 16, 0.55) 62%,
    rgba(10, 11, 16, 0) 84%
  );
}

.hero__content {
  position: relative;
  max-width: 480px;
  padding: 46px 40px;
}

/* Display headline — the visual banner text (not a heading element, so the
   keyword H1 below it stays the page's single H1) */
.hero__display {
  margin-bottom: 12px;
  font-size: clamp(27px, 3.4vw, 42px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.hero__display-line { display: block; }
.hero__display-line--accent {
  background: linear-gradient(94deg, var(--gold-hover), var(--gold) 55%, #ff8a3d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__title {
  margin-bottom: 16px;
  font-size: clamp(27px, 3.4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.hero__title-line { display: block; }
.hero__title-line--accent {
  background: linear-gradient(94deg, var(--gold-hover), var(--gold) 55%, #ff8a3d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  max-width: 40ch;
  margin-bottom: 26px;
  color: var(--text-soft);
  font-size: 14.5px;
  line-height: 1.65;
}

/* Daily-bonus card — content sits centred rather than stretched apart */
.bonus-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 26px 24px;
  border-radius: var(--r-2xl);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, var(--bg-surface-2), var(--bg-surface));
  box-shadow: var(--sh-md);
}

.bonus-card__title { margin-bottom: 6px; font-size: 17px; }
.bonus-card__sub {
  margin-bottom: 18px;
  color: var(--text-mute);
  font-size: 13px;
}

.bonus-card__timer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
}
.bonus-card__timer i {
  color: var(--text-dim);
  font-style: normal;
  font-weight: 700;
}
.bonus-card__unit {
  flex: 1;
  padding: 12px 4px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--bg-inset);
  text-align: center;
}
.bonus-card__unit b {
  font-size: 21px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* ---------- Catalogue (single centered column, no sidebar) ---------- */
.catalog {
  padding-top: 30px;
}

/* ---------- Case sections ---------- */
.content { display: grid; gap: 34px; min-width: 0; }

.case-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

/* ---------- Case card (reusable component) ---------- */
/* Sized ~12px larger than the base spec for a more substantial card */
.case-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  padding: 22px 20px 24px;
  border-radius: var(--r-2xl);
  border: 1px solid var(--line);
  background: linear-gradient(170deg, var(--bg-surface-2), var(--bg-surface));
  text-align: center;
  transition: transform var(--t) var(--ease), border-color var(--t) var(--ease),
    box-shadow var(--t) var(--ease);
}

/* Reveal-on-scroll */
.case-card[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out);
}
.case-card[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.case-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: var(--sh-lg);
}

.case-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: var(--r-sm);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.case-card__badge--top {
  background: linear-gradient(180deg, var(--brand-hover), var(--brand));
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 89, 95, 0.4);
}

.case-card__media {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin-bottom: 12px;
}
.case-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Glow lifts the transparent PNGs off the dark card */
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.55));
  transition: transform var(--t-slow) var(--ease-out);
}
.case-card:hover .case-card__media img { transform: scale(1.07) translateY(-3px); }

.case-card__title {
  margin-bottom: 14px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  /* Keep every card the same height regardless of name length */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
}

.case-card__price {
  margin-top: auto;
  padding: 10px 24px;
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, var(--gold-hover), var(--gold));
  color: #241703;
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
    filter var(--t) var(--ease);
}
.case-card__price:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: var(--sh-gold);
}
.case-card__price--free {
  background: linear-gradient(180deg, #34d76b, var(--green));
  color: #04250f;
}
.case-card__price--free:hover { box-shadow: 0 10px 26px rgba(34, 197, 94, 0.3); }

/* ---------- 3-column info row ---------- */
.info-row {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1fr;
  gap: 22px;
  padding-top: 44px;
}

.how,
.live,
.top-players {
  padding: 24px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: var(--bg-surface);
}

/* How it works */
.how {
  position: relative;
  overflow: hidden;
}
.how__title { margin-bottom: 22px; font-size: 20px; }
.how__steps {
  display: grid;
  gap: 20px;
  position: relative;
  z-index: 1;
  max-width: 62%;
}

.how-step { display: flex; gap: 14px; }
.how-step__num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 1px solid rgba(255, 176, 46, 0.3);
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
}
.how-step__title { margin-bottom: 4px; font-size: 14.5px; }
.how-step__text {
  color: var(--text-mute);
  font-size: 12.5px;
  line-height: 1.55;
}

.how__art {
  position: absolute;
  right: -18px;
  bottom: -10px;
  width: 200px;
  height: 200px;
  object-fit: contain;
  opacity: 0.95;
  pointer-events: none;
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.5));
}

/* Live drops */
.live__head { margin-bottom: 16px; }
.live__title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 20px;
}
.live__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(255, 89, 95, 0.16);
  animation: live-pulse 2s var(--ease) infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.86); }
}

.live__list { display: grid; gap: 8px; }

.live-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--bg-surface-2);
  transition: border-color var(--t) var(--ease), transform var(--t) var(--ease);
}
.live-item:hover {
  transform: translateX(2px);
  border-color: var(--line-strong);
}

.live-item__img { width: 44px; height: 44px; object-fit: contain; }

.live-item__info { display: grid; gap: 3px; min-width: 0; }
.live-item__name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.live-item__name--legend { color: var(--brand); }
.live-item__price {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.live-item__user {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.live-item__user img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}
.live-item__user > div { display: grid; }
.live-item__nick { font-size: 11.5px; font-weight: 600; }
.live-item__time { color: var(--text-dim); font-size: 10.5px; }

/* Top players */
.top-list { display: grid; gap: 8px; }

.top-row {
  display: grid;
  grid-template-columns: 26px 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--bg-surface-2);
  transition: border-color var(--t) var(--ease), transform var(--t) var(--ease);
}
.top-row:hover {
  transform: translateX(2px);
  border-color: var(--line-strong);
}

.top-row__rank {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--glass-2);
  color: var(--text-mute);
  font-size: 12px;
  font-weight: 800;
}
/* Podium colours */
.top-row__rank--1 { background: linear-gradient(180deg, #ffd76a, #f5a623); color: #2a1a02; }
.top-row__rank--2 { background: linear-gradient(180deg, #e2e8f0, #a8b3c4); color: #1b2028; }
.top-row__rank--3 { background: linear-gradient(180deg, #e0a273, #b9713c); color: #26140a; }

.top-row__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.top-row__nick {
  font-size: 13.5px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.top-row__win {
  display: grid;
  justify-items: end;
  gap: 1px;
  flex-shrink: 0;
}
.top-row__win i {
  color: var(--text-dim);
  font-size: 10.5px;
  font-style: normal;
}
.top-row__win b {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- Stats ---------- */
.stats { padding-top: 48px; }

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.stat {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 30px 18px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: var(--bg-surface);
  text-align: center;
  transition: border-color var(--t) var(--ease), transform var(--t) var(--ease);
}
.stat:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}

.stat__value {
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.stat__label { color: var(--text-mute); font-size: 13px; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1240px) {
  .case-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  /* 5th card would be orphaned on a 4-col grid */
  .case-grid > li:nth-child(5) { display: none; }
  .info-row { grid-template-columns: 1fr 1fr; }
  .top-players { grid-column: 1 / -1; }
}

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; }
  .bonus-card { flex-direction: row; align-items: center; gap: 20px; flex-wrap: wrap; }
  .bonus-card__title { margin-bottom: 0; }
  .bonus-card__sub { margin-bottom: 0; }
  .bonus-card__timer { margin: 0; flex: 1; min-width: 210px; }
  .bonus-card .btn { width: auto; flex-shrink: 0; }
}

@media (max-width: 900px) {
  .how__steps { max-width: 100%; }
  .how__art { display: none; }

  .stats__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .case-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .case-grid > li:nth-child(5) { display: block; }
  .hero__content { padding: 32px 24px; }
  .hero__banner { min-height: 280px; }
  /* Character art crowds the copy at this width */
  .hero__char { object-position: 78% center; opacity: 0.5; }
  .info-row { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .hero__banner { min-height: 250px; }
  .bonus-card { flex-direction: column; align-items: stretch; }
  .bonus-card .btn { width: 100%; }
}

@media (max-width: 480px) {
  .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stats__grid { grid-template-columns: 1fr; }
  .how, .live, .top-players { padding: 18px; }
  .live-item { grid-template-columns: 40px minmax(0, 1fr); }
  .live-item__user { grid-column: 1 / -1; }
}
