/* =========================================================================
   portal.css — "Nether Portal" design language, exclusive to The Portal.

   Obsidian blacks, deep purples, violet accents. Applied via the .portal
   wrapper so the rest of the site keeps the Overworld look.
   ========================================================================= */

.portal {
  --obsidian: #0B0712;
  --obsidian-2: #120B1E;
  --card: #171028;
  --card-2: #1E1533;
  --line: #2A1E45;
  --violet: #9B6CE0;
  --portal: #7C4DFF;
  --portal-glow: rgba(124, 77, 255, .35);
  --magma: #FF7A45;
  --text: #EFE9F8;
  --muted-p: #A79BC2;
  --faint: #6A5E85;

  background-color: var(--obsidian);
  background-image:
    radial-gradient(ellipse 90% 40% at 50% 0%, rgba(124, 77, 255, .12), transparent),
    radial-gradient(rgba(155, 108, 224, .09) 1.3px, transparent 1.5px);
  background-size: 100% 100%, 46px 46px;
  color: var(--text);
  min-height: 100vh;
}

/* nether-tint the shared bracket inside The Portal */
.portal .bracket {
  --line: #3D2C63;
  --node-bg: #171028;
  --node-bd: #33255A;
  --node-shadow: #030108;
  --accent: #9B6CE0;
  --label: #6A5E85;
  --final: #FCC433;
}
.portal .bracket-expander__fade { background: linear-gradient(transparent, var(--obsidian)); }

/* Full-width bracket area inside the tournaments tab */
.portal .bracket-fit {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: clamp(20px, 2.5rem, 40px);
  padding-right: clamp(20px, 2.5rem, 40px);
  margin-bottom: 2rem;
  align-items: center;
}

/* Center the bracket; controls sit on its left edge */
.portal .bracket-fit__shell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
}

.portal .bracket-fit__shell [data-bracket-fit-target] {
  margin-left: 0;
  margin-right: 0;
}

.portal .bracket-fit__shell [data-bracket-collapse] {
  align-items: flex-start;
}

.portal .bracket-fit .bracket-view-toggle,
.portal .bracket-fit .bracket-roundbar {
  align-self: flex-start;
  margin-bottom: 14px;
}

@media (max-width: 768px) {
  .portal .bracket-fit__shell {
    width: 100%;
    max-width: 100%;
  }

  .portal .bracket-fit {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
  }
}

.portal .match-inspect {
  background: var(--card);
  border-color: #33255A;
  --accent: #9B6CE0;
}
.portal .match-inspect__head,
.portal .match-inspect__teams,
.portal .match-inspect__team + .match-inspect__team { border-color: #33255A; }

/* ---- shared portal primitives ---------------------------------------- */
.portal-card {
  background: var(--card);
  border: 1px solid var(--line);
}

/* Teams / rosters tab — long names must shrink inside grid cards */
.portal-rosters {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}

.portal-rosters > .portal-card {
  min-width: 0;
}

.portal-roster-team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 1rem;
  min-width: 0;
}

.portal-roster-team__identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.portal-roster-team__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.25;
  color: #fff;
}

.portal-roster-team__seed {
  flex: none;
  font-family: var(--font-pixel, monospace);
  font-size: 7px;
  letter-spacing: 0.5px;
  color: #6A5E85;
}

.portal-roster-players {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.portal-roster-player {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  background: #0F0A1B;
  border: 1px solid #2A1E45;
  transition: filter 0.15s ease;
}

.portal-roster-player:hover {
  filter: brightness(1.15);
}

.portal-roster-player__name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.25;
  color: #EFE9F8;
}

.portal-roster-player__role {
  flex: none;
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-pixel, monospace);
  font-size: 6.5px;
  letter-spacing: 0.5px;
  padding: 4px 6px;
}

@media (min-width: 640px) {
  .portal-roster-team__name {
    font-size: 1.0625rem;
  }
}

