.sidebar-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-4);
  text-decoration: none;
  border-bottom: 1px solid var(--arena-border);
  flex-shrink: 0;

  .brand-logo {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }

  .brand-name {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--arena-text-primary);
    line-height: 1.1;
  }

  .brand-sub {
    font-size: 0.65rem;
    color: var(--arena-text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-3) var(--sp-2);
}

.sidebar-section-label {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--arena-text-muted);
  padding: var(--sp-3) var(--sp-3) var(--sp-2);
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 10px var(--sp-3);
  margin-bottom: 2px;
  border-radius: var(--r-md);
  color: var(--arena-text-secondary);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  position: relative;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;

  .s-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.85;
  }

  &:hover {
    background: rgba(124, 92, 252, 0.08);
    color: var(--arena-text-primary);
  }

  &.active {
    background: linear-gradient(90deg, rgba(124, 92, 252, 0.28), rgba(0, 212, 255, 0.1));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(124, 92, 252, 0.35);

    &::before {
      content: '';
      position: absolute;
      inset-inline-start: 0;
      top: 20%;
      bottom: 20%;
      width: 3px;
      border-radius: var(--r-full);
      background: linear-gradient(180deg, var(--arena-violet), var(--arena-accent));
    }

    .s-icon {
      opacity: 1;
      filter: drop-shadow(0 0 6px rgba(124, 92, 252, 0.6));
    }
  }

  &:focus-visible {
    outline: 2px solid var(--arena-violet);
    outline-offset: 2px;
  }
}

.s-badge,
.s-new {
  margin-inline-start: auto;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: var(--r-full);
}

.s-badge {
  background: var(--arena-red);
  color: #fff;
}

.s-new {
  background: rgba(124, 92, 252, 0.25);
  color: #c4b5ff;
  border: 1px solid rgba(124, 92, 252, 0.4);
}

.sidebar-tournament {
  margin: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--r-md);
  background:
    linear-gradient(135deg, rgba(124, 92, 252, 0.18), rgba(0, 212, 255, 0.06)),
    var(--arena-surface-02);
  border: 1px solid rgba(124, 92, 252, 0.25);
  flex-shrink: 0;

  .tourney-game {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--arena-accent);
    margin-bottom: var(--sp-1);
  }

  .tourney-name {
    font-size: 0.8rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: var(--sp-3);
    line-height: 1.25;
  }

  .tourney-countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-1);
    margin-bottom: var(--sp-3);
    background: rgba(9, 11, 15, 0.55);
    border-radius: var(--r-sm);
    padding: var(--sp-2);

    .cd-unit {
      text-align: center;

      .cd-val {
        font-size: 0.78rem;
        font-weight: 800;
        color: #fff;
        line-height: 1;
      }

      .cd-lbl {
        font-size: 0.52rem;
        color: var(--arena-text-muted);
        text-transform: uppercase;
        margin-top: 2px;
      }
    }
  }

  .tourney-cta {
    display: block;
    text-align: center;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 8px;
    border-radius: var(--r-sm);
    background: linear-gradient(135deg, var(--arena-violet), #5b3fd4);
    color: #fff;
    transition: filter 160ms ease;

    &:hover {
      filter: brightness(1.1);
    }
  }
}

.sidebar-footer {
  border-top: 1px solid var(--arena-border);
  padding: var(--sp-3);
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2);
  border-radius: var(--r-md);
  text-decoration: none;
  color: inherit;

  &:hover {
    background: var(--arena-surface-02);
  }

  .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--r-full);
    object-fit: cover;
    border: 2px solid rgba(124, 92, 252, 0.5);
  }

  .user-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
  }

  .user-level {
    font-size: 0.65rem;
    color: var(--arena-warm);
  }

  .user-actions {
    margin-inline-start: auto;
    display: flex;
    gap: var(--sp-1);

    a, button {
      width: 28px;
      height: 28px;
      display: grid;
      place-items: center;
      border: none;
      background: transparent;
      color: var(--arena-text-muted);
      border-radius: var(--r-sm);
      cursor: pointer;
      text-decoration: none;

      &:hover {
        color: #fff;
        background: var(--arena-surface-03);
      }
    }
  }
}
