:root {
  --bg-0: #0d0724;
  --bg-1: #170b3a;
  --violet: #9146ff;
  --violet-soft: #bf94ff;
  --gold-1: #fff6c2;
  --gold-2: #ffd34d;
  --gold-3: #ef9f00;
  --text: #f4efff;
  --muted: #b9abd8;
  --line: rgba(191, 148, 255, 0.18);
  --tile: rgba(28, 14, 64, 0.72);
  --display: "Unbounded", "Manrope", system-ui, sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--bg-0); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 16px/1.55 var(--body);
  background:
    radial-gradient(60rem 36rem at 80% -10%, rgba(145, 70, 255, 0.28), transparent 60%),
    radial-gradient(40rem 30rem at -10% 30%, rgba(255, 211, 77, 0.08), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0) 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[hidden] { display: none !important; }

a { color: var(--violet-soft); }

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- звёздное небо ---------- */
.sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

.sky i {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.2;
  animation: twinkle var(--t, 4s) ease-in-out var(--d, 0s) infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.15; }
  50%      { opacity: 0.9; }
}

header, main, footer { position: relative; z-index: 1; }

/* ---------- шапка ---------- */
.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 72px 24px 40px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--violet-soft);
}

h1 {
  margin: 0;
  font: 800 clamp(44px, 8vw, 88px)/1 var(--display);
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, var(--gold-1), var(--gold-2) 55%, var(--gold-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 24px rgba(255, 211, 77, 0.25));
}

.lead { max-width: 34em; margin: 18px 0 28px; font-size: 18px; color: var(--muted); }

.hero__row { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; }

.counter { display: flex; align-items: baseline; gap: 10px; }
.counter b { font: 800 44px/1 var(--display); color: var(--gold-2); }
.counter span { color: var(--muted); font-weight: 600; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 800;
  text-decoration: none;
  color: #fff;
  background: var(--violet);
  box-shadow: 0 4px 0 #5c1fc2, 0 10px 30px rgba(145, 70, 255, 0.35);
  transition: transform 0.12s ease, filter 0.12s ease;
}

.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ---------- большая карточка ---------- */
.hero__card { perspective: 1000px; }

.card {
  position: relative;
  width: 240px;
  aspect-ratio: 5 / 7;
  border-radius: 18px;
  overflow: hidden;
  font-size: 18px;
  background: radial-gradient(120% 85% at 50% 42%, #6a2fd0 0%, #3b1682 42%, #1a0840 100%);
  box-shadow:
    0 0 0 3px var(--gold-2),
    0 0 0 6px rgba(26, 8, 64, 0.95),
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(255, 211, 77, 0.35);
  transform: rotate(-6deg);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: rotate(-6deg) translateY(0); }
  50%      { transform: rotate(-3deg) translateY(-10px); }
}

.card__rays {
  position: absolute;
  inset: -45%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 232, 160, 0.17) 0deg 8deg, transparent 8deg 22deg);
  -webkit-mask-image: radial-gradient(circle, #000 18%, transparent 62%);
  mask-image: radial-gradient(circle, #000 18%, transparent 62%);
  animation: spin 18s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.card__frame { position: absolute; inset: 10px; border: 1px solid rgba(255, 211, 77, 0.45); border-radius: 11px; }

.card__label {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--gold-1);
}

.card__label--top { top: 22px; font-size: 11px; letter-spacing: 0.26em; opacity: 0.85; }
.card__label--bottom { bottom: 30px; font-size: 12px; letter-spacing: 0.08em; }

.card__star {
  position: absolute;
  left: 50%;
  top: 47%;
  width: 64%;
  height: 64%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 16px rgba(255, 211, 77, 0.75));
  animation: pulse 2.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%      { transform: translate(-50%, -50%) scale(1.06); }
}

.card__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.3) 50%, transparent 65%);
  transform: translateX(-130%);
  animation: shine 4s ease-in-out 1s infinite;
}

@keyframes shine {
  0%        { transform: translateX(-130%); }
  40%, 100% { transform: translateX(130%); }
}

/* ---------- шаги ---------- */
main { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 8px 0 64px;
}

.step {
  position: relative;
  padding: 20px 20px 18px 64px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(24, 12, 56, 0.55);
}

.step__n {
  position: absolute;
  left: 18px;
  top: 18px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font: 800 15px/1 var(--display);
  color: #1c0b3d;
  background: linear-gradient(180deg, var(--gold-1), var(--gold-2) 50%, var(--gold-3));
}

.step h3 { margin: 4px 0 4px; font-size: 17px; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- список ---------- */
.winners__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 20px; }

h2 { margin: 0; font: 800 clamp(24px, 3.6vw, 34px)/1.15 var(--display); }

.winners__note { margin: 0; color: var(--muted); font-size: 14px; }

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.tile {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--tile);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.tile:hover { transform: translateY(-2px); border-color: rgba(255, 211, 77, 0.5); }

.tile.is-fresh { animation: arrive 0.9s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; border-color: rgba(255, 211, 77, 0.7); }

@keyframes arrive {
  0%   { opacity: 0; transform: translateY(-16px) scale(0.92); }
  100% { opacity: 1; transform: none; }
}

.tile__body {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 20px 14px 16px;
  color: inherit;
  text-decoration: none;
  text-align: center;
}

.tile__num {
  position: absolute;
  top: 10px;
  left: 12px;
  font: 800 12px/1 var(--display);
  color: var(--gold-2);
}

.tile__new {
  position: absolute;
  top: 8px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
  color: #1c0b3d;
  background: var(--gold-2);
}

.tile__avatar {
  width: 72px;
  height: 72px;
  margin-bottom: 10px;
  border-radius: 50%;
  object-fit: cover;
  background: #2a1260;
  box-shadow: 0 0 0 3px var(--gold-2), 0 0 0 6px rgba(13, 7, 36, 0.9), 0 0 24px rgba(255, 211, 77, 0.3);
}

.tile__avatar--star { padding: 14px; }

.tile__name { max-width: 100%; font-weight: 800; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile__login { max-width: 100%; color: var(--violet-soft); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile__time { margin-top: 6px; color: var(--muted); font-size: 12.5px; }

.empty { padding: 48px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 18px; }
.empty__star { width: 64px; height: 64px; opacity: 0.55; }
.empty p { margin: 10px 0 0; font-size: 17px; }

.foot { max-width: 1080px; margin: 0 auto; padding: 64px 24px 40px; color: var(--muted); font-size: 13.5px; }
.foot p { margin: 0; }

/* ---------- страница «Что мы храним» ---------- */
.doc { max-width: 720px; margin: 0 auto; padding: 56px 24px 24px; }
.doc h1 { font-size: clamp(32px, 6vw, 48px); margin-bottom: 24px; }
.doc h2 { font-size: 20px; margin: 28px 0 8px; }
.doc p, .doc li { color: var(--muted); }
.doc strong { color: var(--text); }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding: 40px 16px 28px; justify-items: center; text-align: center; }
  .hero__row { justify-content: center; }
  .card { width: 190px; }
  .lead { font-size: 16px; }
  main { padding: 0 16px; }
  .steps { grid-template-columns: 1fr; margin-bottom: 44px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .tile__avatar { width: 60px; height: 60px; }
  .foot { padding: 48px 16px 32px; }
  .doc { padding: 40px 16px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .card__rays, .card__star, .card__shine, .sky i, .tile.is-fresh { animation: none; }
}