/* Ongoing game chip — green live highlight */
.portal .game-chip--ongoing {
  box-shadow: 0 0 0 1px rgba(84, 227, 107, .25), 0 0 16px rgba(84, 227, 107, .12);
}
.portal .game-chip--ongoing .w-2 {
  box-shadow: 0 0 6px rgba(84, 227, 107, .7);
  animation: portal-live-dot 1.4s ease-in-out infinite;
}
@keyframes portal-live-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}
.portal-eyebrow {
  font-family: 'Space Grotesk', var(--font-pixel, monospace);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--violet);
}

/* ---- Tournaments ⇄ Players slider ------------------------------------ */
.portal-switch {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  background: var(--card);
  border: 2px solid var(--line);
  min-width: 320px;
}
.portal-switch__thumb {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 50%;
  background: rgba(124, 77, 255, .22);
  border: 2px solid var(--portal);
  transition: transform .2s ease;
  pointer-events: none;
}
.portal-switch__thumb--right { transform: translateX(100%); }
.portal-switch__opt {
  position: relative;
  z-index: 1;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .3px;
  color: var(--muted-p);
  text-decoration: none;
  padding: 12px 22px;
  transition: color .14s ease;
}
.portal-switch__opt.is-on { color: #fff; }
.portal-switch__opt:hover { color: #fff; }

@media (max-width: 860px) {
  .portal-switch {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
  .portal-switch__opt {
    padding: 10px 8px;
    font-size: 12px;
  }
}

@media (max-width: 860px) {
  .portal {
    overflow-x: clip;
  }
  .portal .player-row__name,
  .portal .player-row__meta {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ---- Players list (row layout) ------------------------------------- */
.player-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 480px;
  max-width: 100%;
  margin-inline: auto;
}
.player-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 0;
  box-sizing: border-box;
  padding: 0;
  background: var(--card);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
  transition: border-color .14s ease, transform .14s ease, background .14s ease;
}
.player-row:hover {
  border-color: var(--portal);
  background: var(--card-2);
  transform: translateX(4px);
}
.player-row__head-slot {
  flex: none;
  display: flex;
  align-items: flex-end;
  align-self: flex-end;
  padding: 4px 0 0 2px;
  margin: 0;
  line-height: 0;
}
.player-row__head {
  height: 80px;
  width: auto;
  flex: none;
  margin-top: 0;
  object-fit: contain;
  object-position: left bottom;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .45));
}
.player-row__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: stretch;
  min-width: 0;
}
.player-row__name {
  font-weight: 700;
  font-size: 17px;
  color: #fff;
}
.player-row__name--username,
.player-row__sub {
  font-family: 'Qrafty', 'Minecraft', system-ui, sans-serif;
  font-weight: 400;
  letter-spacing: .02em;
}
.player-row__sub {
  font-size: 14px;
  color: var(--faint);
  margin-top: 2px;
}

