:root {
  --bg: #0f1113;
  --bg-elevated: #1a1d21;
  --card: #252a30;
  --card-border: rgba(212, 175, 55, 0.18);
  --text: #f5f0e8;
  --text-muted: #9ca3af;
  --gold: #d4af37;
  --gold-light: #e8c96b;
  --bronze: #cd7f32;
  --silver: #c0c0c0;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --font-display: "Oswald", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background: radial-gradient(circle at 20% 0%, #2a2418 0%, var(--bg) 42%, #0b0c0e 100%);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 300px at 10% 10%, rgba(212, 175, 55, 0.12), transparent 60%),
    radial-gradient(500px 280px at 90% 20%, rgba(205, 127, 50, 0.08), transparent 65%);
  animation: glowShift 12s ease-in-out infinite alternate;
}

@keyframes glowShift {
  from { opacity: 0.75; transform: translateY(0); }
  to { opacity: 1; transform: translateY(12px); }
}

.site-header {
  position: relative;
  padding: 2.5rem 0 1.5rem;
}

.header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.brand-kicker {
  margin: 0 0 0.35rem;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 600;
}

.brand-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.05;
  text-transform: uppercase;
}

.brand-tagline {
  margin: 0.75rem 0 0;
  max-width: 36rem;
  color: var(--text-muted);
}

.lang-switch {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lang-link {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-link:hover,
.lang-link.is-active {
  background: rgba(212, 175, 55, 0.16);
  color: var(--text);
}

.main {
  position: relative;
  padding-bottom: 4rem;
}

.period-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 2rem;
}

.period-tab {
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.period-tab:hover {
  transform: translateY(-1px);
  color: var(--text);
}

.period-tab.is-active {
  border-color: rgba(212, 175, 55, 0.55);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.22), rgba(212, 175, 55, 0.08));
  color: var(--text);
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 2rem;
}

.podium-card {
  position: relative;
  padding: 1.25rem 1rem 1.35rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(37, 42, 48, 0.98), rgba(26, 29, 33, 0.98));
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  text-align: center;
  animation: riseIn 0.7s ease both;
  animation-delay: var(--delay, 0ms);
}

.podium-card--gold {
  border-color: rgba(212, 175, 55, 0.55);
}

.podium-card--silver {
  border-color: rgba(192, 192, 192, 0.35);
}

.podium-card--bronze {
  border-color: rgba(205, 127, 50, 0.45);
}

.podium-medal {
  display: flex;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.podium-medal__disc {
  display: grid;
  place-items: center;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  color: #1a1408;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.35),
    0 8px 18px rgba(0, 0, 0, 0.35);
}

.podium-medal--gold .podium-medal__disc {
  background: linear-gradient(145deg, #f3d56b 0%, #d4af37 45%, #9a7b1f 100%);
}

.podium-medal--silver .podium-medal__disc {
  background: linear-gradient(145deg, #f0f0f0 0%, #c0c0c0 45%, #8a8a8a 100%);
}

.podium-medal--bronze .podium-medal__disc {
  background: linear-gradient(145deg, #e8a86a 0%, #cd7f32 45%, #8f5420 100%);
}

.podium-media {
  display: grid;
  place-items: center;
  min-height: 180px;
  margin-bottom: 0.85rem;
}

.podium-media img {
  width: min(180px, 70%);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
  transition: transform 0.25s ease;
}

.podium-card:hover .podium-media img {
  transform: scale(1.04) translateY(-4px);
}

.podium-name {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.podium-sold {
  margin: 0 0 0.9rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.rank-list {
  display: grid;
  gap: 0.85rem;
}

.rank-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.95rem 1rem;
  border-radius: calc(var(--radius) - 4px);
  background: rgba(37, 42, 48, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.06);
  animation: riseIn 0.55s ease both;
  animation-delay: var(--delay, 0ms);
}

.rank-num {
  width: 2rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--gold);
}

.rank-thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
  display: grid;
  place-items: center;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.rank-body h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  font-weight: 600;
}

.rank-body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.img-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(255, 255, 255, 0.04));
}

.img-placeholder--sm {
  width: 56px;
  height: 56px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.88rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), #b8922c);
  color: #1a1408;
  box-shadow: 0 10px 24px rgba(212, 175, 55, 0.25);
}

.btn-ghost {
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--gold-light);
}

.btn-small {
  padding: 0.5rem 0.85rem;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.28);
  white-space: nowrap;
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  border-radius: var(--radius);
  background: rgba(37, 42, 48, 0.65);
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

.empty-state h2 {
  margin-top: 0;
  font-family: var(--font-display);
  text-transform: uppercase;
}

.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-inner a {
  color: var(--gold-light);
  font-weight: 600;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand-title a {
  color: inherit;
}

.brand-title a:hover {
  color: var(--gold-light);
}

.period-range {
  margin: -0.5rem 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.period-range__label {
  color: var(--gold-light);
  font-weight: 600;
  margin-right: 0.35rem;
}

.card-actions,
.rank-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.rank-actions {
  justify-content: flex-end;
}

.podium-sold {
  display: none;
}

.back-link {
  display: inline-flex;
  margin-bottom: 1rem;
  color: var(--gold-light);
  font-weight: 600;
}

.product-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: center;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: rgba(37, 42, 48, 0.72);
  border: 1px solid var(--card-border);
  margin-bottom: 1.5rem;
}

.product-hero__media img,
.product-hero__media .img-placeholder {
  width: 100%;
  max-width: 280px;
  margin-inline: auto;
}

.product-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  text-transform: uppercase;
  line-height: 1.15;
}

.product-short-desc {
  margin: 0 0 1rem;
  max-width: 42rem;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.65;
}

.product-rank-now {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  color: var(--gold-light);
  font-weight: 600;
}

.product-rank-now--muted {
  color: var(--text-muted);
  font-weight: 500;
}

.chart-panel {
  padding: 1.25rem 1rem 1rem;
  border-radius: var(--radius);
  background: rgba(37, 42, 48, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.chart-panel h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  text-transform: uppercase;
}

.chart-hint {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.chart-wrap {
  overflow-x: auto;
}

.rank-chart {
  width: 100%;
  min-width: 320px;
  height: auto;
}

.rank-chart__grid {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.rank-chart__line {
  stroke: var(--gold);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rank-chart__dot {
  fill: var(--gold-light);
  stroke: #1a1408;
  stroke-width: 1.5;
}

.rank-chart__rank-badge rect {
  fill: rgba(15, 17, 19, 0.96);
  stroke: rgba(212, 175, 55, 0.65);
  stroke-width: 1.25;
}

.rank-chart__rank-badge text {
  fill: var(--gold-light);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-display);
}

.rank-chart__ylabel,
.rank-chart__xlabel {
  fill: var(--text-muted);
  font-size: 11px;
  font-family: var(--font-body);
}

@media (max-width: 900px) {
  .podium {
    grid-template-columns: 1fr;
  }

  .product-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .rank-row {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "rank body"
      "thumb body"
      "actions actions";
  }

  .rank-num { grid-area: rank; }
  .rank-thumb { grid-area: thumb; }
  .rank-body { grid-area: body; }
  .rank-actions {
    grid-area: actions;
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
