/*
 * Valorant tournament page (tournament_detail.html → partials/valorant_tournament/).
 * Same visual system as tournament_match_valorant.css. Every rule is scoped under .tdv,
 * so PUBG / Brawl Stars / other tournament pages are untouched.
 */

.tdv {
  --tdv-yellow: #FFDF00;
  --tdv-card: #171718;
  --tdv-inner: #111112;
  --tdv-text: #f4f4f6;
  --tdv-muted: #a8a8ad;
  --tdv-dim: #6e6e74;
  --tdv-line: rgba(255, 255, 255, .08);
  --tdv-red: #ff4655;
  --tdv-red-soft: #ff6b75;
  --tdv-green: #59f18b;
  --tdv-gold: #FFDF00;
  --tdv-silver: #d7dbe2;
  --tdv-bronze: #d99a5b;
  --tdv-ease: cubic-bezier(.16, 1, .3, 1);
  color: var(--tdv-text);
}

.tdv *,
.tdv *::before,
.tdv *::after { box-sizing: border-box; }
.tdv [hidden] { display: none !important; }

/* ------------------------------------------------------------------ */
/* Shared                                                              */
/* ------------------------------------------------------------------ */

.tdv-panel {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--tdv-line);
  border-radius: 18px;
  background: var(--tdv-card);
  scroll-margin-top: 150px;
}

