/* Legendary Lots — Loot Drop styles */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body {
  background: #080706;
  color: #ece6d6;
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* Root + global lang overrides */
.ll-root {
  min-height: 100vh;
  /* Warm obsidian ground with a thin amber wash at the very top edge —
     replaces the old purple radial. Same palette as the design worktree. */
  background:
    linear-gradient(180deg, rgba(214,149,63,.06) 0%, transparent 18%),
    linear-gradient(180deg, #14110d 0%, #0c0a08 50%, #080706 100%);
  padding-bottom: 80px;
  overflow-x: hidden;
}

/* Display headings.
   Cinzel is Latin-only — it has no Cyrillic glyphs and silently falls back
   to a generic serif on UA text, which reads poorly. Unbounded covers both
   Latin and Cyrillic, so we use it as the display font everywhere on this
   UA-only build. */
.ll-head { font-family: 'Unbounded', system-ui, sans-serif; font-weight: 700; letter-spacing: 0; }
.ll-mono { font-family: 'IBM Plex Mono', monospace; letter-spacing: .04em; font-weight: 500; }

/* Helpers */
.ll-muted     { opacity: .55; }
.ll-eyebrow   { font-size: 14px; opacity: .55; text-transform: uppercase; }
.ll-eyebrow-xs { font-size: 14px; opacity: .5; text-transform: uppercase; }
.ll-shimmer   { background-size: 200% 100%; animation: llshim 6s linear infinite; }
@keyframes llshim { 0% { background-position: 0% 0%; } 100% { background-position: -200% 0%; } }
.ll-pulse     { animation: llpulse 1.6s ease-in-out infinite; }
@keyframes llpulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

/* ─── Nav ─── */
.ll-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 56px; border-bottom: 1px solid rgba(255,255,255,.06);
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 17, 13, .72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.ll-nav-brand { display: flex; align-items: center; gap: 12px; }
.ll-nav-logo  { width: 32px; height: 32px; display: block; object-fit: contain; }
.ll-nav-wordmark {
  font-family: 'Unbounded', sans-serif; font-size: 16px; font-weight: 800;
  letter-spacing: .12em;
}
.ll-nav-links {
  display: flex; gap: 32px;
  font-family: 'IBM Plex Mono', monospace; font-size: 14px; opacity: .75;
  text-transform: uppercase; letter-spacing: .08em;
}
.ll-nav-links a { transition: color .15s; }
.ll-nav-links a:hover { color: #d6953f; }
.ll-nav-right { display: flex; align-items: center; gap: 12px; }
.ll-lang-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'IBM Plex Mono', monospace; font-size: 14px;
  color: #ece6d6; background: transparent;
  border: 1px solid rgba(255,255,255,.15); border-radius: 4px;
  padding: 8px 12px; cursor: pointer; letter-spacing: .06em;
  transition: border-color .15s, color .15s;
}
.ll-lang-toggle:hover { border-color: #d6953f; color: #d6953f; }

/* ─── Buttons ─── */
.ll-btn {
  display: inline-flex; align-items: center;
  padding: 10px 18px; border-radius: 4px;
  font-size: 14px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  transition: transform .15s, box-shadow .15s;
}
.ll-btn:hover { transform: translateY(-1px); }
.ll-btn-primary {
  background: #d6953f; color: #14110d;
  box-shadow: 0 0 24px rgba(214,149,63,.35);
}
.ll-btn-primary:hover { background: #e3a657; }
/* Bid button — full-width block at the bottom of the countdown panel,
   matching the design worktree (solid bronze, dark text, bronze hover). */
.ll-btn-bid {
  display: flex; align-items: center; justify-content: center;
  background: #d6953f; color: #14110d;
  padding: 14px 24px; border-radius: 3px;
  font-size: 14px; letter-spacing: .1em;
  margin-top: 20px;
}
.ll-btn-bid:hover { background: #e3a657; }

/* ─── Hero ─── */
.ll-hero { padding: 56px 56px 40px; }
.ll-hero-grid {
  display: grid;
  /* Left column capped so the featured card doesn't dominate on wide
     screens. 5/4 image at 380px = 475px tall — sits balanced next to the
     countdown + stats stack on the right. */
  grid-template-columns: minmax(280px, 900px) minmax(0, 1fr);
  gap: 56px; align-items: start;
}
.ll-hero-grid > .ll-card { max-width: 900px; justify-self: start; width: 100%; }
.ll-live-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'IBM Plex Mono', monospace; font-size: 11px;
  padding: 5px 10px; border-radius: 2px;
  color: #86efac; background: rgba(34,197,94,.12);
  border: 1px solid rgba(34,197,94,.4);
  text-transform: uppercase; letter-spacing: .06em;
}
.ll-h1 {
  /* Slim header bar — sits at the top of the left column, aligned with the
     top of the featured card on the right. display: inline-block so the
     gradient background (clipped to text via background-clip:text) only
     fills the actual text width, not the whole column. */
  display: inline-block;
  margin: 0 0 12px; font-size: 36px; line-height: 1.1;
  font-weight: 600; letter-spacing: -.01em;
}
/* Featured lot title — top of the right column, above the countdown.
   Static cream, no rarity coloring or glow. text-wrap: balance keeps
   long names from leaving a one-word last line. The --mobile copy is
   rendered as a direct child of .ll-hero-grid and only shown ≤800px. */
.ll-hero-title {
  margin: 0 0 24px;
  font-size: 32px; line-height: 1.15;
  font-weight: 700; letter-spacing: -.005em;
  color: #f6efde;
  text-wrap: balance;
}
.ll-hero-title--mobile { display: none; }
.ll-hero-sub {
  font-size: 17px; line-height: 1.55; opacity: .75;
  max-width: 520px; margin-bottom: 28px;
}
/* Countdown panel — structure + visuals copied from the design worktree.
   Subtle frame, labels row over time/price row, thin solid-bronze progress
   bar, block bid button. Time + price both render in cream Plex Mono. */
.ll-countdown {
  padding: 24px 26px; border-radius: 6px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.06);
}
.ll-countdown-labels {
  display: flex; justify-content: space-between; align-items: baseline;
}
.ll-countdown-row {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-top: 6px;
}
.ll-countdown-time {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 48px; font-weight: 500; line-height: 1;
  color: #f6efde; letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
.ll-progress {
  height: 2px; background: rgba(255,255,255,.06);
  border-radius: 1px; margin-top: 18px; overflow: hidden;
}
.ll-progress-bar { height: 100%; transition: width .8s linear; }

/* ─── Stats grid (now embedded in the hero left column) ─── */
.ll-stats {
  margin-top: 20px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.ll-stat {
  padding: 16px 18px; border-radius: 8px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  /* Value + label sit side-by-side; wrap to stacked when the card is too
     narrow (small screens, narrow stat columns). */
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px;
  position: relative;
}
/* Numbers use the same Plex Mono as the countdown clock — Unbounded
   (the display font) is too wide for tightly packed numeric values. */
.ll-stat-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 26px; font-weight: 600; color: #f6efde;
  line-height: 1.1; font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.ll-countdown-price {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 40px; font-weight: 800; line-height: 1;
  color: #f6efde;
  font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
.ll-stat-label {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 14px; font-weight: 500; line-height: 1.3;
  color: #fff; opacity: .85;
  text-transform: none; letter-spacing: 0;
  margin: 0;
}

/* Custom tooltip for stat cards (replaces native title attr) */
.ll-stat[data-tooltip] { cursor: help; }
.ll-stat[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  width: max-content; max-width: 280px;
  padding: 10px 12px; border-radius: 6px;
  background: #1a1610;
  border: 1px solid rgba(214,149,63,.35);
  color: #ece6d6;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 14px; line-height: 1.45;
  text-transform: none; letter-spacing: 0;
  white-space: normal; text-align: left;
  opacity: 0; pointer-events: none;
  transition: opacity .15s;
  z-index: 100;
  box-shadow: 0 6px 24px rgba(0,0,0,.4);
}
.ll-stat[data-tooltip]:hover::after { opacity: 1; }

/* ─── Generic section ─── */
.ll-section { padding: 64px 56px 24px; }
.ll-section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 24px;
}
.ll-h2 { font-size: 36px; font-weight: 700; margin: 6px 0 0; color: #f6efde; letter-spacing: -.005em; }
.ll-link { font-size: 14px; text-transform: uppercase; }

/* ─── Rarity ─── */
.ll-rarity-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 16px;
}
/* When embedded in the hero right column the rarity grid is 2×2 below
   the stats grid so the column stacks compactly next to the photo. */
.ll-hero-rarity { margin-top: 24px; }
.ll-hero-rarity .ll-rarity-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 8px; }
.ll-rarity-card {
  padding: 20px 18px; border-radius: 6px;
  background: rgba(255,255,255,.03);
  border: 1px solid; position: relative; overflow: hidden;
}
.ll-rarity-bar { position: absolute; top: 0; left: 0; right: 0; height: 2px; }
.ll-rarity-tier { font-size: 14px; opacity: .45; text-transform: uppercase; }
.ll-rarity-name { font-size: 22px; margin-top: 4px; font-weight: 700; }
.ll-rarity-rate { font-size: 14px; opacity: .45; margin-top: 6px; }

/* ─── Lots grid ─── */
.ll-lots-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}

/* ─── Loot card ─── */
.ll-card {
  padding: 20px; border-radius: 8px;
  border: 1px solid; position: relative; overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.ll-card:hover { transform: translateY(-3px); }
.ll-card-compact { padding: 14px; }
.ll-card-glow {
  position: absolute; inset: 0; pointer-events: none;
}
.ll-card-inner { position: relative; }
.ll-card-tags {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
/* Hero card overlays — wrap LotImage in .ll-hero-photo-frame so the
   absolutely-positioned badges sit on top of the image, not the card
   padding. .ll-photo-badge is the top-left rarity chip; .ll-photo-pill
   layers absolute-positioning on top of .ll-live-pill's green palette. */
.ll-hero-photo-frame { position: relative; }
.ll-photo-badge {
  position: absolute; top: 12px; left: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'IBM Plex Mono', monospace; font-size: 11px;
  padding: 5px 10px; border-radius: 2px;
  background: rgba(20,17,13,.78);
  border: 1px solid;
  text-transform: uppercase; letter-spacing: .12em;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.ll-photo-pill {
  position: absolute; top: 12px; right: 12px;
  background: rgba(8, 25, 12, .65);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.ll-rarity-tag {
  font-size: 14px; padding: 3px 7px; border-radius: 2px;
  text-transform: uppercase; letter-spacing: .1em;
  border: 1px solid;
}
.ll-card-name {
  font-size: 18px; font-weight: 700; margin-top: 12px;
  line-height: 1.25; color: #f6efde;
}
.ll-card-compact .ll-card-name { font-size: 14px; height: 36px; overflow: hidden; }
.ll-card-note { font-size: 16px; line-height: 1.55; opacity: .75; margin: 12px 0 0; }
.ll-card-foot {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed rgba(255,255,255,.12);
}
.ll-card-foot-right { text-align: right; }
.ll-card-price {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 20px; font-weight: 600;
  font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
.ll-card-compact .ll-card-price { font-size: 15px; }
.ll-card-winner { font-size: 14px; color: rgba(236,230,214,.7); margin-top: 2px; }
.ll-card-compact .ll-card-winner { font-size: 14px; }

/* ─── How ─── */
.ll-how-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  margin-top: 28px;
}
.ll-how-card {
  padding: 22px; border-radius: 6px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
}
.ll-how-num { font-size: 48px; font-weight: 900; line-height: 1; }
.ll-how-title { font-size: 18px; font-weight: 700; margin-top: 12px; }
.ll-how-body { font-size: 14px; line-height: 1.55; opacity: .65; margin-top: 8px; }

/* ─── Reviews — 4-up screenshot gallery + CTA below ─── */
.ll-reviews-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  margin-top: 28px;
}
.ll-review-card {
  display: block; position: relative;
  border-radius: 8px; overflow: hidden;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.08);
  transition: transform .2s, border-color .2s;
  cursor: pointer;
}
.ll-review-card:hover {
  transform: translateY(-3px);
  border-color: rgba(214,149,63,.4);
}
/* Uniform 4:5 frame around each screenshot. The image is absolutely
   positioned inside and translated via JS (see ReviewCard in app.jsx),
   so users can grab-and-drag to pan through the rest of the screenshot
   without leaving the page. */
/* The frame is a real scroll container so touch users get native pan +
   overscroll chaining to the page at the boundary. Scrollbars are hidden
   so it still looks like a clean photo crop. Mouse users get drag-to-pan
   via JS writing scrollLeft/scrollTop (see useDragPan in app.jsx). */
.ll-review-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: auto;
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* IE/old Edge */
  cursor: grab;
  background: rgba(0,0,0,.18);
}
.ll-review-frame::-webkit-scrollbar { display: none; }  /* Chrome/Safari */
.ll-review-frame:active { cursor: grabbing; }
.ll-review-frame img,
.ll-card-photo-frame img {
  -webkit-user-drag: none;
}
/* Hall of Fame lot photo — square crop with same drag-to-pan mechanic as
   the review cards. The 1:1 frame shows more of the photo than the old
   4:3 landscape crop; drag axis is auto-detected per image's natural
   ratio (portrait → vertical drag, landscape → horizontal). */
.ll-card-photo-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  background: rgba(0,0,0,.18);
}
.ll-card-photo-frame::-webkit-scrollbar { display: none; }
.ll-card-photo-frame:active { cursor: grabbing; }
/* Hover-revealed "open on Telegram" caption pinned to the bottom of
   each card — uses a backdrop gradient so it's legible on any screenshot. */
.ll-review-open {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 18px 16px 14px;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: #f6efde;
  background: linear-gradient(180deg, transparent 0%, rgba(8,7,6,.85) 60%);
  opacity: 0; transition: opacity .2s;
  display: flex; align-items: center; justify-content: center;
}
.ll-review-card:hover .ll-review-open { opacity: 1; }
/* Footer row under the grid: blurb on the left, CTA button on the right. */
.ll-reviews-foot {
  margin-top: 28px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; flex-wrap: wrap;
}
.ll-reviews-blurb {
  font-size: 16px; line-height: 1.6;
  color: rgba(255,255,255,.78);
  max-width: 820px; margin: 0;
}

/* ─── CTA ─── */
.ll-cta {
  padding: 56px 48px; border-radius: 12px; text-align: center;
  border: 1px solid; position: relative; overflow: hidden;
}
.ll-cta-eyebrow {
  font-size: 14px; opacity: .6; letter-spacing: .3em;
  text-transform: uppercase;
}
.ll-cta-h { font-size: 56px; font-weight: 800; margin: 12px 0 6px; color: #f6efde; letter-spacing: -.005em; }
.ll-cta-sub { opacity: .7; max-width: 520px; margin: 0 auto 28px; }
.ll-cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.ll-btn-cta-primary {
  color: #14110d; padding: 14px 28px;
  font-size: 14px; letter-spacing: .08em;
  justify-content: center;
}
.ll-btn-cta-secondary {
  color: #ece6d6; background: transparent;
  padding: 14px 28px; font-size: 14px; letter-spacing: .08em;
  border: 1px solid rgba(255,255,255,.2);
}

/* ─── Footer ─── */
.ll-footer {
  margin-top: 64px; padding: 32px 56px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.ll-footer-row {
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; text-align: center;
}
.ll-footer-tag { font-size: 14px; opacity: .65; margin-top: 6px; max-width: 420px; }
.ll-footer-meta {
  font-family: 'IBM Plex Mono', monospace; font-size: 14px;
  display: flex; flex-direction: column; gap: 4px; text-align: center;
}
.ll-footer-meta a { color: #d6953f; }
.ll-footer-meta a:hover { color: #e3a657; }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .ll-nav { padding: 16px 32px; }
  .ll-nav-links { display: none; }
  .ll-hero { padding: 40px 32px 32px; }
  .ll-hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .ll-h1 { font-size: 48px; }
  .ll-stats { grid-template-columns: repeat(2, 1fr); }
  .ll-section { padding: 48px 32px 16px; }
  .ll-rarity-grid { grid-template-columns: repeat(2, 1fr); }
  .ll-lots-grid { grid-template-columns: repeat(2, 1fr); }
  .ll-how-grid { grid-template-columns: repeat(2, 1fr); }
  .ll-reviews-grid { grid-template-columns: repeat(2, 1fr); }
  .ll-cta-h { font-size: 40px; }
}
/* Phone — anything under 800px. Everything collapses to a single column;
   long stat labels and the hero title were the worst overflow offenders. */
@media (max-width: 800px) {
  .ll-nav { padding: 14px 20px; gap: 8px; }
  .ll-nav-wordmark { display: none; }
  .ll-nav-right .ll-btn-primary { padding: 8px 12px; font-size: 14px; }
  .ll-hero { padding: 32px 20px 24px; }
  .ll-h1 { font-size: 36px; }
  .ll-hero-title { font-size: 24px; }
  .ll-countdown { padding: 18px 20px; }
  .ll-countdown-time { font-size: 36px; }
  .ll-countdown-price { font-size: 28px; }
  /* Stats: 1-column so long labels like "У СЕКРЕТНОМУ ЧАТІ КОЛЕКЦІОНЕРІВ"
     don't force the cell wider than the viewport. */
  .ll-stats { grid-template-columns: 1fr; gap: 10px; }
  .ll-stat { padding: 12px 14px; }
  .ll-stat-value { font-size: 22px; }
  .ll-section { padding: 40px 20px 12px; }
  .ll-h2 { font-size: 26px; }
  .ll-rarity-grid, .ll-lots-grid, .ll-how-grid, .ll-reviews-grid { grid-template-columns: 1fr; }
  /* Hero rarity has its own selector override (.ll-hero-rarity .ll-rarity-grid)
     with higher specificity than the rule above, so re-state it here. */
  .ll-hero-rarity .ll-rarity-grid { grid-template-columns: 1fr; }
  .ll-cta { padding: 40px 24px; }
  .ll-cta-h { font-size: 32px; }
  .ll-footer { padding: 24px 20px; }

  /* Hero title swaps from the desktop slot (right column, above countdown)
     to the mobile slot (above the photo). */
  .ll-hero-title--mobile  { display: block; margin: 0 0 12px; }
  .ll-hero-title--desktop { display: none; }

  /* Photo overlays — smaller font and pulled closer to the edge so they
     don't dominate a phone-sized photo. */
  .ll-photo-badge { top: 6px; left: 6px; font-size: 9px; padding: 3px 7px; }
  .ll-photo-pill  { top: 6px; right: 6px; }
  .ll-photo-pill.ll-live-pill { font-size: 9px; padding: 3px 7px; }

  /* Reviews footer (blurb + CTA button): stack and center on phones, so
     when the button wraps below the blurb both are aligned mid-page. */
  .ll-reviews-foot  { flex-direction: column; text-align: center; }
  .ll-reviews-blurb { text-align: center; }
}

/* Narrower phones (≤450px): the 4 stat bars are 1-col stacks, so center
   the value+label so the column reads as a tidy vertical centerline. */
@media (max-width: 450px) {
  .ll-stat { justify-content: center; text-align: center; }
}

/* Very narrow phones (≤400px): "@LegendaryLots" hero text at 32px is
   wider than the viewport. Shrink the CTA section to keep it inside. */
@media (max-width: 400px) {
  .ll-cta   { padding: 36px 16px; }
  .ll-cta-h { font-size: 24px; }
}
