/* Tournaments list + detail redesign — tokens from :root */
.tnx {
  --tnx-text: rgba(255, 255, 255, 0.92);
  --tnx-muted: rgba(255, 255, 255, 0.55);
  --tnx-faint: rgba(255, 255, 255, 0.32);
  max-width: var(--site-content-max, 1500px);
  margin: 0 auto;
  padding: 12px var(--site-gutter, 50px) 48px;
  color: var(--tnx-text);
  box-sizing: border-box;
}
.tnx *,
.tnx *::before,
.tnx *::after { box-sizing: border-box; }

@keyframes tnx-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.tnx-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--global-border-radius, 20px);
  padding: 26px 26px 22px;
  margin-bottom: 16px;
  background:
    radial-gradient(110% 90% at 0% 0%, color-mix(in srgb, var(--global-brand) 26%, transparent), transparent 55%),
    radial-gradient(80% 70% at 100% 10%, color-mix(in srgb, var(--global-lime) 10%, transparent), transparent 50%),
    linear-gradient(160deg, var(--bg-secondary) 0%, var(--bg-classic) 100%);
  border: 1px solid var(--base-alfa-neutral);
  animation: tnx-rise 0.4s ease both;
}

.tnx-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--tnx-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.tnx-hero__back:hover { color: #fff; }

.tnx-hero__title {
  margin: 0 0 8px;
  font-family: inherit;
  font-weight: 800;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #fff;
}
.tnx-hero__title span { color: var(--global-brand); }

.tnx-hero__sub {
  margin: 0 0 18px;
  max-width: 48ch;
  font-size: 14px;
  line-height: 1.45;
  color: var(--tnx-muted);
}

.tnx-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tnx-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--under-seconadary);
  border: 1px solid var(--base-alfa-neutral);
  font-size: 12px;
  font-weight: 700;
  color: var(--tnx-muted);
}
.tnx-chip strong { color: #fff; font-weight: 800; }
.tnx-chip--live {
  background: color-mix(in srgb, var(--global-brand) 16%, transparent);
  border-color: color-mix(in srgb, var(--global-brand) 35%, transparent);
  color: var(--global-lime);
}

/* Filters */
.tnx .tournier-filters,
.tnx-filters {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 18px;
  border-radius: var(--mini-border-radius, 10px);
  background: var(--under-seconadary);
  border: 1px solid var(--base-alfa-neutral);
  animation: tnx-rise 0.4s ease 0.04s both;
}

.tnx .t-filter-btn {
  border: none;
  cursor: pointer;
  padding: 10px 16px;
  border-radius: 8px;
  background: transparent;
  color: var(--tnx-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.15s ease, color 0.15s ease;
}
.tnx .t-filter-btn:hover { color: #fff; }
.tnx .t-filter-btn.active {
  background: var(--global-brand);
  color: #04140a;
}

/* Cards grid */
.tnx .tournament-list-grid,
.tnx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  animation: tnx-rise 0.4s ease 0.08s both;
}

.tnx .t-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  border-radius: var(--global-border-radius, 20px);
  background: var(--bg-secondary);
  border: 1px solid var(--base-alfa-neutral);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.tnx .t-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--global-brand) 40%, transparent);
  background: color-mix(in srgb, var(--global-brand) 5%, var(--bg-secondary));
}
.tnx .t-card--finished { opacity: 0.78; }

.tnx .t-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tnx .t-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tnx .t-badge--active,
.tnx .t-badge.t-badge--active {
  background: var(--global-brand);
  color: #04140a;
}
.tnx .t-badge--finished {
  background: var(--under-seconadary);
  color: var(--tnx-faint);
}

.tnx .t-card-main { min-width: 0; }
.tnx .t-card-title {
  margin: 0 0 8px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.2;
}
.tnx .t-card-prize {
  font-family: inherit;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--global-lime);
  line-height: 1;
}
.tnx .t-card-prize-label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tnx-faint);
}

.tnx .t-card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 4px;
  border-top: 1px solid var(--base-alfa-neutral);
  padding-top: 14px;
}

.tnx .t-timer-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--tnx-faint);
  margin-bottom: 4px;
}
.tnx .t-timer-value {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.tnx .t-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: var(--mini-border-radius, 10px);
  background: var(--global-brand);
  color: #04140a !important;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none !important;
  transition: background 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}
.tnx .t-card-btn:hover {
  background: var(--global-lime);
  transform: translateY(-1px);
  color: #04140a !important;
}

.tnx .tournament-empty,
.tnx-empty {
  margin-top: 8px;
  padding: 48px 24px;
  border-radius: var(--global-border-radius, 20px);
  background: var(--bg-secondary);
  border: 1px solid var(--base-alfa-neutral);
  text-align: center;
  animation: tnx-rise 0.4s ease 0.08s both;
}
.tnx-empty__ico {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--global-brand) 14%, transparent);
  color: var(--global-lime);
  font-size: 22px;
}
.tnx .tournament-empty p,
.tnx-empty p {
  margin: 0;
  font-size: 15px;
  color: var(--tnx-muted);
  font-weight: 600;
}