.tdv-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.tdv-panel__head h2 { margin: 0; color: #fff; font-size: 1.3rem; font-weight: 900; }
.tdv-panel__head p { margin: 4px 0 0; color: var(--tdv-muted); font-size: .9rem; }

.tdv-kicker { color: var(--tdv-yellow); font-size: .78rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.tdv-meta { display: inline-flex; align-items: center; gap: 6px; color: var(--tdv-muted); font-size: .74rem; font-weight: 900; letter-spacing: .08em; text-align: right; text-transform: uppercase; }
.tdv-meta i { color: var(--tdv-yellow); }

.tdv-mark { display: inline-grid; flex: 0 0 auto; place-items: center; width: 22px; height: 22px; overflow: hidden; border-radius: 6px; color: var(--tdv-dim); font-size: .66rem; }
.tdv-mark img { width: 100%; height: 100%; object-fit: contain; }
.tdv-mark--fallback { border: 1px solid rgba(255, 213, 0, .2); background: rgba(255, 213, 0, .055); color: #ffd500; }

.tdv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: .9rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .2s var(--tdv-ease), background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.tdv-btn--primary { background: var(--tdv-yellow); color: #111; }
.tdv-btn--primary:hover { color: #111; box-shadow: 0 10px 30px -8px rgba(255, 223, 0, .6); transform: translateY(-1px); }
.tdv-btn--ghost { border-color: rgba(255, 255, 255, .1); background: #1d1d20; color: var(--tdv-text); }
.tdv-btn--ghost:hover { border-color: rgba(255, 223, 0, .5); color: var(--tdv-yellow); }
.tdv-btn--danger { border-color: rgba(255, 70, 85, .45); background: rgba(255, 70, 85, .08); color: var(--tdv-red-soft); }
.tdv-btn--danger:hover { background: rgba(255, 70, 85, .16); color: var(--tdv-red-soft); }
.tdv-btn--sm { min-height: 36px; padding: 0 12px; border-radius: 8px; font-size: .82rem; }

.tdv-note { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border: 1px dashed rgba(255, 255, 255, .12); border-radius: 12px; color: var(--tdv-muted); font-size: .9rem; font-weight: 600; line-height: 1.45; }
.tdv-note > i { color: var(--tdv-yellow); font-size: 1.05rem; }

.tdv-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; background: rgba(17, 17, 18, .82); color: var(--tdv-muted); font-size: .62rem; font-weight: 900; letter-spacing: .08em; line-height: 1.2; text-transform: uppercase; white-space: nowrap; }
.tdv-chip--live { border-color: rgba(255, 70, 85, .55); color: #ff5a67; }
.tdv-chip--live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--tdv-red); box-shadow: 0 0 8px var(--tdv-red); animation: tdv-live 1.2s ease-in-out infinite; }
.tdv-chip--upcoming { border-color: rgba(255, 223, 0, .5); color: var(--tdv-yellow); }
.tdv-chip--upcoming::before { display: none; }
.tdv-chip--done { border-color: rgba(65, 218, 119, .5); color: var(--tdv-green); }
.tdv-chip--review { border-style: dashed; border-color: rgba(255, 223, 0, .5); color: var(--tdv-yellow); }
.tdv-chip--soft { border-color: rgba(255, 223, 0, .5); background: rgba(255, 223, 0, .1); color: var(--tdv-yellow); }

@keyframes tdv-live { 50% { opacity: .2; } }

.tdv-status { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border: 1px solid var(--tdv-line); border-radius: 999px; background: rgba(0, 0, 0, .45); color: var(--tdv-muted); font-size: .72rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.tdv-status--open { border-color: rgba(255, 223, 0, .55); color: var(--tdv-yellow); }
.tdv-status--check_in { border-style: dashed; border-color: rgba(255, 223, 0, .55); color: var(--tdv-yellow); }
.tdv-status--live { border-color: rgba(255, 70, 85, .55); color: #ff5a67; }
.tdv-status--live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tdv-red); box-shadow: 0 0 10px var(--tdv-red); animation: tdv-live 1.2s ease-in-out infinite; }
.tdv-status--completed { border-color: rgba(65, 218, 119, .5); color: var(--tdv-green); }

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */

.tdv-hero {
  --mx: 50%;
  --my: 50%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 28px 32px 24px;
  border: 1px solid var(--tdv-line);
  border-radius: 18px;
  background: var(--tdv-inner);
}

.tdv-hero__art { position: absolute; inset: -30px; z-index: -4; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; filter: blur(5px) saturate(.85); opacity: .28; transform: scale(1.05); }
.tdv-hero__art span { background: var(--map, none) center / cover no-repeat; }
.tdv-hero__wash { position: absolute; inset: 0; z-index: -3; background: radial-gradient(60% 120% at 0% 40%, rgba(255, 223, 0, .2), transparent 60%), linear-gradient(180deg, rgba(17, 17, 18, .3), rgba(17, 17, 18, .94)); }
.tdv-hero__spot { position: absolute; inset: 0; z-index: -2; background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 223, 0, .08), transparent 60%); pointer-events: none; }
.tdv-hero__ghost { position: absolute; left: -10px; bottom: -6px; z-index: -1; color: transparent; font-size: clamp(70px, 12vw, 160px); font-weight: 900; line-height: .9; letter-spacing: -.03em; text-transform: uppercase; white-space: nowrap; -webkit-text-stroke: 1px rgba(255, 255, 255, .06); pointer-events: none; user-select: none; animation: tdv-ghost 30s linear infinite; }

@keyframes tdv-ghost { to { transform: translateX(-15%); } }

.tdv-hero__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.tdv-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); align-items: center; gap: 28px; }

.tdv-identity { display: flex; align-items: center; gap: 24px; min-width: 0; }

.tdv-identity__logo {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 132px;
  height: 132px;
  border: 1px solid rgba(255, 223, 0, .4);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .06), rgba(0, 0, 0, .35));
  box-shadow: 0 0 0 6px rgba(0, 0, 0, .25), 0 20px 60px -10px rgba(255, 223, 0, .4);
  transform: translate3d(var(--px, 0), var(--py, 0), 0);
  transition: transform .25s var(--tdv-ease);
}

.tdv-identity__logo img { width: 80%; height: 80%; object-fit: contain; }
.tdv-identity__body { min-width: 0; }
.tdv-identity h1 { margin: 6px 0 12px; color: #fff; font-size: clamp(2rem, 4.4vw, 3.4rem); font-weight: 900; line-height: 1; letter-spacing: -.02em; overflow-wrap: anywhere; }
.tdv-identity__meta { display: flex; flex-wrap: wrap; gap: 8px; }
.tdv-identity__meta span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--tdv-line); border-radius: 8px; background: rgba(0, 0, 0, .35); color: var(--tdv-muted); font-size: .8rem; font-weight: 700; }
.tdv-identity__meta i { color: var(--tdv-yellow); }

