:root {
  --bg: #050712;
  --panel: #101425;
  --panel-strong: #151b31;
  --text: #f7fbff;
  --muted: #a8b5cb;
  --cyan: #00e5ff;
  --blue: #2368ff;
  --pink: #ff2aa8;
  --gold: #f7c948;
  --line: rgba(255, 255, 255, 0.14);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 15% 10%, rgba(0, 229, 255, 0.24), transparent 28rem),
    radial-gradient(circle at 88% 24%, rgba(255, 42, 168, 0.18), transparent 25rem),
    linear-gradient(135deg, #070a18 0%, #101225 52%, #070912 100%);
  color: var(--text);
  font-family: "Trebuchet MS", Arial, sans-serif;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 78%);
}

img {
  display: block;
  max-width: 100%;
}

.hero {
  position: relative;
  min-height: clamp(430px, 66vh, 620px);
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 48px 20px 76px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 7, 18, 0.95) 0%, rgba(5, 7, 18, 0.72) 48%, rgba(5, 7, 18, 0.88) 100%),
    url("/ewc26/images/ewc_notification.png") center / cover no-repeat;
  opacity: 0.74;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--bg));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(190px, 340px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.event-logo {
  width: min(340px, 100%);
  filter: drop-shadow(0 28px 48px rgba(0, 0, 0, 0.5));
}

.event-logo-link {
  display: block;
  width: min(340px, 100%);
}

.event-logo-link .event-logo {
  width: 100%;
}

.event-logo-link:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 6px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(3rem, 8vw, 7.5rem);
  line-height: 0.88;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 0 28px rgba(0, 229, 255, 0.32);
}

.hero-text {
  max-width: 620px;
  margin-bottom: 0;
  color: #e7edf8;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
}

.teams-section {
  position: relative;
  z-index: 1;
  width: min(1340px, 100%);
  margin: -38px auto 0;
  padding: 0 20px 72px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 28px;
  align-items: end;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.section-heading .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 3vw, 2.6rem);
  line-height: 1;
  text-transform: uppercase;
}

.section-heading p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 18px;
}

.levels-section {
  position: relative;
  z-index: 1;
  width: min(1340px, 100%);
  margin: -38px auto 0;
  padding: 0 20px 72px;
}

.event-home-section {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0 20px 70px;
}

.event-links-section {
  margin-top: -38px;
}

