*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--arena-bg);
  color: var(--arena-text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

.skip-link {
  position: absolute;
  inset-inline-start: -999px;
  top: 0;
  z-index: var(--z-toast);
  background: var(--arena-violet);
  color: #fff;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-sm);

  &:focus {
    inset-inline-start: var(--sp-4);
    top: var(--sp-4);
  }
}

.arena-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: var(--header-height) 1fr;
  min-height: 100vh;
}

.arena-header {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding-inline: var(--sp-5);
  height: var(--header-height);
  background: rgba(15, 17, 23, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--arena-border);
}

.arena-sidebar {
  grid-column: 1;
  grid-row: 1 / -1;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: var(--z-sidebar);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0C0E16 0%, #0A0B12 100%);
  border-inline-end: 1px solid var(--arena-border);
  overflow: hidden;
}

.arena-main {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  padding: var(--sp-4);
  background:
    radial-gradient(ellipse 80% 40% at 70% 0%, rgba(124, 92, 252, 0.08), transparent 60%),
    var(--arena-bg);
}

.arena-shell.is-sidebar-collapsed {
  grid-template-columns: var(--sidebar-collapsed) 1fr;

  .sidebar-item span,
  .brand-text,
  .sidebar-section-label,
  .sidebar-tournament,
  .user-info,
  .s-badge,
  .s-new {
    display: none;
  }

  .sidebar-brand {
    justify-content: center;
    padding-inline: var(--sp-2);
  }
}

@media (max-width: 1279px) and (min-width: 768px) {
  .arena-shell {
    grid-template-columns: var(--sidebar-collapsed) 1fr;
  }

  .sidebar-item span,
  .brand-text,
  .sidebar-section-label,
  .sidebar-tournament,
  .user-info,
  .s-badge,
  .s-new {
    display: none;
  }

  .sidebar-brand {
    justify-content: center;
    padding-inline: var(--sp-2);
  }

  .sidebar-item {
    justify-content: center;
    padding-inline: var(--sp-2);
  }
}

@media (max-width: 767px) {
  .arena-shell {
    grid-template-columns: 1fr;
    grid-template-rows: var(--header-height) 1fr;
  }

  .arena-sidebar {
    display: none;
  }

  .arena-header,
  .arena-main {
    grid-column: 1;
  }

  .arena-main {
    padding: var(--sp-3);
    padding-bottom: calc(72px + var(--sp-4));
  }
}