/* Right-hand card */
.tdv-spot { position: relative; display: grid; gap: 10px; padding: 18px; border: 1px solid var(--tdv-line); border-radius: 16px; background: rgba(10, 10, 11, .55); backdrop-filter: blur(6px); text-align: center; }
.tdv-spot small { color: var(--tdv-muted); font-size: .7rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.tdv-spot__count { color: #fff; font-size: 2.2rem; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.tdv-spot__count span:last-child { color: var(--tdv-dim); font-size: 1rem; }
.tdv-spot__bar { height: 8px; overflow: hidden; border-radius: 99px; background: #222; }
.tdv-spot__bar i { display: block; width: 0; height: 100%; border-radius: 99px; background: linear-gradient(90deg, rgba(255, 223, 0, .5), var(--tdv-yellow)); transition: width 1.2s var(--tdv-ease); }
.tdv-spot__sub { color: var(--tdv-muted); font-size: .82rem; font-weight: 600; }
.tdv-spot__sub b { color: var(--tdv-text); }

.tdv-spot--champion { border-color: rgba(255, 223, 0, .5); background: radial-gradient(120% 100% at 50% 0%, rgba(255, 223, 0, .16), transparent 60%), rgba(10, 10, 11, .6); box-shadow: 0 24px 60px -30px rgba(255, 223, 0, .6); }
.tdv-spot--champion strong { color: #fff; font-size: 1.5rem; font-weight: 900; }
.tdv-spot__logo { position: relative; display: grid; place-items: center; width: 92px; height: 92px; margin: 6px auto 0; border: 1px solid var(--tdv-yellow); border-radius: 20px; background: rgba(0, 0, 0, .35); box-shadow: 0 0 40px -6px rgba(255, 223, 0, .55); color: #ffd500; font-size: 2.4rem; }
.tdv-spot__logo img { width: 78%; height: 78%; object-fit: contain; }
.tdv-spot__crown { position: absolute; top: -14px; left: 50%; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: var(--tdv-yellow); box-shadow: 0 6px 22px rgba(255, 223, 0, .5); color: #111; font-size: .66rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; transform: translateX(-50%); }

/* Live rotator: one match at a time */
.tdv-rotator { position: relative; height: 46px; text-align: left; }
.tdv-rotator:empty { display: none; }

.tdv-live-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  overflow: hidden;
  padding: 10px 12px;
  border: 1px solid rgba(255, 70, 85, .3);
  border-radius: 10px;
  background: rgba(255, 70, 85, .05);
  color: inherit;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .45s ease, transform .55s var(--tdv-ease), border-color .2s ease;
}

.tdv-live-item.is-on { opacity: 1; pointer-events: auto; transform: none; }
.tdv-live-item:hover { border-color: rgba(255, 70, 85, .6); color: inherit; }
.tdv-live-item.is-upcoming { border-color: rgba(255, 223, 0, .3); background: rgba(255, 223, 0, .04); }
.tdv-live-item__teams { display: flex; flex: 1; align-items: center; gap: 6px; min-width: 0; font-size: .85rem; font-weight: 800; }
.tdv-live-item__teams b { min-width: 0; overflow: hidden; color: #fff; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.tdv-live-item__teams em { flex: 0 0 auto; color: var(--tdv-yellow); font-size: .75rem; font-style: italic; font-weight: 900; }
.tdv-live-item .tdv-chip { flex: 0 0 auto; }
.tdv-live-item.is-rotating::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--tdv-red); opacity: .8; }
.tdv-live-item.is-rotating.is-timing::after { animation: tdv-rotate 5s linear forwards; }
.tdv-spot.is-paused .tdv-live-item.is-timing::after { animation-play-state: paused; }

@keyframes tdv-rotate { to { width: 100%; } }

.tdv-dots { display: flex; justify-content: center; gap: 6px; }
.tdv-dots:empty { display: none; }
.tdv-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .2); cursor: pointer; transition: width .3s var(--tdv-ease), background .3s ease; }
.tdv-dots button.is-on { width: 20px; background: var(--tdv-red); }

/* Facts strip */
.tdv-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 24px; }
.tdv-fact { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 64px; padding: 12px 14px; border: 1px solid var(--tdv-line); border-radius: 12px; background: rgba(17, 17, 18, .7); }
.tdv-fact small { display: block; color: var(--tdv-dim); font-size: .66rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.tdv-fact strong { color: #fff; font-size: 1rem; font-weight: 900; }
.tdv-fact > i { color: var(--tdv-yellow); font-size: 1.2rem; opacity: .7; }
.tdv-fact__link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid rgba(255, 223, 0, .5); border-radius: 8px; background: rgba(255, 223, 0, .1); color: var(--tdv-yellow); font-size: .76rem; font-weight: 900; text-decoration: none; white-space: nowrap; }
.tdv-fact__link:hover { background: rgba(255, 223, 0, .2); color: var(--tdv-yellow); }

/* Action bar */
.tdv-actionbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--tdv-line); }
.tdv-actionbar:not(:has(*)) { display: none; }
.tdv-actionbar form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.tdv-actionbar__status { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--tdv-muted); font-weight: 700; }
.tdv-actionbar__status > i { color: var(--tdv-yellow); }
.tdv-actionbar__status b { color: var(--tdv-text); }
.tdv-actionbar__spacer { flex: 1; }