.event-links-grid,
.event-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.event-link-card,
.event-info-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(0, 229, 255, 0.1), transparent 42%),
    var(--panel);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.event-link-card {
  display: flex;
  min-height: 240px;
  flex-direction: column;
  padding: 20px;
  color: inherit;
  text-decoration: none;
  transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.event-link-card:hover,
.event-link-card:focus-visible {
  border-color: rgba(0, 229, 255, 0.72);
  background:
    linear-gradient(145deg, rgba(0, 229, 255, 0.2), transparent 46%),
    var(--panel-strong);
  transform: translateY(-3px);
}

.event-link-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.event-link-card-number {
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
}

.event-link-icon,
.event-watch-icon {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.event-link-icon {
  width: 34px;
  height: 34px;
  color: var(--cyan);
}

.event-link-card h3,
.event-info-card h3 {
  margin: 28px 0 10px;
  font-size: 1.45rem;
  line-height: 1.1;
  text-transform: uppercase;
}

.event-link-card p,
.event-info-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.event-link-card-action {
  margin-top: auto;
  padding-top: 22px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.event-info-card {
  padding: 20px;
}

.event-info-card h3 {
  margin-top: 0;
}

.event-info-card p + p {
  margin-top: 14px;
}

.event-watch-section {
  padding-bottom: 38px;
}

.event-watch-card {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 24px;
  border: 1px solid rgba(88, 101, 242, 0.52);
  border-radius: 8px;
  background:
    linear-gradient(125deg, rgba(88, 101, 242, 0.25), transparent 54%),
    var(--panel);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.event-watch-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  color: #aab3ff;
}

.event-watch-copy {
  min-width: 0;
  flex: 1;
}

.event-watch-copy .eyebrow {
  margin-bottom: 5px;
  color: #aab3ff;
}

.event-watch-copy h2 {
  margin-bottom: 7px;
  font-size: clamp(1.4rem, 2.7vw, 2.25rem);
  line-height: 1;
  text-transform: uppercase;
}

.event-watch-copy p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.event-watch-button {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid #7480ff;
  border-radius: 4px;
  color: white;
  background: #5865f2;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.event-watch-button:hover,
.event-watch-button:focus-visible {
  border-color: white;
  background: #4752c4;
}

.event-schedule {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  list-style: none;
  background: var(--line);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.event-schedule li {
  display: grid;
  grid-template-columns: 130px minmax(180px, 1fr) minmax(260px, 1.6fr);
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
  background: var(--panel);
}

.event-schedule time {
  color: var(--cyan);
  font-weight: 800;
}

.event-schedule span {
  font-weight: 800;
}

.event-schedule small {
  color: var(--muted);
  font-size: 0.9rem;
}

.round-section + .round-section {
  margin-top: 46px;
}

.round-heading {
  display: flex;
  gap: 16px 28px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 18px;
}

.round-heading h2 {
  margin-bottom: 0;
  font-size: clamp(1.4rem, 2.7vw, 2.25rem);
  line-height: 1;
  text-transform: uppercase;
}

.round-heading > p {
  max-width: 340px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: right;
}

.levels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
}

.level-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(0, 229, 255, 0.1), transparent 44%),
    var(--panel);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.level-card-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  object-position: center;
  background: var(--panel-strong);
}

.level-card-body {
  padding: 15px;
}

.level-status {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 7px;
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 4px;
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.08);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.level-card h3 {
  min-height: 2.35em;
  margin-bottom: 8px;
  font-size: 1.2rem;
  line-height: 1.16;
  overflow-wrap: anywhere;
}

.level-author {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.level-play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 34px;
  margin-top: 14px;
  padding: 6px 14px;
  border: 1px solid rgba(0, 229, 255, 0.5);
  border-radius: 4px;
  color: var(--bg);
  background: var(--cyan);
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.level-play-button:hover,
.level-play-button:focus-visible {
  border-color: var(--text);
  color: var(--text);
  background: var(--blue);
}

.level-card-hidden .level-status {
  color: var(--gold);
}

.level-card-hidden {
  border-style: dashed;
  border-color: rgba(247, 201, 72, 0.4);
  background:
    linear-gradient(145deg, rgba(247, 201, 72, 0.1), transparent 44%),
    var(--panel);
}

.level-card-thumbnail-hidden {
  display: grid;
  place-items: center;
  color: rgba(247, 201, 72, 0.65);
  background:
    repeating-linear-gradient(45deg, rgba(247, 201, 72, 0.08) 0 12px, transparent 12px 24px),
    var(--panel-strong);
  font-size: clamp(3rem, 9vw, 5rem);
  font-weight: 800;
}

.level-card-hidden .level-status {
  border-color: rgba(247, 201, 72, 0.4);
  background: rgba(247, 201, 72, 0.1);
}

.team-card {
  --skin-row-height: 230px;
  position: relative;
  min-height: 390px;
  display: grid;
  grid-template-rows: var(--skin-row-height) 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(0, 229, 255, 0.1), transparent 36%),
    linear-gradient(315deg, rgba(255, 42, 168, 0.13), transparent 42%),
    var(--panel);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.team-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-top: 3px solid var(--cyan);
  opacity: 0.9;
}

.team-rank {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
  font-weight: 800;
}

.skin-frame {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 30px 22px 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    var(--panel-strong);
}

.skin-frame img {
  width: min(92%, 240px);
  max-height: 180px;
  object-fit: contain;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.45));
}

.skin-missing {
  display: grid;
  place-items: center;
  width: min(92%, 240px);
  aspect-ratio: 1.5;
  border: 1px dashed rgba(255, 255, 255, 0.25);
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
}

.team-details {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 18px;
}

.team-details h2 {
  margin: 0;
  min-height: 2.3em;
  font-size: clamp(1.25rem, 1.7vw, 1.75rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.team-note {
  position: absolute;
  top: calc(var(--skin-row-height) - 16px);
  left: 18px;
  z-index: 2;
  width: fit-content;
  margin: 0;
  padding: 4px 8px;
  border: 1px solid rgba(0, 229, 255, 0.32);
  border-radius: 4px;
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.08);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.players {
  display: grid;
  gap: 10px;
}

.player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.player-name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.timezone {
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.qualifiers-section {
  width: min(1480px, 100%);
}

.qualifier-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.qualifier-stat {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(0, 229, 255, 0.1), transparent 44%),
    var(--panel);
}

.stat-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.qualifier-stat strong {
  display: block;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1;
}

.qualifier-message {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel);
}

.hidden {
  display: none !important;
}

.rankings-wrapper {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 20, 37, 0.86);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.rankings-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.rankings-table th,
.rankings-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
  vertical-align: top;
}