/* ---- Single player profile page ------------------------------------ */
.portal--player-page {
  min-height: 100vh;
  min-height: 100dvh;
}
.player-profile-page {
  flex: 1 1 auto;
  padding: 16px 16px 28px;
  min-width: 0;
  overflow-x: clip;
}
@media (min-width: 640px) {
  .player-profile-page { padding: 20px 24px 36px; }
}
.player-profile {
  max-width: 1040px;
  margin: 0 auto;
  background: #130E22;
  border: 1px solid #2A1E45;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  min-width: 0;
  overflow: hidden;
}
.player-profile__back {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 22px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #A79BC2;
  text-decoration: none;
  transition: color .12s ease;
}
.player-profile__back:hover { color: #fff; }

.player-profile__layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 0;
  border-top: 1px solid #2A1E45;
  min-width: 0;
}
.player-profile__skin-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% 38%, rgba(124, 77, 255, .22) 0%, transparent 62%),
    linear-gradient(180deg, #1e1834 0%, #151022 100%);
  border-right: 1px solid #2A1E45;
}
.player-profile__skin-visual {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.player-profile__skin-stage {
  position: relative;
  height: 380px;
  overflow: hidden;
}
.player-profile__skin-stage canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.player-profile__skin-hint {
  margin: 0;
  padding: 10px 14px 0;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  color: #6A5E85;
}
.player-profile__skin-links {
  padding: 16px 14px 18px;
  border-top: 1px solid rgba(42, 30, 69, .55);
  min-width: 0;
  overflow: hidden;
}
.player-profile__skin-links .player-profile__section-title {
  margin-bottom: 10px;
}
.player-profile__skin-links .player-profile__socials {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.player-profile__skin-links .social-tile {
  padding: 10px 12px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.player-profile__skin-links .social-tile__icon {
  width: 34px;
  height: 34px;
}
.player-profile__skin-links .social-tile__handle {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.player-profile__main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 28px 28px;
  background: #0F0A1B;
  min-width: 0;
}
.player-profile__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.player-profile__head-text { min-width: 0; flex: 1 1 auto; }
.player-profile__name {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(26px, 3.2vw, 36px);
  color: #fff;
  letter-spacing: -.02em;
  line-height: 1.08;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.player-profile__name--username,
.player-profile__mcname {
  font-family: 'Qrafty', 'Minecraft', system-ui, sans-serif;
  font-weight: 400;
  letter-spacing: .02em;
  white-space: nowrap;
  max-width: 100%;
  display: block;
}
.player-profile__mcname {
  margin-top: 6px;
  font-size: clamp(18px, 2.4vw, 22px);
  color: #8E82AD;
}
.player-profile__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #A79BC2;
}
.player-profile__meta-sep { opacity: .55; }
.player-profile__country {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.player-profile__country-flag {
  display: block;
  width: 20px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .22);
}
.player-profile__role {
  display: inline-block;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  color: #C4B5FD;
  background: rgba(124, 77, 255, .16);
  border: 1px solid rgba(155, 108, 224, .4);
  padding: 6px 10px;
}
.player-profile__edit-link {
  display: inline-block;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #FCC433;
  text-decoration: none;
  margin-left: auto;
  padding: 6px 10px;
  border: 1px solid rgba(252, 196, 51, .35);
  border-radius: 6px;
}
.player-profile__edit-link:hover { color: #fff; border-color: #FCC433; }
.player-profile__bio {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #BFB4D4;
  margin: -4px 0 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.player-profile__section {
  padding-top: 4px;
}
.player-profile__section + .player-profile__section {
  padding-top: 18px;
  border-top: 1px solid #221836;
}
.player-profile__section-title {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #6A5E85;
  margin-bottom: 0;
}
.player-profile__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.player-profile__section-head .player-profile__section-title {
  margin-bottom: 0;
}
.player-profile__stats-select {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #EFE9F8;
  background: #171028;
  border: 1px solid #2A1E45;
  padding: 8px 32px 8px 12px;
  max-width: min(100%, 260px);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23A79BC2' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.player-profile__stats-select:focus {
  outline: none;
  border-color: rgba(155, 108, 224, .55);
}
.player-profile__stats-scope {
  margin: -4px 0 10px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #54E36B;
}
.player-profile__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.player-profile__stats--cup {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.player-profile__stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 12px;
  background: #171024;
  border: 1px solid #2A1E45;
  min-width: 0;
}
.player-profile__stat-value {
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 28px);
  color: #fff;
  line-height: 1;
  letter-spacing: -.02em;
}
.player-profile__stat-label {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #8E82AD;
}
.player-profile__stats-note {
  margin: 10px 0 0;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 12px;
  color: #6A5E85;
}
.player-profile__custom-stats {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #2A1E45;
}
.player-profile__section-title--sub {
  margin-bottom: 10px;
}
.player-profile__stats--custom {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}
.player-profile__stat-groups {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.player-profile__stat-category {
  border: 1px solid #2A1E45;
  background: #120B1E;
}
.player-profile__stat-category--plain {
  border: none;
  background: transparent;
}
.player-profile__stat-category-title {
  margin: 0;
  padding: 10px 12px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #C8BFE0;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  user-select: none;
  border-bottom: 1px solid transparent;
}
.player-profile__stat-category-title::-webkit-details-marker { display: none; }
.player-profile__stat-category-title::marker { content: ""; }
.player-profile__stat-category-title::after {
  content: "▾";
  font-size: 12px;
  color: #8E82AD;
  transition: transform .15s ease;
}
.player-profile__stat-category:not([open]) .player-profile__stat-category-title {
  border-bottom: none;
}
.player-profile__stat-category:not([open]) .player-profile__stat-category-title::after {
  transform: rotate(-90deg);
}
.player-profile__stat-category[open] .player-profile__stat-category-title {
  border-bottom-color: #2A1E45;
}
.player-profile__stat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #120B1E;
}
.player-profile__stat-category--plain .player-profile__stat-list {
  border: 1px solid #2A1E45;
}
.player-profile__stat-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 12px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.3;
  border-bottom: 1px solid #2A1E45;
}
.player-profile__stat-row:last-child { border-bottom: none; }
.player-profile__stat-row-label {
  color: #A79BC2;
  min-width: 0;
}
.player-profile__stat-row-value {
  flex: none;
  font-weight: 700;
  color: #fff;
  text-align: right;
}
.player-profile__socials {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.social-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  text-align: left;
  padding: 12px 14px;
  background: #171024;
  border: 1px solid #2A1E45;
  color: #EFE9F8;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.social-tile:hover {
  border-color: #4A3A6A;
  background: #1C142E;
  transform: translateY(-1px);
}
.social-tile.is-copied {
  border-color: #5865F2;
  background: rgba(88, 101, 242, .12);
}
.social-tile__icon {
  flex: none;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
}
.social-tile__meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}
.social-tile__platform {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #8E82AD;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.social-tile__handle {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #EFE9F8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.social-tile--namemc .social-tile__icon { color: #7C4DFF; background: rgba(124, 77, 255, .14); border-color: rgba(124, 77, 255, .28); }
.social-tile--discord .social-tile__icon { color: #fff; background: #5865F2; border-color: #5865F2; }
.social-tile--twitch .social-tile__icon { color: #fff; background: #9146FF; border-color: #9146FF; }
.social-tile--youtube .social-tile__icon { color: #fff; background: #FF0000; border-color: #FF0000; }
.social-tile--steam .social-tile__icon { color: #C7D5E0; background: #1B2838; border-color: #2A475E; }
.social-tile--medal .social-tile__icon { color: #1A1200; background: #FFAF43; border-color: #FFAF43; }
.social-tile--tiktok .social-tile__icon { color: #fff; background: #010101; border-color: #010101; }
.player-profile__teams {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.player-profile__team {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  padding: 12px 0;
  border-bottom: 1px solid #221836;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 14px;
  color: #A79BC2;
  min-width: 0;
}
.player-profile__team:last-child { border-bottom: none; padding-bottom: 0; }
.player-profile__team-name {
  font-weight: 600;
  color: #fff;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-profile__team-event {
  color: #9B6CE0;
  font-weight: 500;
  text-decoration: none;
  transition: color .12s ease;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 120px;
}
a.player-profile__team-event:hover { color: #C4B5FD; text-decoration: underline; }
.player-profile__team-role {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6A5E85;
}
@media (max-width: 820px) {
  .player-profile__layout {
    display: flex;
    flex-direction: column;
    grid-template-columns: minmax(0, 1fr);
  }
  .player-profile__skin-col {
    display: contents;
  }
  .player-profile__skin-visual {
    order: 1;
    background:
      radial-gradient(ellipse 90% 70% at 50% 38%, rgba(124, 77, 255, .22) 0%, transparent 62%),
      linear-gradient(180deg, #1e1834 0%, #151022 100%);
    border-bottom: 1px solid #2A1E45;
  }
  .player-profile__main {
    order: 2;
    padding: 20px 18px 24px;
    min-width: 0;
    border-bottom: 1px solid #2A1E45;
  }
  .player-profile__skin-links {
    order: 3;
    background: #151022;
    border-top: none;
    padding-bottom: 22px;
  }
  .player-profile__skin-stage {
    height: 300px;
  }
  .player-profile__socials { grid-template-columns: minmax(0, 1fr); }
  .player-profile__team-event {
    flex: 1 1 100%;
  }
  .player-profile__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .player-profile__stats--cup { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.portal-tab {
  font-weight: 600;
  font-size: 14px;
  padding: 9px 18px;
  color: var(--muted-p);
  background: transparent;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color .13s ease, background .13s ease, border-color .13s ease;
}
.portal-tab:hover { color: #fff; }
.portal-tab.is-active {
  color: #fff;
  background: rgba(124, 77, 255, .16);
  border-color: var(--portal);
}

.portal-tournament-banner {
  width: 100%;
  aspect-ratio: 21 / 5;
  max-height: 280px;
  overflow: hidden;
  border-bottom: 1px solid #2A1E45;
  background: #0B0712;
  display: flex;
  align-items: center;
  justify-content: center;
}
.portal-tournament-banner__img {
  width: 100%;
  height: 100%;
  max-height: 280px;
  object-fit: contain;
  object-position: center;
  display: block;
}

.portal-stats-table-wrap {
  border: 1px solid #2A1E45;
  background: #171028;
}
.portal-stats-table tbody tr:hover {
  background: rgba(124, 77, 255, .06);
}

/* ================================================================ */
/* Front page — pick a side: Tournaments | Players                  */
/* ================================================================ */
.portal-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 28px 90px;
}
.portal-split__intro {
  grid-column: 1 / -1;
  text-align: center;
  margin-bottom: 12px;
}
.portal-split__title {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(30px, 5vw, 54px);
  color: #fff;
  letter-spacing: 1px;
  margin-top: 12px;
  text-shadow: 0 0 34px var(--portal-glow);
}
.portal-split__lede { color: var(--muted-p); font-size: 16px; margin-top: 14px; }

.portal-door {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  padding: 56px 30px 48px;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, var(--door-glow, rgba(124, 77, 255, .22)), transparent 70%),
    var(--card);
  border: 2px solid var(--line);
  box-shadow: 6px 6px 0 #030108;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
  overflow: hidden;
}
.portal-door:hover {
  transform: translate(-3px, -3px);
  border-color: var(--door-accent, var(--portal));
  box-shadow: 9px 9px 0 #030108, 0 0 40px var(--door-glow, var(--portal-glow));
}
.portal-door__frame {
  width: 96px;
  height: 128px;
  display: grid;
  place-items: center;
  border: 6px solid #241B33;
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .06) 0 8px, transparent 8px 16px),
    linear-gradient(180deg, var(--door-accent, #7C4DFF), #2A1E45);
  box-shadow: inset 0 0 26px rgba(0, 0, 0, .55), 0 0 26px var(--door-glow, var(--portal-glow));
  font-size: 40px;
}
.portal-door__name {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 1px;
  color: #fff;
}
.portal-door__desc { font-size: 14.5px; line-height: 1.6; color: var(--muted-p); max-width: 330px; }
.portal-door__cta {
  margin-top: 6px;
  font-weight: 700;
  font-size: 14px;
  color: var(--door-accent, var(--portal));
}

@media (max-width: 760px) {
  .portal-split { grid-template-columns: 1fr; padding: 40px 18px 60px; }
}

/* ================================================================ */
/* Versus screen — Team A | VS | Team B with 3D skin renders        */
/* ================================================================ */
.versus {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}
.versus.is-open { display: flex; }
.versus__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 2, 9, .9);
  backdrop-filter: blur(5px);
}
.versus__panel {
  position: relative;
  width: min(1320px, calc(100vw - 32px));
  max-height: 92vh;
  overflow-y: auto;
  background:
    radial-gradient(ellipse 65% 45% at 50% 8%, rgba(124, 77, 255, .25), transparent 65%),
    var(--obsidian-2, #120B1E);
  border: 2px solid #33255A;
  box-shadow: 8px 8px 0 #030108, 0 0 60px rgba(124, 77, 255, .3);
  color: #EFE9F8;
}
.versus__close {
  position: absolute;
  top: 10px;
  right: 14px;
  z-index: 2;
  background: none;
  border: none;
  color: #A79BC2;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}
.versus__close:hover { color: #fff; }

.versus__stage {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 12px;
  min-height: 460px;
  padding: 30px 26px 0;
  border-bottom: 2px solid #4A3568;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}
.versus__side {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
  height: 100%;
  min-height: 100%;
}
.versus__side--b .versus__renders { flex-direction: row-reverse; }
.versus__team-name {
  font-family: var(--font-pixel, monospace);
  font-size: clamp(18px, 2.8vw, 28px);
  color: #fff;
  letter-spacing: .5px;
  word-break: break-word;
}
.versus__team-name-link {
  text-decoration: none;
  color: inherit;
  transition: color 0.15s ease;
}
.versus__team-name-link:hover {
  color: #C4B5FD;
}
.versus__side.is-win .versus__team-name,
.versus__side.is-win .versus__team-name-link { color: #54E36B; }
.versus__side.is-win .versus__team-name-link:hover { color: #86EFAC; }
.versus__side.is-lose { opacity: .6; }
.versus__seed {
  font-family: var(--font-pixel, monospace);
  font-size: 9px;
  color: #6A5E85;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 6px;
}
.versus__renders {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 2px;
  width: 100%;
  margin-top: auto;
  margin-bottom: 0;
  min-height: 0;
}

.versus__heads.live-overlay__heads {
  --head-size: 384px;
  --head-overlap: 48px;
  justify-content: center;
  align-items: flex-end;
}

.versus__heads .live-overlay__head,
.versus__heads .versus__player-link {
  width: var(--head-size, 384px);
  height: var(--head-size, 384px);
  flex: none;
  border: none;
  border-radius: 0;
  background: transparent;
  image-rendering: auto;
  box-shadow: none;
  margin-left: calc(var(--head-size, 384px) * -0.16);
  object-fit: contain;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .55));
}

.versus__heads .versus__player-link {
  display: inline-flex;
  line-height: 0;
  text-decoration: none;
  color: inherit;
  transition: filter 0.15s ease;
}

.versus__heads .versus__player-link:hover {
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .55)) brightness(1.08);
}

.versus__heads .versus__player-link .live-overlay__head {
  width: 100%;
  height: 100%;
  margin-left: 0;
  margin-right: 0;
}

.versus__heads .live-overlay__head:first-child,
.versus__heads .versus__player-link:first-child {
  margin-left: 0;
}

.versus__side--b .versus__heads {
  flex-direction: row-reverse;
}

.versus__side--b .versus__heads .live-overlay__head,
.versus__side--b .versus__heads .versus__player-link {
  margin-left: 0;
  margin-right: calc(var(--head-size, 384px) * -0.16);
}

.versus__side--b .versus__heads .live-overlay__head:first-child,
.versus__side--b .versus__heads .versus__player-link:first-child {
  margin-right: 0;
}

.versus__mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 12px;
  align-self: center;
}
.versus__vs {
  font-family: var(--font-pixel, monospace);
  font-size: clamp(34px, 5vw, 58px);
  color: #fff;
  text-shadow: 0 0 30px var(--portal-glow, rgba(124, 77, 255, .5)), 0 0 8px rgba(255, 255, 255, .4);
}
.versus__score {
  font-family: var(--font-pixel, monospace);
  font-size: clamp(22px, 3vw, 34px);
  color: #FCC433;
  letter-spacing: 2px;
}
.versus__status {
  font-family: var(--font-pixel, monospace);
  font-size: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 9px;
  border: 1.5px solid currentColor;
}

.versus__details {
  padding: 12px 20px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(0, 0, 0, 0.14);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.versus__desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted-p);
  margin: 0;
}
.versus__video {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  align-self: flex-start;
  font-weight: 700;
  font-size: 12px;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, #FF4757, #C0392B);
  padding: 6px 12px;
  border: 1.5px solid rgba(255, 255, 255, .2);
  border-radius: 4px;
}
.versus__video:hover { filter: brightness(1.12); }
.versus__video--compact {
  font-size: 8px;
  padding: 4px 6px;
  border-width: 1px;
  border-radius: 3px;
  gap: 3px;
  width: 100%;
  justify-content: center;
  box-sizing: border-box;
}
.versus__game-watch {
  width: 100%;
  margin-top: 2px;
}
.versus__games { margin: 0; }

.versus__details .match-inspect__label {
  font-size: 7px;
  letter-spacing: 1.2px;
  margin-bottom: 5px;
  color: #9B8BB8;
}

.versus__games { margin: 0; }

.versus__games-row,
.versus__picks-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 6px;
}
.versus__game-card,
.versus__pick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1 1 0;
  min-width: 84px;
  padding: 6px 6px 7px;
  border: 1px solid #33255A;
  border-radius: 6px;
  background: #120B1E;
  text-align: center;
}
.versus__pick--side-a { border-top: 3px solid #E85D5D; }
.versus__pick--side-b { border-top: 3px solid #5D8FE8; }
.versus__pick--decider { border-top: 3px solid #FCC433; }
.versus__game-no,
.versus__pick-no {
  font-family: var(--font-pixel, monospace);
  font-size: 11px;
  color: #9B6CE0;
  line-height: 1;
}
.versus__game-icon,
.versus__pick-icon {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 0;
  object-fit: contain;
  display: block;
}
.versus__game-icon--empty,
.versus__pick-icon--empty {
  background: transparent;
}
.versus__game-name,
.versus__pick-name {
  font-size: 10px;
  font-weight: 600;
  color: #E8E0F8;
  line-height: 1.25;
  width: 100%;
  min-height: 2.5em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  word-break: break-word;
  hyphens: auto;
}
.versus__game-meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  margin-top: 1px;
  flex-wrap: wrap;
}
.versus__pick-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 100%;
  margin-top: 1px;
}
.versus__game-ft {
  font-size: 9px;
  font-weight: 700;
  color: #FDE68A;
  opacity: 0.92;
}
.versus__game-score {
  font-family: var(--font-pixel, monospace);
  font-size: 10px;
  color: #FCC433;
  font-variant-numeric: tabular-nums;
}
.versus__game-note {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.versus__game-note-label {
  display: block;
  font-family: var(--font-pixel, monospace);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8A7BA8;
  margin-bottom: 4px;
}
.versus__game-desc {
  margin: 0 0 4px;
  font-size: 11px;
  line-height: 1.4;
  color: #8A7BA8;
}
.versus__game-note .versus__video {
  margin-top: 4px;
  padding: 4px 8px;
  font-size: 11px;
}

.versus__picks { margin: 0; }
.versus__pick--ban .versus__pick-icon {
  filter: grayscale(1) brightness(0.72);
  opacity: 0.8;
}
.versus__pick-action {
  font-size: 9px;
  font-weight: 700;
  color: #EFE9F8;
}
.versus__pick-player {
  font-size: 9px;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.versus__pick-player--a { color: #FCA5A5; }
.versus__pick-player--b { color: #93C5FD; }
.versus__pick-player-link {
  text-decoration: none;
}
.versus__pick-player-link:hover {
  text-decoration: underline;
}
.versus__pick--ban .versus__pick-action { color: #FFAB80; }
.versus__pick--decider .versus__pick-action { color: #FDE68A; }

@media (max-width: 720px) {
  .versus__stage {
    grid-template-columns: 1fr;
    min-height: 420px;
  }
  .versus__mid { order: -1; }
  .versus__heads.live-overlay__heads { --head-size: 384px; }
}