.tdv-join__select { min-width: 220px; }

.tdv-join__select select {
  width: 100%;
  min-height: 42px;
  padding: 0 36px 0 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px;
  appearance: none;
  background: #09090a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23FFDF00'%3E%3Cpath d='M1.6 4.6a.6.6 0 0 1 .8 0L8 10.2l5.6-5.6a.6.6 0 1 1 .8.8l-6 6a.6.6 0 0 1-.8 0l-6-6a.6.6 0 0 1 0-.8'/%3E%3C/svg%3E") right 12px center / 12px no-repeat;
  color: var(--tdv-text);
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
}

.tdv-check { display: inline-flex; align-items: center; gap: 8px; max-width: 340px; margin: 0; color: var(--tdv-muted); font-size: .8rem; font-weight: 600; line-height: 1.3; }
.tdv-check input { accent-color: var(--tdv-yellow); }

/* ------------------------------------------------------------------ */
/* Tournament admins card (existing markup, restyled to match)         */
/* ------------------------------------------------------------------ */

.tdv .tdv-admins { margin-top: 18px; padding: 22px; border: 1px solid var(--tdv-line); border-radius: 18px; background: var(--tdv-card); }

/* ------------------------------------------------------------------ */
/* Tabs                                                                */
/* ------------------------------------------------------------------ */

.tdv-tabs { position: sticky; top: 84px; z-index: 30; display: flex; gap: 6px; margin-top: 14px; padding: 6px; border: 1px solid var(--tdv-line); border-radius: 14px; background: rgba(23, 23, 24, .88); backdrop-filter: blur(12px); box-shadow: 0 12px 30px -18px rgba(0, 0, 0, .8); }
.tdv-tabs a { display: flex; flex: 1 1 0; align-items: center; justify-content: center; gap: 8px; padding: 11px 10px; border: 1px solid transparent; border-radius: 10px; color: var(--tdv-muted); font-weight: 800; text-decoration: none; white-space: nowrap; transition: color .2s ease, background .2s ease, border-color .2s ease; }
.tdv-tabs a:hover { background: rgba(255, 255, 255, .04); color: var(--tdv-text); }
.tdv-tabs a.is-active { border-color: rgba(255, 223, 0, .5); background: rgba(255, 223, 0, .1); color: var(--tdv-yellow); }

/* ------------------------------------------------------------------ */
/* Overview                                                            */
/* ------------------------------------------------------------------ */

