/* Страница турнира /cup (NeoPlay Cup). Подключается после site-v2.css. */
:root {
  --cup-grad: linear-gradient(90deg, #ff4fa8 0%, #b07cff 50%, #4fd2ff 100%);
  --cup-panel: rgba(12, 12, 30, .72);
  --cup-edge: rgba(176, 160, 255, .2);
  --cup-lilac: #d6aaff;
  --cup-ok: #5ee0a0;
  --cup-wait: #ffc56b;
}

.cup-grad {
  background: var(--cup-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Первый экран ─────────────────────────────────────────────────────────── */
.cup-hero {
  position: relative;
  padding: 132px 0 64px;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--np-line, rgba(157, 169, 255, .18));
}
.cup-hero::before,
.cup-hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}
/* световые полосы, как на афише: розовая сверху справа, фиолетовая снизу слева */
.cup-hero::before {
  width: 90vw;
  height: 120px;
  top: 18%;
  right: -20vw;
  background: rgba(230, 40, 170, .34);
  transform: rotate(-16deg);
}
.cup-hero::after {
  width: 80vw;
  height: 110px;
  bottom: 4%;
  left: -24vw;
  background: rgba(130, 50, 230, .34);
  transform: rotate(-16deg);
}
.cup-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 48px;
  align-items: center;
}
.cup-back {
  display: block;
  width: fit-content;
  margin-bottom: 26px;
  color: var(--np-muted, #b1b8d4);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.cup-back:hover { color: var(--np-text, #f1f2ff); }
.cup-kicker {
  display: inline-block;
  padding: 7px 14px;
  background: #ae46cf;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.cup-title {
  margin-top: 18px;
  font-family: var(--np-display, 'Unbounded', sans-serif);
  font-size: clamp(2.6rem, 6.4vw, 5.2rem);
  font-weight: 800;
  line-height: .95;
  text-transform: uppercase;
}
.cup-mode {
  margin-top: 14px;
  color: var(--np-muted, #b1b8d4);
  font-family: var(--np-display, 'Unbounded', sans-serif);
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  font-weight: 700;
  text-transform: uppercase;
}
.cup-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
  padding: 0;
  list-style: none;
}
.cup-facts li {
  padding: 9px 14px;
  border: 1px solid var(--cup-edge);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  font-size: 15px;
  font-weight: 800;
}
.cup-fee {
  margin-top: 18px;
  color: var(--np-muted, #b1b8d4);
  font-size: 15px;
}
.cup-fee b { color: var(--np-text, #f1f2ff); }
.cup-fee a { color: var(--cup-lilac); }
.cup-hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 30px;
}
.cup-slots {
  color: var(--np-muted, #b1b8d4);
  font-size: 15px;
  font-weight: 700;
}

.cup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 14px;
  background: linear-gradient(135deg, #d6258a, #8f58ff 55%, #2aa8e2);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 14px 36px rgba(143, 88, 255, .28);
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.cup-btn:hover { transform: translateY(-1px); box-shadow: 0 18px 42px rgba(143, 88, 255, .38); }
.cup-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.cup-btn--wide { width: 100%; }

/* ── Призы ───────────────────────────────────────────────────────────────── */
.cup-prize {
  padding: 34px;
  border: 1px solid var(--cup-edge);
  border-radius: 28px;
  background: var(--cup-panel);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.cup-prize__label {
  color: var(--cup-lilac);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.cup-prize__sum {
  margin-top: 6px;
  font-family: var(--np-display, 'Unbounded', sans-serif);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  white-space: nowrap;
  filter: drop-shadow(0 6px 26px rgba(150, 70, 210, .4));
}
.cup-places {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 24px;
  padding: 0;
  border: 1px solid var(--cup-edge);
  border-radius: 20px;
  background: rgba(255, 255, 255, .04);
  list-style: none;
}
.cup-place {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 18px 8px;
  text-align: center;
}
.cup-place + .cup-place { border-left: 1px solid rgba(255, 255, 255, .1); }
.cup-place span {
  color: var(--cup-lilac);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}
.cup-place b {
  font-family: var(--np-display, 'Unbounded', sans-serif);
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  font-weight: 800;
  white-space: nowrap;
}
.cup-place--first span { color: #fff; }
.cup-place--first b { font-size: clamp(1.3rem, 2.7vw, 1.8rem); }

/* ── Запись ──────────────────────────────────────────────────────────────── */
.cup-reg { padding: 64px 0 80px; }
.cup-reg__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr) minmax(0, .85fr);
  gap: 24px;
  align-items: start;
}
.cup-card {
  padding: 30px;
  border: 1px solid var(--cup-edge);
  border-radius: 24px;
  background: var(--cup-panel);
}
.cup-h2 {
  font-family: var(--np-display, 'Unbounded', sans-serif);
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 800;
  text-transform: uppercase;
}
.cup-h3 {
  margin-top: 12px;
  font-family: var(--np-display, 'Unbounded', sans-serif);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.3;
}
.cup-steps {
  display: grid;
  gap: 14px;
  margin: 20px 0 28px;
  padding: 0;
  list-style: none;
  counter-reset: cup-step;
}
.cup-steps li {
  position: relative;
  display: grid;
  gap: 3px;
  padding-left: 48px;
  counter-increment: cup-step;
}
.cup-steps li::before {
  content: counter(cup-step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(174, 70, 207, .22);
  color: var(--cup-lilac);
  font-family: var(--np-display, 'Unbounded', sans-serif);
  font-weight: 800;
}
.cup-steps b { font-size: 16px; }
.cup-steps span { color: var(--np-muted, #b1b8d4); font-size: 14px; line-height: 1.5; }

.cup-form { display: grid; gap: 16px; }
.cup-form[hidden], .cup-done[hidden] { display: none; }
.cup-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cup-field { display: grid; gap: 8px; }
.cup-field > span { color: var(--np-muted, #b1b8d4); font-size: 14px; font-weight: 700; }
.cup-field small { color: var(--np-faint, #7c86a5); font-size: 13px; }
.cup-field input {
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid var(--np-line-strong, rgba(157, 169, 255, .34));
  border-radius: 12px;
  background: rgba(4, 5, 13, .7);
  font-size: 16px;
  font-weight: 600;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.cup-field input::placeholder { color: var(--np-faint, #7c86a5); }
.cup-field input:focus { border-color: #b07cff; box-shadow: 0 0 0 3px rgba(176, 124, 255, .2); }
.cup-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--np-muted, #b1b8d4);
  font-size: 14px;
  line-height: 1.45;
  cursor: pointer;
}
.cup-check input { width: 20px; height: 20px; margin-top: 1px; flex: none; accent-color: #b07cff; }
.cup-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cup-msg { min-height: 1.4em; color: var(--np-muted, #b1b8d4); font-size: 14px; }
.cup-msg.is-error { color: #ff8fb1; }

.cup-done { display: grid; gap: 14px; }
.cup-done p { color: var(--np-muted, #b1b8d4); font-size: 15px; line-height: 1.55; }
.cup-done p b { color: var(--np-text, #f1f2ff); }
.cup-book {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid var(--cup-edge);
  border-radius: 16px;
  background: rgba(255, 255, 255, .04);
  list-style: none;
}
.cup-book li { position: relative; padding-left: 22px; font-size: 15px; }
.cup-book li::before { content: '→'; position: absolute; left: 0; color: var(--cup-lilac); }
.cup-link {
  justify-self: center;
  color: var(--np-muted, #b1b8d4);
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cup-badge {
  justify-self: start;
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.cup-badge--wait { background: rgba(255, 197, 107, .14); color: var(--cup-wait); }
.cup-badge--ok { background: rgba(94, 224, 160, .14); color: var(--cup-ok); }

/* ── Список команд ───────────────────────────────────────────────────────── */
.cup-teams__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cup-teams__count {
  font-family: var(--np-display, 'Unbounded', sans-serif);
  font-size: 1.3rem;
  font-weight: 800;
}
.cup-teams__list {
  display: grid;
  gap: 8px;
  margin: 20px 0;
  padding: 0;
  list-style: none;
  counter-reset: cup-slot;
}
.cup-slot {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  align-items: center;
  min-height: 52px;
  padding: 10px 14px 10px 44px;
  border: 1px dashed rgba(176, 160, 255, .2);
  border-radius: 14px;
  counter-increment: cup-slot;
}
.cup-slot::before {
  content: counter(cup-slot);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--np-faint, #7c86a5);
  font-family: var(--np-display, 'Unbounded', sans-serif);
  font-size: 13px;
  font-weight: 800;
}
.cup-slot b { color: var(--np-faint, #7c86a5); font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.cup-slot span { grid-column: 1; color: var(--np-muted, #b1b8d4); font-size: 13px; overflow-wrap: anywhere; }
.cup-slot .cup-badge { grid-column: 2; grid-row: 1 / span 2; }
.cup-slot.is-taken { border-style: solid; background: rgba(255, 255, 255, .04); }
.cup-slot.is-taken b { color: var(--np-text, #f1f2ff); }
.cup-note { color: var(--np-faint, #7c86a5); font-size: 14px; line-height: 1.5; }
.cup-note a { color: var(--cup-lilac); }
.cup-reg__grid > .cup-card { align-self: stretch; }
.cup-teams { align-self: stretch; display: flex; flex-direction: column; }
.cup-teams .cup-teams__list { flex: 1; grid-auto-rows: 1fr; }   /* слоты растягиваются на всю высоту карточки */
.cup-teams .cup-slot { align-content: center; }
@media (max-width: 900px) { .cup-teams .cup-teams__list { grid-auto-rows: auto; } }
.cup-teams__list:last-child { margin-bottom: 0; }
.cup-note--below { margin-top: 20px; text-align: center; }
.cup-timeline { margin-bottom: 0; }
.cup-teams__sub { margin-top: 8px; color: var(--np-muted, #b1b8d4); font-size: 14px; line-height: 1.45; }
.cup-teams--reserve .cup-slot { border-color: rgba(255, 197, 107, .18); }
.cup-teams--reserve .cup-slot.is-taken { border-color: rgba(255, 197, 107, .3); }
.cup-field input { width: 100%; min-width: 0; box-sizing: border-box; }
.cup-teams .cup-h2 { font-size: clamp(1.1rem, 1.7vw, 1.3rem); }
.cup-teams__count { white-space: nowrap; font-size: 1.1rem; }
.cup-teams .cup-slot { padding-right: 10px; }
.cup-teams .cup-slot .cup-badge { padding: 4px 8px; font-size: 10px; letter-spacing: .02em; }

/* ── Расписание дня ──────────────────────────────────────────────────────── */
.cup-plan { padding: 64px 0 0; }
.cup-timeline { display: grid; gap: 4px; margin: 22px 0 20px; padding: 0; list-style: none; }
.cup-timeline li {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 4px 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--cup-edge);
}
.cup-timeline li:last-child { border-bottom: 0; }
.cup-timeline time {
  grid-row: 1 / span 2;
  color: var(--cup-lilac);
  font-family: var(--np-display, 'Unbounded', sans-serif);
  font-size: 15px;
  font-weight: 800;
}
.cup-timeline b { color: var(--np-text, #f1f2ff); font-size: 16px; }
.cup-timeline span { color: var(--np-muted, #b1b8d4); font-size: 14px; line-height: 1.5; }

@media (max-width: 1180px) {
  .cup-reg__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cup-reg__grid > .cup-card:first-child { grid-column: 1 / -1; }
}

/* ── Мобильные ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .cup-hero { padding: 104px 0 48px; }
  .cup-hero__grid, .cup-reg__grid { grid-template-columns: 1fr; gap: 28px; }
  .cup-prize { padding: 24px 20px; }
  .cup-reg { padding: 40px 0 56px; }
  .cup-plan { padding-top: 40px; }
}
@media (max-width: 560px) {
  .cup-card { padding: 22px 18px; border-radius: 20px; }
  .cup-pair { grid-template-columns: 1fr; }
  .cup-place { padding: 14px 4px; }
  .cup-place span { font-size: 11px; }
  .cup-facts li { font-size: 14px; padding: 8px 12px; }
  .cup-timeline li { grid-template-columns: 1fr; }
  .cup-timeline time { grid-row: auto; }
}

/* ── /staff: заявки на турнир (страница админа подключает этот файл после hub.css) ── */
.staff__head--cup { margin-top: 56px; }
.staff-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto;
  gap: 12px 16px;
  align-items: center;
  margin: 0 0 24px;
  padding: 16px 18px;
  border: 1px solid var(--np-line-strong, rgba(157, 169, 255, .34));
  border-radius: 16px;
  background: rgba(255, 255, 255, .03);
}
.staff-link[hidden] { display: none; }
.staff-link__text b { display: block; font-size: 15px; }
.staff-link__text span { display: block; margin-top: 4px; color: var(--np-muted, #b1b8d4); font-size: 13px; line-height: 1.4; }
.staff-link__url {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--np-line-strong, rgba(157, 169, 255, .34));
  border-radius: 10px;
  background: rgba(4, 5, 13, .7);
  color: var(--np-text, #f1f2ff);
  font: 13px/1 ui-monospace, monospace;
}
@media (max-width: 760px) { .staff-link { grid-template-columns: 1fr; } }
.staff-row--cup { grid-template-columns: 70px minmax(0, 1.2fr) minmax(0, 1fr) auto; }
.staff-row--cup.is-ok { border-color: rgba(94, 224, 160, .35); }
.staff-row__btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.staff-row__team b { display: block; font: 800 18px/1.2 var(--np-display, 'Unbounded', sans-serif); overflow-wrap: anywhere; }
.staff-row__team span { display: block; margin-top: 4px; color: var(--np-muted, #b1b8d4); font-size: 14px; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .staff-row--cup { grid-template-columns: 1fr; }
  .staff-row__btns { justify-content: stretch; }
  .staff-row__btns .np-btn { flex: 1; }
}