/* —— Detail page —— */
.tnx-detail-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--global-border-radius, 20px);
  padding: 26px;
  margin-bottom: 16px;
  background:
    radial-gradient(100% 80% at 100% 0%, color-mix(in srgb, var(--global-brand) 22%, transparent), transparent 55%),
    linear-gradient(160deg, var(--bg-secondary) 0%, var(--bg-classic) 100%);
  border: 1px solid var(--base-alfa-neutral);
  animation: tnx-rise 0.4s ease both;
}

.tnx-detail-hero__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.tnx-detail-hero__title {
  margin: 0 0 8px;
  font-family: inherit;
  font-weight: 800;
  font-size: clamp(26px, 3.6vw, 38px);
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.tnx-detail-hero__game {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--tnx-muted);
}
.tnx-detail-hero__game strong { color: #fff; }

.tnx-prize-hero {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 18px;
}
.tnx-prize-hero__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tnx-faint);
}
.tnx-prize-hero__value {
  font-family: inherit;
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--global-lime);
  line-height: 1;
}

.tnx-detail-hero__desc {
  margin: 0 0 18px;
  max-width: 60ch;
  font-size: 14px;
  line-height: 1.5;
  color: var(--tnx-muted);
}

.tnx-detail-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border: none;
  border-radius: var(--mini-border-radius, 10px);
  background: var(--global-brand);
  color: #04140a;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}
.tnx-detail-hero__cta:hover {
  background: var(--global-lime);
  transform: translateY(-1px);
  color: #04140a;
}

.tnx-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
  animation: tnx-rise 0.4s ease 0.05s both;
}
.tnx-stat {
  padding: 14px;
  border-radius: var(--mini-border-radius, 10px);
  background: var(--bg-secondary);
  border: 1px solid var(--base-alfa-neutral);
}
.tnx-stat__label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tnx-faint);
}
.tnx-stat__value {
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.tnx-board {
  border-radius: var(--global-border-radius, 20px);
  background: var(--bg-secondary);
  border: 1px solid var(--base-alfa-neutral);
  overflow: hidden;
  animation: tnx-rise 0.4s ease 0.08s both;
}
.tnx-board__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--base-alfa-neutral);
}
.tnx-board__title {
  margin: 0;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
}

.tnx-board__table {
  width: 100%;
  border-collapse: collapse;
}
.tnx-board__table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tnx-faint);
  background: var(--under-seconadary);
}
.tnx-board__table td {
  padding: 12px 16px;
  border-top: 1px solid var(--base-alfa-neutral);
  font-size: 14px;
  vertical-align: middle;
}
.tnx-board__table tr.top-3 td {
  background: color-mix(in srgb, var(--global-brand) 5%, transparent);
}

.tnx-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--under-seconadary);
  font-family: inherit;
  font-weight: 800;
  font-size: 13px;
}
.tnx-rank--1 { background: var(--global-brand); color: #04140a; }
.tnx-rank--2 { background: color-mix(in srgb, var(--global-lime) 35%, #333); color: #04140a; }
.tnx-rank--3 { background: color-mix(in srgb, var(--global-brand) 40%, #444); color: #fff; }

.tnx-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tnx-user__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: var(--under-seconadary);
  flex-shrink: 0;
}
.tnx-user__name { font-weight: 700; color: #fff; }
.tnx-score { font-variant-numeric: tabular-nums; color: var(--tnx-muted); font-weight: 600; }
.tnx-prize-cell { font-weight: 800; color: var(--global-lime); }
.tnx-prize-none { color: var(--tnx-faint); }

/* Finished / not found */
.tnx-finished {
  max-width: 560px;
  margin: 24px auto;
  padding: 32px 24px;
  border-radius: var(--global-border-radius, 20px);
  background:
    radial-gradient(90% 70% at 50% 0%, color-mix(in srgb, var(--global-brand) 14%, transparent), transparent 55%),
    var(--bg-secondary);
  border: 1px solid var(--base-alfa-neutral);
  text-align: center;
  animation: tnx-rise 0.4s ease both;
}
.tnx-finished__ico {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--global-brand) 14%, transparent);
  color: var(--global-lime);
}
.tnx-finished__title {
  margin: 12px 0 8px;
  font-family: inherit;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.tnx-finished__name {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.tnx-finished__dates {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--tnx-faint);
}
.tnx-finished__text {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--tnx-muted);
  line-height: 1.45;
}
.tnx-finished__winners {
  text-align: left;
  margin: 0 0 20px;
  padding: 14px;
  border-radius: var(--mini-border-radius, 10px);
  background: var(--under-seconadary);
  border: 1px solid var(--base-alfa-neutral);
}
.tnx-finished__winners-title {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tnx-faint);
}
.tnx-finished__winner-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--base-alfa-neutral);
}
.tnx-finished__winner-row:first-of-type { border-top: none; }
.tnx-finished__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.tnx-finished__link {
  color: var(--tnx-muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.tnx-finished__link:hover { color: #fff; }

@media (max-width: 900px) {
  .tnx-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .tnx { padding: 8px var(--site-gutter, 15px) 36px; }
  .tnx-hero,
  .tnx-detail-hero { padding: 20px 16px; }
  .tnx .tournament-list-grid { grid-template-columns: 1fr; }
  .tnx-board__table th:nth-child(3),
  .tnx-board__table td:nth-child(3) { display: none; }
}