.tdv-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.tdv-overview:has(.tdv-ov-card--prizes) { grid-template-columns: 1.35fr 1fr 1fr; }
.tdv-ov-card { display: grid; align-content: start; gap: 8px; padding: 18px; border: 1px solid var(--tdv-line); border-radius: 14px; background: var(--tdv-inner); }
.tdv-ov-card > i { color: var(--tdv-yellow); font-size: 1.3rem; }
.tdv-ov-card > small { color: var(--tdv-dim); font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.tdv-ov-card > strong { color: #fff; font-size: 1.6rem; font-weight: 900; line-height: 1.05; }
.tdv-ov-card p { margin: 0; color: var(--tdv-muted); font-size: .86rem; line-height: 1.45; }

.tdv-podium { display: flex; align-items: flex-end; gap: 8px; margin: 4px 0 6px; }
.tdv-podium__step { display: grid; flex: 1 1 0; justify-items: center; gap: 4px; padding: 12px 8px 10px; border: 1px solid color-mix(in srgb, var(--tone) 45%, transparent); border-radius: 12px; background: linear-gradient(180deg, color-mix(in srgb, var(--tone) 14%, transparent), transparent); text-align: center; }
.tdv-podium__step i { color: var(--tone); font-size: 1.1rem; }
.tdv-podium__step small { color: var(--tdv-dim); font-size: .62rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.tdv-podium__step strong { color: var(--tdv-text); font-size: 1rem; font-weight: 900; overflow-wrap: anywhere; }
/* Podium order: 2nd · 1st · 3rd · 4th */
.tdv-podium__step--1 { --tone: var(--tdv-gold); order: 2; min-height: 112px; }
.tdv-podium__step--2 { --tone: var(--tdv-silver); order: 1; min-height: 96px; }
.tdv-podium__step--3 { --tone: var(--tdv-bronze); order: 3; min-height: 84px; }
.tdv-podium__step--4 { --tone: #9a9aa2; order: 4; min-height: 76px; }

.tdv-fill { height: 8px; margin-top: 4px; overflow: hidden; border-radius: 99px; background: #222; }
.tdv-fill i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, rgba(255, 223, 0, .5), var(--tdv-yellow)); }

.tdv-notice { display: flex; gap: 10px; margin-top: 12px; padding: 14px 16px; border: 1px solid rgba(255, 223, 0, .2); border-radius: 12px; background: rgba(255, 223, 0, .04); color: var(--tdv-muted); font-size: .86rem; line-height: 1.5; }
.tdv-notice i { color: var(--tdv-yellow); }

/* ------------------------------------------------------------------ */
/* Bracket                                                             */
/* ------------------------------------------------------------------ */

.tdv-bracket + .tdv-bracket { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--tdv-line); }
.tdv-bracket__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 12px; }
.tdv-bracket__head h3 { display: flex; align-items: center; gap: 8px; margin: 0; color: #fff; font-size: 1rem; font-weight: 900; }
.tdv-bracket__head h3 i { color: var(--tdv-yellow); }
.tdv-bracket__scroll { overflow-x: auto; padding-bottom: 6px; }
.tdv-tree { display: flex; gap: 48px; min-width: max-content; }
.tdv-round { display: flex; flex-direction: column; width: 240px; }
.tdv-round__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; padding: 0 2px; }
.tdv-round__head strong { color: #fff; font-size: .82rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.tdv-round__head span { color: var(--tdv-dim); font-size: .72rem; font-weight: 700; }
.tdv-round__body { display: flex; flex: 1; flex-direction: column; }
.tdv-pair { position: relative; display: flex; flex: 1; flex-direction: column; }
.tdv-slot { position: relative; display: flex; flex: 1; flex-direction: column; justify-content: center; padding: 14px 0; }

/* Connector lines, only when every round halves the previous one (added by the page script). */
.tdv-tree.has-lines .tdv-round:not(:last-child) .tdv-slot::after { content: ""; position: absolute; top: 50%; right: -24px; width: 24px; height: 1px; background: rgba(255, 255, 255, .14); }
.tdv-tree.has-lines .tdv-round:not(:last-child) .tdv-pair:has(.tdv-slot + .tdv-slot)::after { content: ""; position: absolute; top: 25%; bottom: 25%; right: -24px; width: 1px; background: rgba(255, 255, 255, .14); }
.tdv-tree.has-lines .tdv-round:not(:last-child) .tdv-pair::before { content: ""; position: absolute; top: 50%; right: -48px; width: 24px; height: 1px; background: rgba(255, 255, 255, .14); }

.tdv-match { position: relative; display: block; overflow: hidden; border: 1px solid var(--tdv-line); border-radius: 12px; background: var(--tdv-inner); color: inherit; text-decoration: none; transition: border-color .2s ease, transform .3s var(--tdv-ease), box-shadow .3s ease; }
.tdv-match:hover { border-color: rgba(255, 223, 0, .45); color: inherit; transform: translateY(-2px); box-shadow: 0 18px 40px -26px rgba(255, 223, 0, .6); }
.tdv-match.is-live { border-color: rgba(255, 70, 85, .5); box-shadow: 0 0 0 1px rgba(255, 70, 85, .15), 0 18px 40px -26px rgba(255, 70, 85, .7); }
.tdv-match.is-waiting { border-style: dashed; }
.tdv-match__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--tdv-line); background: #141415; }
.tdv-match__top > span:first-child { min-width: 0; overflow: hidden; color: var(--tdv-dim); font-size: .66rem; font-weight: 900; letter-spacing: .06em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.tdv-match__team { position: relative; display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 6px 10px; }
.tdv-match__team + .tdv-match__team { border-top: 1px solid rgba(255, 255, 255, .05); }
.tdv-match__name { flex: 1; min-width: 0; overflow: hidden; color: #fff; font-size: .88rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.tdv-match__team strong { min-width: 22px; color: var(--tdv-muted); font-size: .95rem; font-weight: 900; text-align: right; font-variant-numeric: tabular-nums; }
.tdv-match__team.is-winner::before { content: ""; position: absolute; top: 6px; bottom: 6px; left: 0; width: 3px; border-radius: 3px; background: var(--tdv-yellow); }
.tdv-match__team.is-winner strong { color: var(--tdv-yellow); }
.tdv-match__team.is-loser .tdv-match__name,
.tdv-match__team.is-loser strong { color: var(--tdv-dim); }
.tdv-match__team.is-tbd .tdv-match__name { color: var(--tdv-dim); font-weight: 700; }
.tdv-match__note { margin: 0; padding: 6px 10px 8px; color: var(--tdv-dim); font-size: .72rem; font-weight: 700; }

/* Groups + playoffs (radio-driven stage tabs, same ids as before) */
.tdv-stages__input { position: absolute; opacity: 0; pointer-events: none; }
.tdv-stages__nav { display: flex; gap: 6px; margin-bottom: 16px; }
.tdv-stages__nav label { flex: 0 0 auto; padding: 9px 16px; border: 1px solid var(--tdv-line); border-radius: 10px; background: var(--tdv-inner); color: var(--tdv-muted); font-weight: 800; cursor: pointer; }
#stage-tab-groups:checked ~ .tdv-stages__nav label[for="stage-tab-groups"],
#stage-tab-playoffs:checked ~ .tdv-stages__nav label[for="stage-tab-playoffs"] { border-color: rgba(255, 223, 0, .5); background: rgba(255, 223, 0, .1); color: var(--tdv-yellow); }
.tdv-stages__panel { display: none; }
#stage-tab-groups:checked ~ .tdv-stages__panel--groups,
#stage-tab-playoffs:checked ~ .tdv-stages__panel--playoffs { display: block; }

.tdv-group-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-bottom: 20px; padding: 4px; border: 1px solid var(--tdv-line); border-radius: 12px; background: var(--tdv-inner); }
.tdv-group-tabs__btn { padding: 8px 14px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--tdv-muted); font: inherit; font-size: .85rem; font-weight: 800; cursor: pointer; }
.tdv-group-tabs__btn.is-active { border-color: rgba(255, 223, 0, .5); background: rgba(255, 223, 0, .1); color: var(--tdv-yellow); }
.tdv-group__layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.tdv-group__matches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }

.tdv-standings { overflow: hidden; border: 1px solid var(--tdv-line); border-radius: 14px; }
.tdv-standings table { width: 100%; margin: 0; border-collapse: collapse; color: var(--tdv-text); font-variant-numeric: tabular-nums; }
.tdv-standings th { padding: 10px; background: #151516; color: var(--tdv-dim); font-size: .66rem; font-weight: 900; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.tdv-standings td { padding: 10px; border-top: 1px solid rgba(255, 255, 255, .05); background: var(--tdv-inner); font-size: .88rem; font-weight: 700; text-align: center; }
.tdv-standings th:nth-child(2),
.tdv-standings td:nth-child(2) { text-align: left; }
.tdv-standings tr.is-qualifying td:first-child { box-shadow: inset 3px 0 0 var(--tdv-yellow); color: var(--tdv-yellow); }
.tdv-standings__team { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 800; }
.tdv-standings__pts { color: var(--tdv-yellow); font-weight: 900 !important; }
.tdv-standings__legend { display: flex; align-items: center; gap: 8px; padding: 10px; border-top: 1px solid var(--tdv-line); background: #141415; color: var(--tdv-dim); font-size: .74rem; font-weight: 700; }
.tdv-standings__legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--tdv-yellow); }

/* ------------------------------------------------------------------ */
/* Teams                                                               */
/* ------------------------------------------------------------------ */