.rankings-table th {
  color: var(--muted);
  background: rgba(21, 27, 49, 0.94);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.rankings-table th:nth-child(1),
.rankings-table td:nth-child(1) {
  width: 72px;
}

.rankings-table th:nth-child(3),
.rankings-table td:nth-child(3) {
  width: 118px;
}

.ranking-row.qualified {
  background: rgba(0, 229, 255, 0.045);
}

.ranking-row.outside {
  background: rgba(255, 255, 255, 0.015);
}

.rank-cell,
.points-cell {
  font-weight: 800;
  white-space: nowrap;
}

.points-cell strong {
  display: block;
  margin-bottom: 7px;
}

.rank-cell {
  color: var(--cyan);
}

.team-cell {
  min-width: 0;
}

.ranking-team {
  display: flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
}

.ranking-team-skin {
  flex: 0 0 78px;
  width: 78px;
  max-height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.35));
}

.ranking-team-copy {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.ranking-team-name {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.16;
}

.ranking-players {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  min-width: 0;
}

.ranking-players span {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.expand-button {
  width: fit-content;
  margin-top: 10px;
  padding: 5px 9px;
  border: 1px solid rgba(0, 229, 255, 0.32);
  border-radius: 4px;
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.08);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

.expand-button:hover,
.expand-button:focus-visible {
  border-color: rgba(0, 229, 255, 0.68);
  outline: none;
  background: rgba(0, 229, 255, 0.15);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-badge.qualified {
  border-color: rgba(0, 229, 255, 0.44);
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.1);
}

.ranking-details-row td {
  padding: 0;
  background: rgba(5, 7, 18, 0.34);
}

.level-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 12px;
  padding: 14px;
}

.level-detail-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.level-thumbnail {
  align-self: stretch;
  width: 112px;
  height: 100%;
  min-height: 86px;
  object-fit: contain;
  object-position: top center;
  background: var(--panel-strong);
}

.level-detail-body {
  display: grid;
  align-self: start;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 10px 10px 10px 0;
}

.level-detail-title {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: baseline;
  min-width: 0;
}

.level-detail-title strong {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.1;
}

.level-detail-title span {
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.run-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.run-item.wr,
.run-item.twr {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.run-item.wr {
  color: inherit;
}

.run-item.twr {
  color: inherit;
}

.run-item.missing {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.run-player {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.run-result {
  color: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.run-item.wr .run-result {
  color: var(--gold);
}

.run-item.wr .record-badge {
  color: var(--gold);
}

.run-item.twr .run-result {
  color: var(--cyan);
}

.run-item.twr .record-badge {
  color: var(--cyan);
}

.record-badge {
  padding: 2px 6px;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.2;
}

.qualification-threshold-row td {
  padding: 9px 14px;
  color: var(--gold);
  background: rgba(247, 201, 72, 0.12);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .hero {
    min-height: 0;
    padding: 34px 16px 74px;
  }

  .hero-content {
    grid-template-columns: 1fr;
  }

  .event-logo {
    width: min(240px, 78vw);
  }

  .section-heading {
    grid-template-columns: 1fr;
  }

  .teams-section {
    padding-inline: 14px;
  }

  .levels-section {
    padding-inline: 14px;
  }

  .event-home-section {
    padding-inline: 14px;
  }

  .event-links-grid,
  .event-info-grid {
    grid-template-columns: 1fr;
  }

  .event-watch-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .event-watch-button {
    grid-column: 1 / -1;
    width: fit-content;
  }

  .event-schedule li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .round-heading {
    display: block;
  }

  .round-heading > p {
    max-width: none;
    margin-top: 10px;
    text-align: left;
  }

  .team-card {
    --skin-row-height: 210px;
    min-height: 360px;
  }

  .qualifier-stats {
    grid-template-columns: 1fr;
  }

  .rankings-table th,
  .rankings-table td {
    padding: 10px 8px;
    font-size: 0.9rem;
  }

  .rankings-table th:nth-child(1),
  .rankings-table td:nth-child(1) {
    width: 50px;
  }

  .rankings-table th:nth-child(3),
  .rankings-table td:nth-child(3) {
    width: 86px;
  }

  .status-badge {
    min-height: 24px;
    padding: 3px 6px;
    font-size: 0.64rem;
  }

  .ranking-team {
    align-items: flex-start;
  }

  .ranking-team-skin {
    flex-basis: 54px;
    width: 54px;
    max-height: 44px;
  }

  .level-details-grid {
    padding: 10px;
  }

  .level-detail-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .level-thumbnail {
    width: 92px;
    min-height: 82px;
    height: 82px;
  }
}