.tdv-teams { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }

.tdv-team {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 10px;
  min-height: 196px;
  padding: 38px 14px 16px;
  border: 1px solid var(--tdv-line);
  border-radius: 16px;
  background: var(--tdv-inner);
  text-align: center;
  transition: border-color .2s ease, transform .3s var(--tdv-ease);
}

.tdv-team::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(80% 60% at 50% 0%, rgba(255, 223, 0, .08), transparent 70%); opacity: 0; transition: opacity .3s ease; }
.tdv-team:hover { border-color: rgba(255, 223, 0, .4); transform: translateY(-3px); }
.tdv-team:hover::before { opacity: 1; }
.tdv-team__seed { position: absolute; top: 12px; left: 12px; color: var(--tdv-yellow); font-size: .72rem; font-weight: 900; }

.tdv-team__status { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 6px; background: #0b0b0c; color: var(--tdv-muted); font-size: .68rem; font-weight: 800; }
.tdv-team__status--checked_in { border-color: rgba(255, 223, 0, .5); background: rgba(255, 223, 0, .1); color: var(--tdv-yellow); }
.tdv-team__status--pending { border-style: dashed; border-color: rgba(255, 223, 0, .45); color: var(--tdv-yellow); }
.tdv-team__status--eliminated,
.tdv-team__status--rejected,
.tdv-team__status--withdrawn { color: rgba(255, 255, 255, .35); text-decoration: line-through; }

.tdv-team__logo { display: grid; place-items: center; width: 84px; height: 84px; }
.tdv-team__logo.has-image img { width: 100%; height: 100%; object-fit: contain; }
.tdv-team__logo.has-fallback { width: 82px; height: 82px; border: 1px solid rgba(255, 213, 0, .2); border-radius: 18px; background: rgba(255, 213, 0, .055); color: #ffd500; font-size: 2rem; }
.tdv-team h3 { margin: 0; color: #fff; font-size: 1.02rem; font-weight: 900; }
.tdv-team__sub { color: var(--tdv-dim); font-size: .76rem; font-weight: 700; }

.tdv-team.is-champion { border-color: var(--tdv-yellow); box-shadow: 0 20px 50px -30px rgba(255, 223, 0, .7); }
.tdv-team.is-champion .tdv-team__status { display: none; }

.tdv-team__roster { position: absolute; inset: 0; display: grid; align-content: start; gap: 6px; overflow: auto; padding: 14px; background: rgba(12, 12, 13, .96); opacity: 0; text-align: left; pointer-events: none; transform: translateY(8px); transition: opacity .25s ease, transform .3s var(--tdv-ease); }
.tdv-team:hover .tdv-team__roster,
.tdv-team:focus-within .tdv-team__roster { opacity: 1; pointer-events: auto; transform: none; }
.tdv-team__roster strong { margin-bottom: 4px; color: var(--tdv-yellow); font-size: .78rem; font-weight: 900; }
.tdv-team__player { display: flex; align-items: center; gap: 8px; color: var(--tdv-text); font-size: .8rem; font-weight: 700; text-decoration: none; }
.tdv-team__player:hover { color: var(--tdv-yellow); }
.tdv-team__player img { width: 24px; height: 24px; border-radius: 7px; object-fit: cover; }
.tdv-team__empty { color: var(--tdv-dim); font-size: .78rem; font-weight: 600; }

/* ------------------------------------------------------------------ */
/* Staff                                                               */
/* ------------------------------------------------------------------ */

.tdv-staff { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.tdv-staff__card { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--tdv-line); border-radius: 14px; background: var(--tdv-inner); color: inherit; text-decoration: none; transition: border-color .2s ease, transform .3s var(--tdv-ease); }
.tdv-staff__card:hover { border-color: rgba(255, 223, 0, .4); color: inherit; transform: translateY(-2px); }
.tdv-staff__card img { width: 48px; height: 48px; border: 1px solid rgba(255, 223, 0, .4); border-radius: 12px; object-fit: cover; }
.tdv-staff__card small { display: block; color: var(--tdv-yellow); font-size: .64rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.tdv-staff__card strong { display: block; color: #fff; font-weight: 900; }
.tdv-staff__card span { display: inline-flex; align-items: center; gap: 5px; color: var(--tdv-muted); font-size: .76rem; font-weight: 600; }

/* ------------------------------------------------------------------ */
/* Rules                                                               */
/* ------------------------------------------------------------------ */

.tdv-rules { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.tdv-rules__reader { max-height: 420px; overflow: auto; padding: 18px; border: 1px solid var(--tdv-line); border-radius: 14px; background: var(--tdv-inner); color: #d4d4d8; font-size: .92rem; line-height: 1.65; }
.tdv-event-data { position: sticky; top: 150px; display: grid; overflow: hidden; border: 1px solid var(--tdv-line); border-radius: 14px; background: var(--tdv-inner); }
.tdv-event-data h3 { margin: 0; padding: 14px 16px; border-bottom: 1px solid var(--tdv-line); color: #fff; font-size: .95rem; font-weight: 900; }
.tdv-event-data div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 16px; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.tdv-event-data div:last-child { border-bottom: 0; }
.tdv-event-data span { color: var(--tdv-dim); font-size: .78rem; font-weight: 700; }
.tdv-event-data strong { color: #fff; font-size: .88rem; font-weight: 900; text-align: right; }
.tdv-event-data strong span { color: inherit; font-size: inherit; }

/* ------------------------------------------------------------------ */
/* Entrance (added by tournament_detail_valorant.js)                   */
/* ------------------------------------------------------------------ */

.tdv.is-animated .tdv-identity { animation: tdv-in-left .9s var(--tdv-ease) both; }
.tdv.is-animated .tdv-hero__side { animation: tdv-in-right .9s var(--tdv-ease) .1s both; }
.tdv.is-animated .tdv-fact { animation: tdv-rise .6s var(--tdv-ease) .35s both; }

@keyframes tdv-in-left { from { opacity: 0; transform: translateX(-50px); } }
@keyframes tdv-in-right { from { opacity: 0; transform: translateX(50px); } }
@keyframes tdv-rise { from { opacity: 0; transform: translateY(14px); } }

@media (prefers-reduced-motion: reduce) {
  .tdv *,
  .tdv *::before,
  .tdv *::after { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 960px) {
  .tdv-hero__grid { grid-template-columns: 1fr; }
  .tdv-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tdv-overview,
  .tdv-overview:has(.tdv-ov-card--prizes) { grid-template-columns: 1fr; }
  .tdv-teams { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tdv-group__layout { grid-template-columns: 1fr; }
  .tdv-rules { grid-template-columns: 1fr; }
  .tdv-event-data { position: static; }
}

@media (max-width: 767.98px) {
  .tdv-panel { padding: 16px; }
  .tdv-hero { padding: 20px 16px; }
  .tdv-hero__top .tdv-meta { display: none; }
  .tdv-identity { flex-direction: column; align-items: flex-start; gap: 14px; }
  .tdv-identity__logo { width: 84px; height: 84px; border-radius: 18px; }
  .tdv-actionbar form,
  .tdv-join__select { width: 100%; }
  .tdv-tabs { top: 8px; overflow-x: auto; scrollbar-width: none; }
  .tdv-tabs a { flex: 1 0 auto; padding: 10px 14px; font-size: .84rem; }
  .tdv-teams { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tdv-group__matches { grid-template-columns: 1fr; }
  .tdv-round { width: 210px; }
  .tdv-tree { gap: 32px; }
}
